I have a problem centering the last column's cells. All columns are correctly centered except the last one!  \begin{minipage}[b]{.5\textwidth}   \centering     \caption{Group assessment} %POS   \begin{tabular}{| p{3.3cm} | p{3.0cm}| p{3cm}| p{3cm}|}     \hline      \centering \textbf{ Group} &amp;  \centering \textbf{ Team Size} &amp;  \centering \textbf{Unstructured} &amp; \textbf{Semi-Structured}  \\ \hline        \centering Group A  &amp;  \centering 5 &amp;  \centering 1 &amp;  4 \\ \hline       \centering Group B  &amp;  \centering 6 &amp;  \centering 1 &amp;  6 \\ \hline       \centering Group C  &amp;  \centering 5 &amp;  \centering 1 &amp;  5 \\ \hline       \centering Group D  &amp;  \centering 3 &amp;  \centering 1 &amp;  3 \\ \hline     \end{tabular}   \label{table:Group}   \end{minipage} \end{table}
121259
I have the following table:  \begin{tabular}{|p{3cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|} \hline \centerline {image}  &amp;    \multicolumn{2}{c|}{ABC} &amp; \multicolumn{2}{c|}{DEF} \\ \hline  &amp; \centering A&amp;\centering B&amp;\centering C&amp;\centering D  \\ \hline \centerline 1&amp;&amp;&amp;&amp; \\ \hline \centerline 1&amp;&amp;&amp;&amp; \\ \hline \centerline 1&amp;&amp;&amp;&amp; \\ \hline \centerline 1&amp;&amp;&amp;&amp; \\ \hline \end{tabular}   When I try centering D, I have a problem in the shape of the table. Why is that? How can I center it appropriately?  Thanks.
8762
Why is there a line missing between Healthy and total column?  \begin{table}[ht]  \begin{center}  \begin{tabular}{|c|cc|c|}  \hline     &amp;\multicolumn{2}{c}{BMI} \\   \multirow{-2.5}{*}{\makecell{Activity level}}&amp; {Unhealthy} &amp; {Healthy} &amp; \multirow{-2.5}{*}{\makecell{Total}} \\  \hline  Inactive  &amp; 25 &amp; 21 &amp; 46\\   Active &amp; 9 &amp;  45 &amp; 54\\   \hline  Total &amp;34 &amp; 56 &amp; \textbf{100}\\  \hline  \end{tabular}   \caption{\label{tab:table-name}Data on activity level, resting heart rate  and BMI}  \label{conting2}  \end{center}  \end{table}
26286
How do I code a table to look like this? I'm not the best at LaTeX and can't seem to wrap my head around \multirow. I checked other examples prior to posting but they used \multicolumn and it just confused me even more. Thanks in advance!    \begin{center} \begin{tabular}{ |c|c|c|c|c|}   \hline  TextA &amp; TextB &amp; TextC &amp; TextD &amp; TextE\\  \hline  A &amp; TextF &amp; TextG &amp; TextH &amp; TextI\\  B &amp; TextJ &amp; TextK &amp; TextL &amp; TextM\\  C &amp; \multirow{2}*{TextF} &amp; TextG &amp; TextH &amp; TextI\\  \cline{3-3}  &amp; TextJ &amp; TextK \\ \hline \end{tabular} \end{center}   I was trying something like this.. I'm starting to have problems as I'm trying to multirow within a multirow? I'm not sure of the process here. I would like TextG to be split into 2 and TextH and TextI to be the cells which are split in 3 but not sure how to go about it. Will then TextJ and TextK be the contents of the split TextG cell?
47959
I'm dealing with the powerful tabularx environment. I was able to obtain a nice table, except for the last column. I need seven columns in total, but at the end I got another half column. I can't understand why!  Here the code I used for building the table:  \begin{table}[h!]  \begin{tabularx}{\textwidth}{|l|*{20}{&gt;{\arraybackslash}X|}}  \multicolumn{1}{c}{}&amp; \multicolthead{3}{\color{RoyalBlue}\textbf{I}}&amp; \multicolthead{3}{\color{RoyalBlue}\textbf{II}} &amp; \multicolthead{3}{\color{RoyalBlue}\textbf{III}} &amp; \multicolthead{3}{\color{RoyalBlue}\textbf{IV}} &amp; \multicolthead{3}{\color{RoyalBlue}\textbf{V}} &amp; \multicolthead{3}{\color{RoyalBlue}\textbf{VI}} \\  \hline  \thead{\color{RoyalBlue}One\\\color{RoyalBlue} Time} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} \\  \hline  \thead{\color{RoyalBlue}Two\\\color{RoyalBlue} Times} &amp; &amp; &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; &amp; &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \\  \hline  \thead{\color{RoyalBlue}Three\\\color{RoyalBlue}Times} &amp; \multicolumn{3}{l|}{} &amp; &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; &amp; &amp; \multicolumn{3}{l|}{} \\   \hline  \thead{\color{RoyalBlue}Four\\\color{RoyalBlue} \&amp; Times} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; \multicolumn{3}{l|}{} &amp; &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; \cellcolor[HTML]{D3D3D3} &amp; &amp; \\  \hline  \end{tabularx} \caption{{Caption}} \end{table}   Which produces the following output:    Does anyone have an idea?
109409
Unfortunately I cannot solve the error with noalign on my own:  ! Misplaced \noalign. \hline -&gt;\noalign                    {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet... l.12 ... &amp; \centering{B} &amp; \centering{C} \\ \hline  I expect to see \noalign only after the \cr of an alignment. Proceed, and I'll ignore this case.   I already tried it with \cline, but this didn't work either. By searching the web I found out that in all cases \\ at the end of the line is missing. However, I have a \\ at the end of the line:  \documentclass[12pt,a4paper]{article} \usepackage{multicol} \usepackage{multirow}  \begin{document}  \begin{tabular}{|p{40pt} p{60pt}|p{120pt}|} \hline \multicolumn{3}{|p{220pt}|}{\multirow{2}{220pt}{\centering{\textbf{Title}}}} \\ \multicolumn{3}{|c|}{} \\ \hline \centering{A} &amp; \centering{B} &amp; \centering{C} \\ \hline \end{tabular}  \end{document}   I'd appreciate any help.
57111
\begin{figure}     %\centering         \begin{minipage}[h]{0.58\textwidth}         \centering         \includegraphics[scale=0.4,trim=12mm 15mm 12mm 15mm]{fig1}         \end{minipage}         \begin{minipage}[h]{0.38\textwidth}         \centering         \include{fig2}         \end{minipage} \end{figure}   I get the fig1 nicely placed in the center of the left side BUT fig2 'sank' at the bottom of the right side. I dont really know what's wrong with the code. Actually fig2 is a table which i store as a tex file with codes only, something like:  \begin{tabular}{|c|c|}     \hline     aa  &amp; bb  \\ \hline     0 &amp; 10 \\ \hline     1 &amp; 2 \\ \hline \end{tabular}   Hope someone will help me fix this. Thanks in advance.
45399
I have a table with long heading names. I want to fix the the width of the columns. When I do so the text flows out if the column. Any suggestion about fixing it.  Here is the example   \begin{table*}[ht] \begin{tabular}{|l|r|r|r|r|r|} \hline Image &amp; Score  &amp; here is a lot of text &amp; agian a lot &amp;a lot and a lot&amp; and the same here\\ \hline a \(left\) &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1  \\ \hline b \(right\)&amp;  1 &amp;1 &amp; 1 &amp; 1 &amp; 1  \\  \end{tabular}  \end{table*}
41703
I have the following code that produces the table that is shown. What I am trying to do is to get the fourth and fifth column titles vertically aligned at the top. Is this possible?  \documentclass{article} \usepackage{multirow} \usepackage{array}  \newcolumntype{x}[1]{% &gt;{\raggedright\hspace{0pt}}p{#1}}%  \begin{document} \centering \renewcommand{\arraystretch}{1.2} \begin{tabular}{| m{2cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} | p{2cm} |} \hline     \multirow{3}{1.7cm}{Data Set} &amp;%     \multicolumn{3}{c |}{Raw Data} &amp;%     Offline Processing Time &amp;     Index Size (KB)\\ \cline{2-4} %     &amp; %     RDF N3 File SizeKB (sec)    &amp;%     Number of Triples &amp;%     Number of Entities\\    \hline \end{tabular} \end{document}
54749
I want a table whose first column is aligned top, second column is aligned middle, and third column is aligned bottom; like this:    I wrote the following code:  \documentclass{article} \usepackage[english]{babel} \usepackage{array}  \begin{document}  \begin{tabular}{| p{1cm} | m{1cm} | b{1cm} |}     \hline     x &amp;     A long text comes here &amp;     x \\ \hline \end{tabular}  \end{document}   Yet, to my surprise, the outcome was "all columns aligned middle," as follows:    What did I do wrong?
100425
When I put X in column specifier, how can I define column formatting? How can I get center alignment? Currently I am putting \centering, but that is not a proper solution.   This is my code:  \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{patterns} \usepackage{booktabs,tabularx} \usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry   \begin{document}  \begin{table}[t] \caption{Case studies} \centering  \begin{tabularx}{\textwidth}{p{4cm}*{5}{X}}     \toprule \centering Nature of unreliability &amp; \centering Sender SST &amp; \centering Receiver SST &amp; \centering Implementation SST &amp;  Retransmission Bound \\   \midrule  Noisy (Single fixed error message) &amp; DSST &amp; DSST &amp; DSST &amp; Unbounded \\ \bottomrule \end{tabularx} \label{case-studies} \end{table}    \end{document}
80205
The following MWE :  \documentclass[10pt]{article} \usepackage[french]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}   \usepackage{color} \usepackage{array,float}  \begin{document}     \begin{tabular}{|*{3}{&gt;{\centering}p{1cm}|}}         \hline \color{red}A&amp;B&amp;C\tabularnewline \hline     \end{tabular}      \begin{tabular}{|*{3}{&gt;{\centering}m{1cm}|}}         \hline \color{blue}A&amp;B&amp;C\tabularnewline \hline     \end{tabular}      Some blablah... \end{document}   gives me :    The blue color continues after the cell, and even after the tabular !  I know that I can basically solve the problem with braces around  \color{blue}A   but I want to understand why, if I use "m" parameter instead of "p" in tabular, \color has this strange behaviour... (Otherwise, why, in the first tabular, cells are higher and A in the bottom of his cell ?)
32384
My table is going out of the page. Please give me a solution?  \begin{table}[] \centering \caption{My caption} \label{my-label} \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|} \hline Ref      &amp; \multicolumn{6}{l|}{Model Used}        &amp; Approach                                   &amp; Limitation                                                                                                       &amp; Goal                                                                                                             \\ \hline          &amp; MBTI &amp; FFM &amp; BFI &amp; KTS &amp; BTR &amp; NEO-FFI &amp; \multicolumn{3}{l|}{}                                                                                                                                                                                                                                                            \\ \hline {[}10{]} &amp;      &amp;     &amp;     &amp;     &amp;     &amp;         &amp; Interactive personality profiling appraoch &amp; \begin{tabular}[c]{@{}l@{}}Test were based on subjective evidences which\\ may lead to uncertainty.\end{tabular} &amp; \begin{tabular}[c]{@{}l@{}}In order to propose a structure for effective\\ software team structure.\end{tabular} \\ \hline          &amp;      &amp;     &amp;     &amp;     &amp;     &amp;         &amp;                                            &amp;                                                                                                                  &amp;                                                                                                                  \\ \hline \end{tabular} \end{table}
40976
I need this table:    (each row and column should have the same height and length, last cell should be divided by diagonal line). I tried the following code:  \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{array} \usepackage{makecell} \newcolumntype{x}[1]{&gt;{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}} \begin{document} \setlength{\extrarowheight}{0.1cm} \begin{tabular}{|x{0.5cm}|x{0.5cm}|x{0.5cm}|x{0.5cm}|x{0.5cm}|}\hline &amp;&amp;&amp;&amp;20\\ \hline &amp;&amp;&amp;&amp;30\\ \hline &amp;&amp;&amp;&amp;45\\ \hline 15&amp;12&amp;18&amp;50&amp;\diaghead(-3,2){\hskip \hsize}{$a_i$}{$b_j$}\\ \hline \end{tabular} \end{document}   but text in the last cell is displayed incorrectly and cells are not the same.     How can I change that?
38137
How can I center the column when using X in tabularx environment like in this example?  \begin{tabularx}{\textwidth}{@{}lXXXXX@{}}  1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 \\    \end{tabularx}
20716
I'm newbie in TeX, so I've decided to ask for some help.   I'm working on technical documentation for my job and I need to create a 4-column table, where text in first two columns top-aligned and centered horizontally, last two aligned with last string of second column. But I can't achieve this.   I've tried this:   and this:   But the closest result which I able to obtain is:    So, last three columns is OK, first one - not, it should be top-aligned.  I was successful to overcome this by usage of \multirow environment, but it's should be implemented individually to rows. If' I'll do this for long tables - it'll make me insane. I want one fixed style in preamble, if it's possible.  Here is my table in main body:      %russian technichal standart documentation class      \documentclass[russian, 14pt, utf8, columnsxxiv, columnxxxi, columnxxxii, pointsection, hpadding = 10mm]{eskdtext}       %%%For working of eskdx, also cyrillic      \usepackage{xecyr}       %%%set TNR as main font      \setmainfont[Mapping=tex-text]{Times New Roman}       %%%Additional position options      \usepackage{float}       %%%advanced tables      \usepackage{tabularx}      \newcolumntype{Y}{&gt;{\centering\arraybackslash}X}            \newcolumntype{d}{&gt;{\centering}b{.25\textwidth}}      \newcolumntype{s}{&gt;{\centering}b{.1\textwidth}}      \newcolumntype{a}{&gt;{\centering}p{.25\textwidth}}       %%%redefine command for № -symbol, because eskdx quite old package      \renewcommand{\No}{\textnumero}       \begin{document}       \begin{table}[H]      \label{appA}      \begin{tabularx}{\textwidth}{a|d|s|Y}      \hline       Наименование &amp; Основные технические данные &amp; Кол., шт. &amp; Примечание  \\       \hline      text text text text text text text &amp; text text text text text text text text text text&amp; {1} &amp; text  \\       \end{tabularx}       \end{table}       \end{document}   I'll appreciate any help!
75106
Why isn't the table adjusting the text to make line breaks when necessary? Can I make them manually? What could be done to fix these margins? Edit: MWE below: \documentclass[a4paper,12pt,spanish]{article} \usepackage{multirow} \usepackage[utf8]{inputenc} \usepackage{geometry} \usepackage[spanish]{babel} \usepackage{graphicx} \begin{document} \begin{center} \begin{tabular}{|r|ccccc|} \hline    &amp; Descripción &amp; Narración &amp; Diálogo &amp; Exposición &amp; Argumentación \\ \hline   Técnico-científico &amp;  &amp;  &amp;  &amp; Habitual &amp; \\   Jurídico-administrativo &amp;  &amp;  &amp;  &amp;  &amp; \\   Humanístico &amp;  &amp;  &amp;  &amp; Estudio &amp; Ensayo\\   Periodístico &amp;  &amp;  &amp;  &amp; Noticia &amp; Art. opinión\\   Literario &amp; Descripción &amp; Novela &amp; Teatro &amp; \multicolumn{2}{c|}{Lengua literaria}\\ \hline \end{tabular} \end{center} \end{document}  Edit 2: Problem remains when changing tabular with tabu. Aditionally, it gives me a non fatal error when compiling: Overfull \hbox (57.79063 too wide) (page 2), lines 112-123. Since this table appears in the page 2 and the code lines match too, it probably wants to tell me something, but I don't know what it means.
5489
I have this MWE:  \documentclass{article} \usepackage{multirow} \begin{document}     \begin{table}[here]         \begin{center}             \begin{tabular}{|l|l|c|}             \hline              \multicolumn{2}{|c|}{\textbf{SED}} &amp; \multirow{2}{*}{\textbf{\% compressione}} \\             \cline{1-2}             \textbf{MC} &amp; \textbf{DP} &amp; \\              \hline              \hline             0.00016032 &amp; 0.0001750267 &amp; 10\%\\             \hline             \end{tabular}          \end{center}     \end{table} \end{document}   It realizes this image:   The first two columns are correctly formatted to the left, but I want it so that just MC and DP will be centered, how can I do that?