Talk:LaTeX/Tables

Gratitude
This is one of the best guide for latex, congratulation to authors


 * I can only agree with this. Thank you! TheFibonacciEffect (discuss • contribs) 07:52, 17 October 2021 (UTC)

Table span
Is it possible to let a table span multiple pages?--Cinquero 16:03, 14 February 2006 (UTC)


 * Yes, but you use a special environment (e.g. "longtab" or "supertab") instead of tabular --Mcld 22:49, 21 March 2007 (UTC)

Praise
If this page weren't here I'd probably go crazy. A+

Missing wrapped.tex
Where is "tutorial4/wrapped.tex wrapped.tex"?

Tutorial4
Tutorial4 is here http://www.andy-roberts.net/misc/latex/latextutorial4.html — Preceding unsigned comment added by 82.148.12.219 (talk • contribs) 15:33, 12 November 2006 (UTC)

Text wrapping and {tabular}
For the text wrapping, specifying the whole table width with:

\begin{tabular}{width}[pos]{cols}

is probably the better solution than to specify the columns with something like {r |p{3cm}|l|l l} as then the space is distributed better. Don't want to rewrite that whole section though, maybe just note that the tabular can be opened like that too. — Preceding unsigned comment added by 209.151.140.84 (talk • contribs) 18:23, 6 April 2007 (UTC)

indent problem
I'm experiencing this problem: I have a table with a very long column in a report style. I have used the tabular* solution with the fixed table width "\textwidth" ([]. The problem is that the table is indented like the first line of a paragraph. So, if I give it a "\textwidth" width, the table will stretch out the right side. Is it possible to give a width like "\textwidth-\parindent"? — Preceding unsigned comment added by 87.21.93.176 (talk • contribs) 20:58, 12 June 2007 (UTC)


 * There is LaTeX/Q&A for this... if you just want to remove the indentation, then use \noindent just before your table. Wouldn't it be better to make it float?? Alessio Damato 16:47, 13 June 2007 (UTC)

Resize problem
I tried the method of resizing a tabular environment with as suggested on this page but it didn't work. Please verify! — Preceding unsigned comment added by 144.82.240.5 (talk • contribs) 15:17, 24 July 2007 (UTC)


 * I just used the resizing. Works great. Thanks! I used \begin{tabular*}{\textwidth}{|p{0.2\textwidth}|p{0.8\textwidth}|} for two columns (in the text it says $$p$$ may need tweaking; if you use \textwidth you are relatively safe.). --161.116.83.135 09:56, 18 September 2007 (UTC)

\usepackage{graphicx}
 * It might be useful to state that you need to include the graphicx package in the preamble to use the \resizebox command:

Style of tables
All LaTeX books have the weakness to focus on vertical lines too much. They are much discouraged in scientific writing ... something one is not necessarilty trained about. Please talk more about how to present tables properly and talk more about hhlines and cline. This may also help to get LaTeX across to the user more easily and is an essential advantage when compared with word. Smoe 08:35, 27 August 2007 (UTC)


 * well, edit the page according to your thoughts without any problem. Add some examples of style, too. Alessio Damato 20:28, 27 August 2007 (UTC)


 * There happens to be an excellent LaTeX package and "thought provoking" essay on the subject of vertical "rules" in tables—read the essay/documentation for booktabs here. I've been planning to include this package here, I'm just too busy at the moment. I'll do it someday in the next week or two (unless someone is antsy and wants feature it here). Other examples that use vertical rules should not be modified, since I'll respect other's decision to use these (I never use vertical rules myself). +mt  05:08, 28 August 2007 (UTC)

Exporting tables from spreadsheet programs
I would like to see exports from spreadsheet programs here on the page and I am aware of an OOo export as well the wonderful gnumeric export (exports with formatting etc. but is editable also). This might be easy and enough for most users. Here are the links: gnumeric, Calc2LaTeX, Excel2LaTex


 * I support this. Excel2Latex just saved me a lot of time ... Goetz (talk) 00:10, 13 November 2009 (UTC)

Tools
If there are any tools that can be used to generate latex tables or convert 'what yo see is what you get' tables into latex (eg gnumeric, calc2latex), it would be nice to list them here at the end (similar to what is done in "Bibtex" section... — Preceding unsigned comment added by 76.21.231.169 (talk • contribs) 22:37, 10 January 2008 (UTC)

The tabular* environment - controlling table width
in the example with @{...} construct there are second and third column aligned to the right instead of center. Why is it? How should it be correct?

The tabularx enviroment - X specification
I got an ugly error when trying to use the X cell specification because I didn't realize it was the CAPITAL X. If this is general, and not because of me setting up something in a corky way, maybe this should be made more explicit in the text..? (I use tex live and kate)


 * Please re-read "except that it has a new column specifier X (in uppercase)" - should be clear? Bumbulski (talk) 19:57, 29 August 2009 (UTC)

tabularx and \arraybackslash
In the discussion of tabularx, it says "...\raggedright\arraybackslash) as described previously." I don't see any previous discussion of this, although maybe I'm misunderstanding what is being said to have been described. My assumption is that there was supposed to be some discussion of \raggedright or of the need for \arraybackslash after the \raggedright (the latter apparently because \raggedright redefines \\, although I don't quite follow). [BTW, I have a login, but I can't remember my user name :-(.] 128.8.89.68 (discuss) 18:55, 19 May 2011 (UTC)

Multiline braces grouping table cells?
Hullo! Does anyone here know how to do the following within a table? Where each of One..Five are in their own cells, and the two Groups are in multirow cells. (The below is bodged together with math arrays.) I'm trying to get the braces to line up and be of similar thickness.

$$ \left. \begin{array}{l} One \\ Two \\ Three\\ \end{array} \right\} Group $$

$$ \left. \begin{array}{l} Four \\ Five \\ \end{array} \right\} Second Group $$

I've tried just using larger normal braces, e.g.: ...which is okay so long as each grouping is of the same number of rows, but when they're different, and I use  and   (for example), the braces look very different.

Any help would be very much appreciated!

Thanks. &mdash; Sam Wilson ( Talk &bull; Contribs ) &hellip; 06:44, 23 October 2008 (UTC)

Well, I'm using a slightly-okay method, which still doesn't quite align things correctly if there's multiple different-sized groups:

If anyone's got a better idea, I'd love to hear it. &mdash; Sam Wilson ( Talk &bull; Contribs ) &hellip; 07:12, 23 October 2008 (UTC)

Try this, it works for me:

you need to use the invisible \right. to close the \left\{.

colors, line types
I think it would be useful to mention table cell coloring using colortab or colortbl. Also you could mention the arydshln package which allows dotted/dashed vertical lines. In linguistics, the dotted vertical lines are necessary in Optimality Theory tableaux to show that the ordering of constraints (displayed in columns) is not strictly ordered. Grayed out cells show that the data in the cells are irrelevant (although it is becoming less popular to use this currently because it doesnt photocopy so well). Anyway, knowing how to make a table in LaTeX is worthless for me if I can't get the dashed vertical lines. peace 76.119.228.130 (talk) 08:19, 18 January 2009 (UTC)

Scaling the size of a table is simple with a construct like this:

\scalebox{0.5}{ \begin{tabular}{|c|c|c|c|} \hline unit & A [x] & B [y] & C [z] & \hline value& 100  &  10150 & 1904  & \hline \end{tabular} }

compared to the normal one

\begin{tabular}{|c|c|c|c|} \hline unit & A [x] & B [y] & C [z] & \hline value& 100  &  10150 & 1904  & \hline \end{tabular}

also works in tables, I use it to adjust the final layout if I want to have a certain table to appear on a certain page, it's like scaling images... just try it, i cannot upload images at the moment

Mentioning how it is possible to color complete columns
It is not mentioned that it is possible to colour a complete column with the \columncolor command in the column specifiers. For example: >{\small \columncolor[gray]{0.9}}c

surrounding space
I haven't found a single page yet that explains how to manipulate the space above and below a table definition. By default, for instance, an inline tabular in a paragraph will add lots of unwanted vertical space above it, but there do not seem to be any explanations on how to set that space to 0pt

What are tabular's extended parameters? which apply? which don't? That information belongs in an explanation on the tabular environment, but is still missing here (I can't add it, since I just don't know, I'm just scowering the internet trying to find out how to tell latex what I want it to do) — Preceding unsigned comment added by 86.89.151.209 (talk • contribs) 09:18, 7 September 2009 (UTC)

Can someone add more about rotating columns?
here is a good source for rotating individuals columns: http://andrewjpage.com/index.php?/archives/24-Latex-tables-and-rotated-text.html

Can somebody add something similar to this article? If no one does it, I will do it myself once I find a little bit of time.

Cheers --DFRussia (talk) 06:21, 7 February 2010 (UTC)

Commentsunder table
Hey, I search for an hour now, how to add a comment under a table, which has a smaller size and has the same width. In my opinion, such comments are necessary for any table which will be published or is slightly more complicated. It would be nice, if someone could add this to the Wiki - as I say, dunno how to do it.... Thanks and great work so far! —The preceding unsigned comment was added by 131.220.108.110 (talk • contribs) 26 May 2010 (UTC)


 * Take a look at Table 1 at LaTeX/Floats, Figures and Captions, does this do what you would like? Thenub314 (talk) 15:32, 26 May 2010 (UTC)


 * Maybe what you want is threeparttable? — Preceding unsigned comment added by Furd (talk • contribs) 13:44, 26 July 2010 (UTC)

Suggested topics
Jodi.a.schneider (talk) 17:58, 8 December 2010 (UTC)
 * Table vs Tabular, Table*
 * Interaction of 'sideways' with other features
 * This is the kind of info I mean. Jodi.a.schneider (talk) 18:09, 8 December 2010 (UTC)

Defining Identical Comments

 * The {str} here needs clarification: "It is possible to define many identical columns at once using the *{num}{str} syntax." Probably another example or two would help. Jodi.a.schneider (talk) 18:06, 14 December 2010 (UTC)
 * An example to draw from. Jodi.a.schneider (talk) 18:11, 14 December 2010 (UTC)

rendering to PDF distorts source code formatting.
Hi all. When wikibook renders LaTeX wikibook to PDF, LaTeX code formatting gets distorted. I mean

becomes

any ideas why this is happening?

This is an important problem as the outpup PDF doesn't look great because of this. — Preceding unsigned comment added by Condmatstrel (talk • contribs) 15:40, 23 April 2011 (UTC)

table* Description
It would be nice to mention that the difference between table and table* floats is how thy handle multi column documents. In a two column document table will try and keep the table within a single column, but table* will span both columns. The only online reference to this I could find was in German: http://www.weinelt.de/latex/table.html Commdweeb (discuss • contribs) 16:21, 1 September 2012 (UTC)

Defining multiple columns
There is apparently a minor discrepancy between the code and the image, since FC Copenhagen in the image has only lost 2 games, while in the code they have lost 3.... — Preceding unsigned comment added by 80.63.85.146 (talk • contribs) 10:52, 27 November 2012 (UTC)

Temperature
Consider using °C instead of C. — Preceding unsigned comment added by 84.163.134.86 (talk • contribs) 15:54, 3 December 2012 (UTC)

Table caption should be on top
In the example in the section Floating with table, the caption should be above the tabular environment, according to the academic writing guidelines. Click here for some elaboration on the topic.

82.95.71.184 (discuss) 14:09, 12 January 2013 (UTC)

Should tabu be used, or not?
I find the paragraph about the tabu package in the introduction confusing. I basically read it as "use this package, which makes everything better, but if you run into bugs, you're on your own", which does not help newcomers at all. Also, it does not say anything about which version is the "old" version and which is the "new" version, or how the syntax has changed, or give any examples. The StackOverflow reference link advises not to use this package, but the discussion is from 2013. So should be used, or not? --Rohieb (discuss • contribs) 01:20, 27 January 2017 (UTC)


 * The author of tabu said that no bugs will be fixed and a new version willhave a different syntax. That is still the current situation. There is no new version of tabu. Use it at your own risk. If you are a newcommer, this slast sentence directly translates to 'do not use it'.--Johannes Bo (discuss • contribs) 08:33, 29 January 2017 (UTC)


 * It's 2019, tabu is still unmaintained, and has issues with newer versions of the Latex kernel[1 ]. It really should be removed from this page. --Mjog 120.17.66.75 (discuss) 00:02, 26 March 2019 (UTC)

Rewrite needed?
In my opinion, the page is too bloated and complicated. The most useful information, how to typeset good and professional looking tabular material is at the bottom. Any thoughts by other users? --Johannes Bo (discuss • contribs) 08:07, 5 November 2017 (UTC)


 * Agreed. The way to do it properly should be up the top, and all of the odd corner cases should be below that, on a separate page, or removed completely. --Mjog 120.17.66.75 (discuss) 00:04, 26 March 2019 (UTC)

Bold table rows
It is explained how to make a table column bold. How do I make a table row bold? — Preceding unsigned comment added by 193.63.222.186 (talk • contribs) 12:42, 5 January 2018 (UTC)

Bug?
I've noticed that under Manually broken paragraphs in table cells heading there is some code (\begin{center}) displayed outside a code block. When I tried to fix it, it causes most of the code block to stop rendering. Can this be fixed or is there a bug in wikipeda? This is my first time trying to edit a wiki so I have no idea what I'm doing T_T --TomMaxwellMans (discuss • contribs) 05:05, 26 September 2020 (UTC)

tabu shouldn't be taught to beginners
This section teaches beginners how to use the package tabu for multipage tables. Since tabu is no longer maintained, you should teach them how to use longtable instead. Adrianmn1110 (discuss • contribs) 22:26, 16 September 2021 (UTC)

More information on how to resize tables
I found a useful stackexchange post to resize tables. I can't add it because it triggers the spam filter. Here it is if a more experienced user also finds it useful, he or she may add it as a reference for further reading. — Preceding unsigned comment added by TheFibonacciEffect (talk • contribs) 08:13, 17 Octoboer 2021 (UTC)