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

13
votes
3answers
1k views

Copy table row n times

I would like to copy the row of a table, let say, n times, but unfortunately my sample below does not compile. It is my understanding that the \foreach command should copy what is in its argument but ...
11
votes
3answers
11k views

Footnote in table

I have some table like the following one and want to write some configuration using ´footnote´. \begin{table} \begin{center} \begin{footnotesize} \begin{tabular}{|l|l|l|} \hline ...
11
votes
1answer
2k views

Enumerate/itemize without margins in table cell best practice

I want to use an itemize or enumerate list inside a table cell. For this there should be no margin around the list. My question is, what is best practice to do this? I found different solutions for ...
5
votes
2answers
9k views

Set table position to top [duplicate]

some content \begin{table}[t] \begin{tabular}{c c c} tabular content \end{tabular} \end{table} \chapter{new chapter} The output is: First page: some content Second page: table centered ...
8
votes
2answers
3k views

tabularx inside a \newenvironment

There's something wrong with this code: \newenvironment{Tbl} {\begin{tabularx}{\textwidth}{|l|X|} \hline} {\end{tabularx}} but this is fine: \newenvironment{Tbl} {\begin{tabular}{|l|l|} \hline} ...
100
votes
9answers
21k 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 ...
46
votes
4answers
50k 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?
37
votes
6answers
6k 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 ...
16
votes
8answers
13k views

LaTeX table capabilities

This might be a proper question for community wiki. How can various text processor (like Word or Writer) table capabilities be achieved using LaTeX? For example, can I achieve: multicolumns and ...
36
votes
1answer
27k 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)$ \\ ...
20
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 ...
34
votes
2answers
46k 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 ...
12
votes
3answers
7k views

Example of fancy table using TikZ package

Can anyone share me several fancy table templates? I want to make this thread like a reference so that each time I need a template, I could just go here. If you can, please provide a screenshot for ...
38
votes
5answers
43k 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?
11
votes
3answers
6k views

How can I center all tables in a document?

Background Would like to center all tables within floats, without having to add \centering to each table. Ideas Tried the following: \let\originaltabular\tabular ...
12
votes
3answers
3k views

Horizontal row separation line in tikz matrix (like \hline in tabular)

In this question tikz-matrix-as-a-replacement-for-tabular a nice solution was given to let the matrix in tikz behave like tabular. In this solution cell/.style={rectangle} was used to draw lines ...
5
votes
3answers
4k views

How to vertically center text with an image in the same row of a table

I want to create a table with multiple rows of the following form: a cell that contains text and then multiple cells that contain images. The text should be vertically centered and the contents of ...
10
votes
2answers
1k views

Strange line spacing effects in longtabu

I got some strange effect with longtabu: As you can see the line with λ seems to be closer to the above line than to the one below of it. I cant’t figure out why … This is the code with which I ...
10
votes
3answers
11k views

slashbox alternative [duplicate]

Possible Duplicate: Diagonal lines in table cell Is there a better way to label both axes of a table at the same time rather than using slashbox? It looks kind of ugly.
8
votes
3answers
4k views

Automatic table row numbers

Is there any way to get automatic row numbers in table? For example, if I define table contents as \begin{tabular} % black magic column definition \rownumber & foo\\ \rownumber & bar\\ ...
15
votes
3answers
1k views

Expandable version of \InputIfFileExists or \IfFileExists

From this question: Cannot use \toprule when doing \input inside tabular -- why? I know that everything inside the tabular environment should better be expandable. The MWE below suggests that ...
14
votes
1answer
4k views

Cellcolor overwrites partial horizontal lines (\cline)

So I need to make a colored table with multirows, together with the use of partial horizontal lines. I used \cline which does not work: the \cellcolor-command overwrites the line. This question told ...
10
votes
1answer
2k views

How to align picture top left in a table?

is there a way to create a table with 2 columns, in the left column should be some text, in the right column should be a picture. The problem is - to align both to the left, top corner. The image ...
3
votes
1answer
1k views

longtabu and floats: wrong table breaks on pages with floats

I noticed that the tabu package seems to have problems with its longtabu environment, if it is placed on a page, where a float already is placed. Consider the following MWE: ...
42
votes
2answers
50k 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.
44
votes
3answers
13k 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 ...
19
votes
2answers
3k views

How to generate a table of trigonometric functions that can be broken across pages?

Consider the following screenshot. The features I want to have are: I can shrink the page size and the table is allowed to break across pages. The background of odd rows must be different from ...
25
votes
2answers
2k 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?
12
votes
3answers
1k views

Generating a table of glyphs with XeTeX

I am trying to get XeTeX to generate a table of all the possible glyphs of a given font, but can not figure out how to make XeTeX know how many glyphs the font has, so I have to specify an exact ...
30
votes
2answers
6k 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 packages to do this, slashbox and the better looking makecell with its ...
15
votes
1answer
754 views

Multi-page with Tabulary?

I know that you can combine tabularx and longtable functionality with either ltxtable or ltablex, but is there something similar for tabulary? My searching has come up dry when looking for any way to ...
19
votes
2answers
38k views

Add notes under the table

I'm using the latex package apa6e because the apa package isn't using APA style version 6 yet. Now I'm trying to add a table with notes right underneath it, like in this table for instance: Since ...
19
votes
2answers
20k views

How to include enumerate in tabular?

I would like to have text in one column table with multiple rows, but I need to include an enumerate in one cell. I get errors and read on the Internet the problem is in combining environments with ...
14
votes
1answer
15k views

How to rotate text in multirow table?

I have a big table with a problem, when I want to rotate the text in a \multirow cell, the text is placed outside and is bigger than the dimensions of the cell, I took some advice from here, ...
12
votes
2answers
16k views

Including Large Tables in a beamer Frame

What is the best way of including large tables in a beamer presentation?
9
votes
2answers
8k views

Automatically stretch table to evenly fill horizontal space?

I want to have my tables fill the entire width of the page (i.e., \textwidth). So far, the only thing I've managed to come up with is: \renewcommand{\tabcolsep}{4.4pt} By manually trying different ...
14
votes
1answer
5k views

Coloring columns in a table with colortbl and booktabs

I have created a rather complicated table with some columns that I want to color. For the table, I chose the booktabs and tabularx packages. For coloring the columns, I use colortbl. The problem that ...
4
votes
1answer
3k views

Table with multiple merging

Most of the places, examples for merging of cells in tables are given. But, I could not find a merging of cells in complicated fashion as shown below. This question may summarize all the possible ...
15
votes
1answer
716 views

Tables: Colouring odd/even mixed up

I have a huge document (around 100 pages) and a lot of tables in it. I used \usepackage[table]{xcolor} \definecolor{lightblue}{rgb}{0.93,0.95,1.0} \rowcolors{1}{white}{lightblue} % odd = white, even ...
13
votes
4answers
3k views

Why can't I wrap \rowcolor in \only? (Beamer)

See the following minimal example: \documentclass[table]{beamer} \begin{document} \begin{frame}{Boo} \begin{table} \centering \small \begin{tabular}{rcc} \only<1>{\rowcolor{green}}Hey & ...
11
votes
3answers
306 views

How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?

I am trying to build a table, and inside the tabularx environment I would like to have a loop, something like (here is a MWE): \documentclass[10pt,a4paper]{article} \usepackage{tabularx} ...
9
votes
2answers
659 views

Using an image as a table

I have an image containing tabular data and would not like to convert this to a real table. What I do want is for this image to have a proper caption and be included in the listoftables. Is it ...
11
votes
2answers
2k views

Misplaced \omit. \multispan with \newcommand

I'm trying to build my own cookbook-style, which has an ingredient makro. Sometimes the ingredients should be seperated and have a headline, so I tryed with an optional argument. A minumum example ...
11
votes
1answer
268 views

Error with table

\begin{table}[ht] \makebox[\textwidth][c]{ \begin{tabular}{ccccc} \hline \hline [] & [] & [] & [] & []\\ [] & [] & [] & [] & []\\ ...
9
votes
5answers
822 views

problem with using loop inside the tabular environment

I am having trouble with using a loop inside a tabular environment: \newcounter{it} \setcounter{it}{0} \begin{tabular}{ll} \loop\ifnum\theit<4 \addtocounter{it}{1} Q & A\\ \repeat ...
10
votes
6answers
828 views

How do I expand a macro into a tabular head?

I would like to be able to define a macro that can be used in the tabular definition. How can I do this? This does not work: \documentclass{article} \begin{document} \gdef\buildtabularhead{|||} ...
39
votes
3answers
38k 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. ...
12
votes
1answer
2k views

How to draw lines around multiple table cells

\documentclass[fleqn,12pt,a4paper]{article} \usepackage{tabularx} \begin{document} \begin{table}[ht] \begin{minipage}[b]{1 \linewidth}\centering \begin{tabular}{|c|c|c|c|c|} \hline ...
30
votes
3answers
41k views

Is there a way to slightly shrink a table, including font size, to fit within the column boundaries?

I have a table that is just a little too wide for a 3.33" column. Is there a way to simply shrink the table a little to make it fit? I'm OK if the 10pt font becomes 9pt-something. Here is an example. ...
29
votes
1answer
22k 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?