{tables} is about the tabular environment and related packages such as {array}, {booktabs}, {tabularx} and {longtable}. For questions about the table environment (i.e., about floating or positioning), use {floats} instead.

learn more… | top users | synonyms (2)

192
votes
16answers
112k views

How to add a forced line break inside a table cell

I have some text in a table and I want to add a forced line break. I want to insert a forced line break without having to specify the column width. Something like this: \begin{tabular}{|c|c|c|} ...
96
votes
21answers
10k views

Comprehensive list of tools that simplify the generation of LaTeX tables

Manually hacking tables in LaTeX is one of the less funny things when preparing a document. Naturally, there are quite a few tools that promise to simplify this. In fact, I have somewhat lost track of ...
83
votes
9answers
14k views

Beautiful table samples

I'm interested in learning about some nice-looking table samples. Colors can make a huge difference, and just providing some color to headers, background, or borders can dramatically change ...
60
votes
2answers
5k views

Which tabular packages do which tasks and which packages conflict?

I've read a couple of questions recently about tabular environments, and it seems there's a whole bunch of packages that do stuff in this field. I'd really like a summary of what each package does, ...
54
votes
6answers
44k views

Column and row padding in tables

How do you guys go about controlling column padding in tables? UPDATE To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like this ...
50
votes
4answers
14k views

Why should a table caption be placed above the table?

In the papers I read the caption in figure floats is placed below the figure and in table floats the caption is placed above the table. I recognize that this is a common style that a lot of people ...
47
votes
2answers
62k views

How to create fixed width table columns with text raggedright/centered/raggedleft?

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that \usepackage{array} ...
46
votes
3answers
2k views

Is there a tool to make a complicated Table like this one (“Auswahlliste” from “Pahl/Beitz Konstruktionsmethodik”)?

I’m developing a product as a part of my thesis for my university in Germany. We are supposed to use standard methodology for decision making. One of the tools is called “Auswahlliste”. (I don’t even ...
44
votes
1answer
10k views

Aligning numbers by decimal points in table columns

Let me begin by stating that I did google the answers (and I'll reference to them soon). Yet each of the resources I found discussed one particular method, I'm interested in a comparison of the ...
42
votes
2answers
2k views

Easiest way to delete a column?

I have a set of 10 tables and each has an extra column that I don't want. Specifically, these tables are descriptions of database tables exported by phpMyAdmin, and they all have a "MIME" column that ...
41
votes
2answers
5k views

Org-mode export to LaTeX: temptation or nuisance?

We are talking about Emacs and Org-mode: There are several advantages of drafting papers with Org-mode and to have them transferred later to LaTeX, e.g.: I'd like to avoid »programming while ...
39
votes
4answers
39k views

How can I have two tables side by side?

Suppose I have two tables that don't have many columns (3, for example). How can I position them side by side?
38
votes
5answers
35k views

How to break a line in a table [duplicate]

Possible Duplicate: How to add a forced line break inside a table cell In a table I would like to have a line break in the text inside a cell. Is there an easy way to do so, or do I have to ...
38
votes
1answer
823 views

Table in the shape of an arrow

Is it possible (and not too difficult) to draw a table in the shape of an arrow? I think it's best explained giving an example: I'd like to draw a table almost exactly like this. However, the 2nd, ...
37
votes
6answers
5k views

Best way to create an system of equations environment?

I am trying to write a few systems of equations, and I want the terms to be nicely spaced as below 2x + y + 3z = 10 \\ x + y + z = 6 \\ x + 3y + 2z = 13 Now, using ...
37
votes
3answers
55k views

How to force a table into page width?

I have the following table: \begin{table}[htb] \begin{tikzpicture} \node (table) [inner sep=0pt] { \begin{tabular}{ l | l } {\bf Symptom} & {\bf Metric} \\ \hline Class that has many accessor ...
36
votes
4answers
13k views

Make first row of table all bold

I'm trying to do something that I thought would be relatively simple but seems to be quite hard. I have a table with a number of columns, and I'd like to make all of the titles appear in bold text. ...
36
votes
3answers
11k views

How to create alternating rows in a table?

Sometimes you can see in books tables, that have alternating background color for rows in a table to support readability. How I can achieve this with LaTeX? And yes, I could put macros \odd and \even ...
36
votes
1answer
831 views

booktabs: What is the difference between \toprule and \hline

The horizontal lines in tabular environment can be constructed. What is the difference between \toprule, \midrule, \bottomrule and specifying horizontal line using \hline?
35
votes
2answers
1k views

Partially coloring cell background to fake histogram

Excel has a cool feature called "data bar" conditional formatting that allows the user to partially fill a cell background to create histograms based on cell contents. Here is a screen clip example ...
35
votes
3answers
45k views

How to vertically-center the text of the cells?

I have a simple table as follows: \begin{table*} \centering \begin{tabular}{|l|c|c|c|c|p{2in}|} ... ... \end{tabular} \caption{The factors the camera solver depends on to ...
33
votes
5answers
9k views

How can I automatically calculate sums in a LaTeX table?

Sometimes I would like LaTeX to automatically calculate sums (or other simple arithmetic) for me, eg. in a table. I would like to ensure that when I update the table, I don't accidentally forget to ...
31
votes
2answers
35k views

color only a cell of a table [duplicate]

Possible Duplicate: Color merged and regular cells in a table individually I tried to color only a cell of my table but I don't know how do it. I found the method to color an entire row.How ...
30
votes
4answers
32k views

How to rotate a table?

I have a table and I want to rotate it. The table has 3 rows and 4 columns, and I want to rotate the text inside this table as well. How can I do this?
30
votes
6answers
6k views

Footnotes in tables?

I would like to have footnotes in tables, but the \footnote command does not work inside a table environment. Googling one finds that this is a frequently asked question, at least in the UK. That ...
30
votes
2answers
4k views

multicolumn long table or enumeration

I would like to generate a multi-column table that wraps within columns of the document, and splits across pages. There are a couple of similar questions here How do I create a really long table in ...
29
votes
3answers
8k views

Why not use vertical lines ('|') in a tabular?

My question is a follow-up to the answer to a follow-up question, to be found here. ;) I'd like to know why one would advise against using vertical lines (via |) in a tabular (i.e. in ...
29
votes
3answers
30k views

Adding space between columns in a table

I notice that the space between each column of a table in LaTeX is not quite wide (at least for me). Is there any way to set this? I found the \hspace, but I don't get how to use this in the table. ...
29
votes
2answers
12k views

How can I reproduce this table with thick lines?

I'm trying to reproduce this table: (apologies for the terrible cameraphone pic) I don't know how to get the slightly thicker leftmost and topmost line. Here's a minimal example of what I have so ...
29
votes
2answers
14k views

Center column with specifying width in table (tabular enviroment)? [duplicate]

I have table that has long headers and I would like to specify width of the column, but also be able to remain it's centred position. Something like |c{0.30\textwidth}|. It is possible? How to ...
29
votes
2answers
49k views

How to specify the row height in LaTeX table?

I want to create a LaTeX table with three rows which have different row heights. How can I do this? The following code \renewcommand\arraystretch{2.4} \setlength\minrowclearance{2.4pt} seems make ...
29
votes
2answers
4k views

How to diagonally divide a table cell … properly?

There have been many threads discussing solutions to the task of drawing a diagonal line in a table cell. There are also two packets to do this, slashbox and the better looking makecell with its ...
28
votes
10answers
2k views

Methods to edit column order in an existing LaTeX table?

What is the best way of editing an existing LaTeX table? I need to swap the order of two columns and can't think of an efficient way of doing this. My table is a long creature of the following ...
28
votes
5answers
2k views

How to produce a list of prime numbers in LaTeX

I would like to write a LaTeX script that produces all the prime numbers between the numbers n and m, where n < m. How can I do this? I feel it shoud not be that hard, but I cannot seem to program ...
28
votes
1answer
21k views

How to add extra spaces between rows in tabular environment?

I couldn't find any option that lets me expand the vertical space between rows in tabular environment. For example, \begin{tabular}{c c} $f^{(n)}(x)$ & $f^{(n)}(0)$ \\ ...
27
votes
2answers
35k views

Changing the font size in a table

What's the recommend way of changing the font size in a particular table? Is there a better way than enclosing all values with, for example, the \tiny function.
27
votes
3answers
6k views

Professional-looking tables with alternating row colors?

Both the Booktabs documentation and the Small Guide to Making Nice Tables provide some nice rules-of-thumb for making professional-looking tables (e.g., no double rules, no vertical rules, etc.) Q: ...
27
votes
1answer
20k views

How do I fill table cells with a background color?

I'd like to fill the cells of a table with a background color. How can this be done?
26
votes
2answers
2k views

Insert libreoffice table as input

This question led to a new package: odsfile Suppose you have an localc spreadsheet myspread.ods and you want to insert the content of the range H4:I40 as a table into your latex document. I ...
26
votes
3answers
9k views

Diagonal lines in table cell

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} ...
26
votes
3answers
2k views

Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to ...
25
votes
3answers
24k views

How can I draw a horizontal line spanning only some of the table cells?

In a table, how can I draw a horizontal line that goes only through some of the cells? I mean a line like the one in the Foo and in the Bar area of this table: +----+-----+ |Foo |1 |2 | | |1 |2 | ...
25
votes
5answers
45k views

LaTeX tables: How do I make bold horizontal lines (typically \hline)?

The title says it all: In LaTeX tables: How do I make bold horizontal lines (typically \hline)?
25
votes
3answers
3k views

How can I make a table that takes up more than a single page?

I've got data that I need to include in a table, but there's a lot if it. I've played with the font size and table formatting as much as I can, but the table still won't fit on the page. Is there ...
25
votes
2answers
18k views

Vertically center cells of a table?

What is the easiest way to center align each row of table? I have a table column that contains an image and other cells in the same row contain text. I would like to know how to vertically center ...
24
votes
9answers
1k views

Which text editor to make tables scripts human readable

Suppose I want to edit a table moon & 456456456423423534 & 2342523 sun & 234324 & 3453 You see I have to enter a lot of spaces manually to align stuff. It is ok ...
24
votes
2answers
5k views

How to repeat top rows (column headings) on every page

I have a big table which contains hundreds of rows. I want to repeat the top two rows on every page of the table. How can I do it in TeX?
24
votes
2answers
1k views

Gradient color in one cell of a table

I'm trying to create a tabular and I'm facing the following small issue. I would like to make the background of one cell a gradient color. Is it easy to do that in LaTeX? And if so, how to do it?
24
votes
4answers
2k views

How to separate table content and table style

I want to know if there is a way to separate table / content for table style (think CSS). Like to have only data specification \begin{tabular} H1 & H2 & H3 & h4 \\ V1 & V2 & V3 ...
24
votes
2answers
519 views

Strike out a table cell

I'm trying to strike out cells in a table, without specifying the cell width. To do so, I looked at the code of colortbl as this seems to a very decent job with filling cells. Now I played around ...