I have a table with 4 columns like this: \begin{table}[H]  \begin{tabular}{l l l l}     \caption{Test}      \resizebox{\textwidth}{!}{%         \begin{tabular}{l l l l}             Column Name 1 &amp; \ Column Name 2 &amp; Column Name 3 &amp; Column Name 4 \\             v1 &amp; \ v1 &amp; v1 &amp; v1 \\  \end{tabular}} \end{table}  Now, I want my table to span multiple pages since there are a lot of rows. I have read that I could use the longtable function for this as described . However, simply exchanging table with longtable (as I had hoped) does not work. Is there a convenient way to achieve this without changing the code too much? Thanks!
121515
I am writing a paper using the elsarticle document class. However, the article contains a long table which is sent to the next page, in the middle of the page although I have specified the position as 'here'. Is there any way to make the table split if one page is not long enough for the table? Thank you very much for your very kind help.
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*}
28042
I really tried hard to do this on my own, but I keep failing ... Using multi-column and multi-row commands confused me. I know some of you might frown upon such a request but I really need help getting this table implemented .. So I'm sorry if I upset anyone.  My preamble has :   \documentclass[12pt,a4paper]{report} \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry} \linespread{1.5}     Is there a way I can convert this from excel to LaTeX form ? I tried an add-in before but it didn't work for me. Also online generators cannot combine cells the way I want them (unless I didn't find a better table generator ? )
78548
I am completely noobie in LaTeX. I need to change table name in all captions. But when I write \renewcommand\tablename{newname} at the beginning of document, it doesn't do anything. It's still "Table" My code looks like this:  ... \renewcommand\tablename{new} ... \begin{table}[b] \centering \begin{tabular}{|l|} ... your table ... \end{tabular} \caption{This table shows some data} \end{table} ...   What am I doing wrong?
100281
EDIT Like some comments below are remarking the table environment doesn't allow tables over more than one page. However the solution works fine  I need to make a table over more than one page. The standard approach seems to be to use the ltablex environment. However, it doesn't work; also I assume that the table environment may also be required for the thesis template I work on (e.g. suppose for the capture).   \documentclass[11pt]{article} \usepackage{booktabs} \usepackage{tabularx} \usepackage{ltablex}  \begin{document}  \begin{table} \caption{Example of an table} \label{tab:daypack}      \begin{tabularx}{\linewidth}{@{}cX@{}}   \toprule \textbf{Column 1} &amp; \textbf{Column 2} \\[6pt] \midrule \endhead $R$ &amp; 1This is an example sentence \\[6pt] $R$ &amp; 2As well as the line before \\[6pt] $A$ &amp; 3Also this is an example \\[6pt] $R$ &amp; 4This is an example sentence \\[6pt] $R$ &amp; 5As well as the line before \\[6pt] $A$ &amp; 6Also this is an example \\[6pt] $R$ &amp; 7This is an example sentence \\[6pt] $R$ &amp; 8As well as the line before \\[6pt] $A$ &amp; 9Also this is an example \\[6pt] $R$ &amp; 10This is an example sentence \\[6pt] $R$ &amp; 11As well as the line before \\[6pt] $A$ &amp; 12Also this is an example \\[6pt] $R$ &amp; 13This is an example sentence \\[6pt] $R$ &amp; 14As well as the line before \\[6pt] $A$ &amp; 15Also this is an example \\[6pt] $R$ &amp; 16This is an example sentence \\[6pt] $R$ &amp; 17As well as the line before \\[6pt] $A$ &amp; 18Also this is an example \\[6pt] $R$ &amp; 19This is an example sentence \\[6pt] $R$ &amp; 20As well as the line before \\[6pt] $A$ &amp; 21Also this is an example \\[6pt] $R$ &amp; 22This is an example sentence \\[6pt] $R$ &amp; 23As well as the line before \\[6pt] $A$ &amp; 24Also this is an example \\[6pt] $R$ &amp; 25This is an example sentence \\[6pt] $R$ &amp; 26As well as the line before \\[6pt] $A$ &amp; 27Also this is an example \\[6pt] $R$ &amp; 28This is an example sentence \\[6pt] $R$ &amp; 29As well as the line before \\[6pt] $A$ &amp; 30Also this is an example \\[6pt] $R$ &amp; 31This is an example sentence \\[6pt] $R$ &amp; 32As well as the line before \\[6pt] $A$ &amp; 33Also this is an example \\[6pt] $R$ &amp; 34This is an example sentence \\[6pt] $R$ &amp; 35As well as the line before \\[6pt] $A$ &amp; 36Also this is an example \\[6pt] $R$ &amp; 37This is an example sentence \\[6pt] \bottomrule \end{tabularx}    \end{table}      \end{document}
18454
I'm using the tabular features of siunitx (for what it is worth: v1.3 since I'm on TexLive 2009) to align numbers in tables, eg.  \begin{tabular}{ p{1.5cm} S S S } bla &amp; 1.23 &amp; 4.5 &amp; 67.89 \tabularnewline \end{tabular}   and that works perfectly fine.  Now I would like to have this table span a specific width, or rather to have several tables to have the same width. For this I would normally use tabularx  \begin{tabularx}{\textwidth}{ p{1.5cm} X X X } bla &amp; 1.23 &amp; 4.5 &amp; 67.89 \tabularnewline \end{tabular}   Now, is there a way to combine the two? To have the number formatting and alignment features of siunitx inside an automatically resizing table?
16419
Im trying to create a multicolumn table in LaTex that would look like this:     Unfortunately I tried pretty much all the codes for multi row and multi column tables but it never looks even remotely similar. My main problem is to fit the Chronological periods on top of the 2 names.  The last code I tried was:  \documentclass[11pt]{article} \begin{document}  \begin{left} \begin{tabular}{|lc|ll|l|ll|}  \hline  {\bfseries Bronze Age} &amp; {} &amp; {\bfseries Iron Age} &amp; {} &amp;{\bfseries    Hellenistic}  &amp; {\bfseries Roman}\\  \hline  \multirow {Kilise Tepe &amp; Ephesos &amp; Kilise Tepe  &amp; Ephesos &amp; Gordion &amp;  Ephesos&amp; Sagalassos}\\ \hline \end{tabular} \end{left}   \end{document}   Could someone please put me in the right direction?  Thank you in advance.
66743
I would like to have a table that looks like the image below.  \documentclass{article} \begin{document}     \begin{table*}         \begin{tabular}{|l|l|l|l|l|l|l|} \hline              &amp;\multicolumn{3}{c|}{A} &amp;\multicolumn{3}{c|}{B} \\ \cline{2-7}            1 &amp; a &amp; b &amp; c &amp; d &amp; e &amp; f \\ \hline           2 &amp; g &amp; h &amp; i &amp; j &amp; k &amp; l \\ \hline          \end{tabular}     \end{table*} \end{document}   However, I cannot obtain the table with an entire empty row, like the cold cache, written in its center. Is there some way to do so?    I also want the caption below the table.
40764
I am developing some tables on LaTeX environment and I am having some troubles with the spacing. Originally, I was able to generate the tables using the standard \begin{table}, but then I tried to add some features, as the capability to break the table if it is too long (using longtable) the issue appears. I also want to align numbers by decimal point and center, reason why I use siunitx package. The problem is on the last column, which had a width almost the double than the others. If I specify the column width, the problem "disappear", but I'm really interested in the possibility of automatically generate the width of the table.  The code is the following:  \documentclass[paper=a4, fontsize=11pt]{scrartcl} \usepackage[english]{babel} \usepackage{siunitx} \usepackage{longtable} \usepackage{booktabs}  \begin{document} \begin{longtable}{l*{4}{S}} % no problem specifying the column width\begin{longtable}{l*{4}{S[table-column-width=1.25cm]}} \caption{Univariate Item Descriptives}\\ \toprule \multicolumn{1}{l}{\textbf{Item}} &amp; \multicolumn{1}{c}{\textbf{Mean}} &amp;    \multicolumn{1}{c}{\textbf{Variance}} &amp; \multicolumn{1}{c}{\textbf{Skewness}} &amp; \multicolumn{1}{c}{\textbf{Kurtosis}} \\ \midrule \endfirsthead \multicolumn{5}{c}% {\tablename\ \thetable\ -- \textit{Univariate Item Descriptives (Continued from previous page)}} \\ \toprule \textbf{Item} &amp; \textbf{Mean} &amp; \textbf{Variance} &amp; \textbf{Skewness} &amp; \textbf{Kurtosis} \\ \midrule \endhead \hline \multicolumn{5}{r}{\textit{Continued on next page}} \\ \endfoot \bottomrule \endlastfoot 2. EX +         &amp; 2.788   &amp;    1.060 &amp;        -0.120   &amp;   -0.368\\ 3. DS +         &amp; 4.080   &amp;    0.853 &amp;        -1.141   &amp;    1.379\\ 4. AM +         &amp; 3.684   &amp;    0.705 &amp;        -0.541   &amp;    0.744\\ 5. EX +         &amp; 3.653   &amp;    1.043 &amp;        -0.709   &amp;    0.149\\ 6. DS -         &amp; 2.240   &amp;    1.665 &amp;         0.725   &amp;   -0.603\\ 7. AM +         &amp; 4.292   &amp;    0.876 &amp;        -1.627   &amp;    2.705\\ 8. EX -         &amp; 2.419   &amp;    1.588 &amp;         0.449   &amp;   -0.897\\ 9. AM +         &amp; 3.255   &amp;    0.923 &amp;        -0.234   &amp;   -0.037\\ 10. DS -        &amp; 3.449   &amp;    1.408 &amp;        -0.453   &amp;   -0.599\\ 11. EX +        &amp; 3.678   &amp;    1.232 &amp;        -0.669   &amp;   -0.219\\ 12. AM -        &amp; 2.830   &amp;    1.162 &amp;         0.029   &amp;   -0.565\\ 13. EX -        &amp; 3.452   &amp;    1.205 &amp;        -0.410   &amp;   -0.336\\ 14. DS -        &amp; 2.442   &amp;    1.374 &amp;         0.310   &amp;   -0.893\\ 15. AM -        &amp; 2.114   &amp;    1.168 &amp;         0.729   &amp;   -0.176\\ 16. EX -        &amp; 3.070   &amp;    1.085 &amp;        -0.176   &amp;   -0.347\\ 17. AM +        &amp; 3.893   &amp;    1.116 &amp;        -0.954   &amp;    0.544\\ 18. EX +        &amp; 3.311   &amp;    0.964 &amp;        -0.238   &amp;   -0.066\\ 19. AM -        &amp; 2.674   &amp;    1.404 &amp;         0.245   &amp;   -0.780\\ \end{longtable} \end{document}
72854
I am trying to align the columns of multiple tables.  I know I can use p column format to fix column widths but I would prefer that TeX automatically figure out the widths for me.  I was hoping to:    output one table with all rows of each subsequent table so that the column widths of the combined table would be automatically good for all the subsequent tables  then output each subsequent table using the same settings and  figure out some way in which the first combined table could be generated but not visible.   Here is my attempt.  The first combined table uses \savetabu to save the settings and then each subsequent table uses \usetabu to retrieve them.  Unfortunately this does not work as I had hoped.  The columns do not line up as the output below (after the code) shows. Does anyone have a method of accomplishing this?  \documentclass{article}  \usepackage{tabu} \begin{document}  Output both tables together as one table and then output each individual table.  We had hoped that this would cause the subsequent tables to be the same width as the first since the first contains all columns of the subsequent tables but it seems that that does not work.  \begin{center} \begin{tabu}{ll}\savetabu{mytabu2} 1 &amp; 2 \\ 3 &amp; 4 \\ abcdefghijklmnopqrstuvwxyz &amp; 10 \\ 5 &amp; 6 \\ \end{tabu} \end{center}  \begin{center} \begin{tabu}{\usetabu{mytabu2}} 1 &amp; 2 \\ 3 &amp; 4 \\ \end{tabu} \end{center}  \begin{center} \begin{tabu}{\usetabu{mytabu2}} abcdefghijklmnopqrstuvwxyz &amp; 10 \\ 5 &amp; 6 \\ \end{tabu} \end{center}  \end{document}   Here is the output:
108609
I have a table that takes up a full page, but I want it to start on a page that already has some text and then continue onto the next page (i.e. it's ok if the table gets broken up and spans two pages). It is a simple two column table:  \begin{table}[h] \centering \begin{tabular}{| p{.20\textwidth} | p{.80\textwidth} |}  \hline foo &amp; bar \\ \hline  foo &amp; bar \\ \hline  ... \end{tabular} \end{table}   I guess I need longtable? How do I use it?
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?
11517
I want a table that is as wide as the whole page in a document with option twocolumn. The table has to be inserted on the bottom of the page, but that is not necessary.  I've tried:  \begin{table*}[b]   ... \end{table*}   But that puts the table at the end of the document instead of on the same page.  I also tried:  \twocolumn[   \begin{table}[b]     ...   \end{table} ]   But that gives me an error: ! Argument of \@xfloat has an extra }. Combining \twocolumn and the star mark gives the same error.  What's the right way to do this?
103113
Friends, I'm trying to generate a table in which I have all columns equally spaced (same width). In my case, the width for all columns would be the width of the widest column of the table:  \documentclass{article}  \begin{document}  \begin{tabular}{ll} a &amp; b \\ c &amp; Mary had a little lamb \end{tabular}  \end{document}   Any hints? :)
48621
\begin{table}[ht] \makebox[\textwidth][c]{     \begin{tabular}{ccccc}         \hline         \hline         [] &amp; [] &amp; [] &amp; [] &amp; []\\         [] &amp; [] &amp; [] &amp; [] &amp; []\\         \hline         \hline     \end{tabular} } \caption{test} \end{table}   I cannot run the above code, latex returned an error about missing number, but I can't see anything I am missing.  And the weirdest thing is that  \begin{table}[ht] \makebox[\textwidth][c]{     \begin{tabular}{ccccc}         \hline         \hline         [] &amp; [] &amp; [] &amp; [] &amp; []\\         \hline         \hline     \end{tabular} } \caption{test} \end{table}   This code works.  Anyone have any idea?
45769
I want to have a longtable like this:  \begin{center} \begin{longtable}{|p{2cm}|p{3cm}|p{7cm}|p{3cm}|} \caption{my caption} \hline 1 &amp; 2 &amp; 3 &amp; 4\\  \hline  \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline . . . 1 &amp; 2 &amp; 3 &amp; 4\\ \hline  \label{variability_impl_mech} \end{longtable} \end{center}   but when I try to compile this, I get this error: !Misplaced \noalign  when I write the caption after the last \hline, it works fine. I want to have the caption on top of my table but this error appears.
48198
I would like to be able to transpose a tabular(x) table like in the following example. It is not necessary to be completely automated, but I don't want to change the data order, which is a painful and stupid. By "not completely automated" I mean that e.g. the headers can be done seperately etc.  Let's see the MWE:  \documentclass{article}  \usepackage{booktabs} \def\Midrule{\midrule[\heavyrulewidth]}  \begin{document}  \centering  \begin{tabular}{*6c}\toprule \bfseries Name &amp; Alice &amp; Bob &amp; Chuck &amp; Dave &amp; Eve\\\Midrule \bfseries Sex &amp; Female &amp; Male &amp; Male &amp; Male &amp; Female\\\midrule \bfseries Age &amp; 18 &amp; 19 &amp; 20 &amp; 21 &amp; 22\\\bottomrule \end{tabular}  \bigskip  Which I want to look like  \bigskip  \begin{tabular}{*3c}\toprule \bfseries Name &amp; \bfseries Sex &amp; \bfseries Age\\\Midrule Alice &amp; Female &amp; 18\\\midrule Bob &amp; Male &amp; 19\\\midrule Chuck &amp; Male &amp; 20\\\midrule Dave &amp; Male &amp; 21\\\midrule Eve &amp; Female &amp; 22\\\bottomrule \end{tabular}   \end{document}     Note: I know that , but I would like to get it without expl3 (mostly because people would might use my code quite often have an old LaTeX installed and I cannot be convincing them to change this).