{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)

30
votes
2answers
22k 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 ...
10
votes
1answer
1k views

Align equals sign in table

I am trying to align an equals sign between two sets of cells. The first table here doesn't want to align, whilst the second table does. Is there a more elegant way of doing this? ...
8
votes
5answers
5k views

Table will not center (and it is spilling off the right side of the page)

I just generated this table using Excel2LaTeX: Even though I enclosed the table in \begin{center} the table did not get centered. The table still sticks out the right side. Is there somehow that ...
22
votes
3answers
6k views

Highlighting table cells

I have a large (13x13) table in which I need to highlight a subset of cells. I know that I can set a background color to those cells using colortbl or xcolor. But I need to highlight the table without ...
13
votes
2answers
7k views

Raggedleft paragraph in a table

I am trying to typeset a table of two columns, where each column consists of paragraphs and the paragraphs in the right hand column are set raggedleft. Here is a minimal example of the code I thought ...
42
votes
4answers
18k 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. ...
10
votes
1answer
1k views

Create a vertical line in a table that spans a range of rows but not all rows

I'm interested in methods to create a vertical line in a table that spans a range of rows but not all rows. I've found one solution below, but is there another solution such as \cline which allows ...
4
votes
2answers
776 views

Alignment in table

I'm creating a table but I'm not getting the correct alignment in the last row of the table. It's a multirow and muticolumn example. Of course, I'm putting some fictitious information and data in the ...
18
votes
2answers
6k views

How do I set a maximum column width?

My problem is that I have many tables in my document with the same layout, and I want to specify the maximum width of a specific column to be 5 cm. I tried with p{5cm} but it make the column fix 5 cm ...
13
votes
1answer
5k views

Framing cells in a table

I want to add borders to a set of cells in a table. But not just a border for the single cells because then I imagine I could just put the cell content in an fbox. Instead I want a frame which ...
5
votes
1answer
2k views

LaTeX: Align first table line with \item contents.

Consider this example: \begin{enumerate} \item Blablabla bla bla bla. \begin{tabular}{l} Lorem ipsum dolor sit amet.\\ Consectetur adipiscing elit.\\ ...
5
votes
1answer
9k views

How can one make a table without borders?

How can I make a table without borders? Thanks!
3
votes
1answer
778 views

Hierarchical Table Help

I am trying to recreate the "Not Enough" table from the Example Tables 1 on slide 12/16 from here. This is my current code, its close but not right. How do I get the column headers to stack word over ...
3
votes
2answers
291 views

Getting tabulars to line up in the end of two columns

In the following document: \documentclass[twocolumn]{article} \begin{document} \begin{tabular*}{\linewidth}{|c|}\hline test\\\hline\end{tabular*} \vfill \begin{tabular*}{\linewidth}{|c|}\hline ...
7
votes
2answers
14k views

Error: extra alignment tab has been changed to \cr

I am using the ACM SIG template and trying to create a table of 4 columns. I get the error mentioned in the title of the question. I know the standard reasons why this error can occur. But my ...
2
votes
1answer
2k views

\newline not working with booktabs?

A while ago I had a question about having multi-line strings in a table cell ( http://tex.stackexchange.com/questions/3748/in-cell-newlines-in-tabular-environments). I remember seeing it working but ...
6
votes
1answer
576 views

How to display some text based on a condition inside a tabular environment?

I defined a variable \@afwezig that holds people that were not present at a certain meeting. \long\def\@afwezig{} \def\afwezig#1{\def\@afwezig{#1}} Now I want to make the header of the meeting ...
16
votes
3answers
14k views

How to rotate landscape table page in PDF?

Currently I am using \usepackage{rotating} \begin{sidewaystable} \begin{tabular}...\end{tabular} \end{sidewaystable} to typeset landscape tables, which works great. But I want to rotate that page ...
34
votes
5answers
11k 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 ...
14
votes
1answer
7k views

in-cell newlines (in tabular environments)?

I'm working on a table containing multi-line cells and I wonder if the following concept is supported by LaTeX. The concept itself is simple: allow a cell to span multiple lines by increasing the ...
4
votes
1answer
942 views

Puzzling error while using sunitx (in a tabular environment)

I've been working on writing a contingency table in LaTeX (I've prepared myself for a long battle to get multi-line and multi-column cells to appear as I need). \usepackage{booktabs} ...
32
votes
5answers
58k 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)?
5
votes
1answer
339 views

ConTeXt TABLEs width

I am using the "natural tables" in ConTeXt: \bTABLE \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR \eTABLE How can I setup the table that the whole table uses a certain width? ...
4
votes
2answers
2k views

How to avoid exceeding TeX capacity when using multi-page tables?

I'm using longtable package (together with xcolor for alternating row colors and booktabs for elegant table headers) to generate a huge table. And by huge, I mean it has more than 900 lines and takes ...
4
votes
3answers
632 views

Always a space before embedded figures in table - how do I get rid of it?

I am placing figures in a tabularx and I am having trouble getting them to embed properly. I keep getting an annoying spacer before the figure... Now if only this space could be split evenly before ...
55
votes
4answers
21k 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 ...
10
votes
4answers
1k views

Use column-separator & (ampersand) inside \newenvironment

I'd like to define a grammar environment which basically wraps a tabular environment. Inside the grammar environment I'd like to use an environment called production to insert rows. Example: ...
20
votes
4answers
9k views

How to align table headers differently than all other table cells?

I'm using fixed-width columns with my table, and using both longtable and booktabs packages (as well as tabularx because of \newcolumntype command). In my table, I'll have lots of number data in ...
8
votes
1answer
3k views

How can I prevent hyphenation in a table column?

I have a table (tabular) with some fixed width columns, and I'd like to prevent a hyphen being inserted (preferring a line break to be inserted prematurely). The sample table's content is below. ...
0
votes
2answers
255 views

How can I vertically center multiple cells in the same line of a table?

For example: I've only found answers that involve centering only one column, such as this one.
49
votes
4answers
55k 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?
2
votes
1answer
865 views

siunitx: centering table headings (or other text contents)

I'm trying to center-align the two-line heading of the rightmost column of the following table. Given that I use decimal point alignment, I guess the centre of the headings should be aligned with the ...
6
votes
2answers
2k views

Indent all but first lines of paragraph.

Inside of a table column with a width determined by a p{5in} tag, I want all but the first line of text to be indented. Is there any way to achieve this? Doing it by hand would make later edits ...
9
votes
2answers
8k views

Numbers in tables: align by decimal point *and* flush right?

This is a followup question to siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers and Aligning numbers by decimal points in table columns. While ...
8
votes
2answers
3k views

siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers

This is a follow-up question for Aligning numbers by decimal points in table columns. User lockstep provided this solution: \usepackage{siunitx} \begin{document} \begin{tabular}{S[table-format=3.2]} ...
50
votes
2answers
14k 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 ...
15
votes
6answers
1k views

Creating Table: On Mastering LaTeX

Guys, I am one the process of mastering LaTeX, so that later when times come I shall be fully prepared to typeset almost anything without thinking twice. So during this awesome process, I am now ...
15
votes
3answers
2k views

Problem with redefining Tabular environment with the \renewenvironment ‎command‎

In a book I'm typesetting, I want the tabular environment to be in footnote size and the other body of the book to be in normalsize font. To do this, I've tried something like the following: ...
230
votes
17answers
150k 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, i.e. something like the following: ...
6
votes
5answers
2k views

Lists in Tabular Environment

So I'm writing up a CV and I would like to use the nifty itemize environment to list some things within a tabular environment. Unfortunately, things end up looking a bit this, which isn't at all ...
8
votes
2answers
1k views

Padded Left Align for Table Columns

I have a table whose column headings (centre aligned with \multicolumn{1}{c}{Foobar here}) are wider than the left-aligned data. This looks somewhat odd, as there are large right-margins in each ...
17
votes
5answers
8k views

Tool for manipulating LaTeX tables (HTML to LaTeX)

I am wondering if there is any tool that can help me work with tables in LaTeX. Specifically I'd like to be able to import HTML tables (or small Excel tables) into LateX Are there tools that can help ...
2
votes
2answers
856 views

table notes in memoir

How do I have footnotes in a table while using memoir? I tried ctable, but I get the following errors: /usr/local/texlive/2008/texmf-dist/tex/latex/hyperref/hyperref.sty:4022: No room for a new ...
5
votes
1answer
1k views

Embedding large equation in tabular

When I put an equation in a tabular, it gets vertically compressed. How do I prevent that?
36
votes
6answers
8k 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 ...
29
votes
1answer
23k 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?
4
votes
1answer
3k views

How to use \abovetopsep (to add space between a table's caption and tabular part)?

I read in the documentation of the booktabs package that \abovetopsep can be used to add some space between a table and its caption (instead of the lower-level \vspace{}). However, the exact placement ...
10
votes
2answers
266 views

clarification on the use of @{} with table headings?

Most examples I've seen are like this: \begin{tabular}{@{}l r r@{}} that is, with one @{} to the left of first column specifier and another @{} to the right of the last column specifier. Yet the ...
42
votes
5answers
46k 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 ...
19
votes
4answers
4k views

What table tools/packages do you use?

Making tables in LaTeX can be painful. All you need is a semi complex table with cells that have to span multiple rows/columns. What tools do you use to get around this complexity? Tabular? Tabularx? ...