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

learn more… | top users | synonyms (2)

14
votes
2answers
3k views

Set table background hatched and shaded using tikz

I am looking for a convenient way to set the background of tabular cells. I'd like to do two things: (1) Set the background shaded in a color (2) Set the background hatched I learned that the TikZ ...
14
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 ...
14
votes
2answers
253 views

How to set tikzmarks with \noalign at the edge of tabular rows

I'm trying to improve the lines in a tabular with colored rows (lines above a colored row can disappear in the adobe reader at some zoom levels) by redrawing the line above a row after the row itself ...
14
votes
2answers
2k views

Align Equations Over Multiple Tabular Rows

I'm trying to set up a table with some equations in it, however I would like the equations on multiple rows to be aligned properly. So far I have \begin{tabular}{cc} \hline \multicolumn{1}{l}{Header ...
14
votes
1answer
12k views

Change caption font size

I want to change the font size of a single rotated table caption (definitely not all the captions in all my tables/figures) Right now I can wrap the text inside the \caption around a \scriptsize{} ...
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 ...
14
votes
1answer
5k 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 ...
14
votes
3answers
1k views

How do I make a square table in LaTeX?

How can I make a perfectly square table in LaTeX? Each cell will just have a single character in it. I'm trying to print a pretty tabula recta as shown below.
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 ...
14
votes
1answer
252 views

Tabular inside tcolorbox breaks beamer \pause?

Consider the following code: \documentclass{beamer} \usepackage{tcolorbox} \begin{document} \begin{frame} some text before \pause \begin{tcolorbox} \begin{tabular}{cc} cell1 & ...
13
votes
5answers
2k views

What is the proper way to create a horizontal table?

I want to have a horizontal table, like this: However, when using the usual method of creating a table, it quickly becomes a pain having to pre-define the number of columns (especially since I ...
13
votes
5answers
699 views

Alignment in inline math

I want to enclose a tabular environment with a bracket, inside an enumerate environment, and be aligned to top. In the following example: \documentclass[a4paper]{article} \begin{document} ...
13
votes
2answers
38k views

Combine 4 cells in a table

Here is some simple table - I cannot upload, because I'm just a guest. I want to merge 4 cells. I mean I want to combine three "this" area in this table. I thought I have to use multirow and ...
13
votes
4answers
269 views

How to clarify and enliven a dense table

I have a table that is quite dense: Any ideas how could make this easier to read, specifically in terms of distinguishing between different rows and columns? Was thinking Excel-style cell shading ...
13
votes
3answers
1k views

How can I create this game-tree in Latex?

I have the following figure: As of now I create this in Word/Powerpoint and paste the screenshot in a LaTeX file. Is there a way to create this natively? Also, what would be the advantage of doing ...
13
votes
4answers
1k views

Drawing Young tabloids

I would like LaTeX to produce output like the following (without the 2 a so called Young tabloid), ideally by writing \ytabloidshort{123,56} (using one character per cell, ideally allowing ...
13
votes
3answers
826 views

How to make a row in a table shorter?

I have a row of a table (tabular) that has small text (tiny). I would like to make this (first) row shorter, either automatically (automatic height) o̶r̶ ̶m̶a̶n̶u̶a̶l̶l̶y̶ ̶(̶s̶e̶t̶ ̶a̶ ...
13
votes
2answers
17k views

Including Large Tables in a beamer Frame

What is the best way of including large tables in a beamer presentation?
13
votes
3answers
13k 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 ...
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 ...
13
votes
5answers
524 views

LaTeX Tables: Cell value color based on its sign / conditional cell color

I've a long LaTeX document with many tables. Now I want to show negative values in cell in red color. I wonder how to do globally. My MWE is below: \documentclass{article} \begin{document} ...
13
votes
2answers
2k views

coloring entire row of tabular*

I would like to have the first row of all my tables colored with a certain color (below yellow) but somehow below thing is not working as expected This: \documentclass[a4paper, 12pt]{report} ...
13
votes
2answers
249 views

Writing descriptions of columns of table

How do you do table like this? I don't need coloured background and blue borders. This is what I have. Looks terrible. And doesn't even fit on page. \documentclass{article} \usepackage{polski} ...
13
votes
2answers
16k views

How to make double cline in tables?

I want to draw a double cline in a table where the first column is multirow With double \hline I can draw a full double horizontal line but double \cline{i-j} seems to have the same effect with ...
13
votes
3answers
2k views

Using \underbrace with table columns

I have the following code: \begin{displaymath} \begin{array}{|c|c|c|c} p & q & p\lor{}q & p\land{}q \\ \hline 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 ...
13
votes
5answers
679 views

Editing *existing* multipage TeX tables in a spreadsheet-like interface?

Is there any GUI/interface/package that will enable me to edit existing data in columns of my super-complicated multipage TeX table? Currently, I count the "&"s to get to the correct column and ...
13
votes
1answer
379 views

How does one construct an abstract (n × n) empty grid of squares?

I would like to just create a grid like this, but without numbers or color, but I'd like to represent an n × n grid abstractly with ellipses like this: Also, I need just a simple—singular—grid ...
13
votes
2answers
1k views

vspace before itemize in a Table cell, tabular vs longtable

In the following MWE, one sees the difference between tabular and longtable, with respect to the vertical space before an itemize, inside a cell : \documentclass[12pt]{article} ...
13
votes
2answers
11k views

Making a long table continue over two columns

I am using multicol to make a two-column document using the book document class. I have a long tabular that I want to break where the page breaks and then continue in the next column. I could split ...
13
votes
1answer
7k views

p,m and b columns in tables

I wonder why p columns are aligned at the bottom and b columns aligned at the top? created with this code: \begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|} \hline \centering ...
13
votes
2answers
7k views

\flushleft with p{} option in tabular

If I have defined tabular alignment with the p{} option, \begin{tabular}{p{.3\textwidth}p{.7\textwidth}} ...(contents)... \end{tabular} Is there a way to specify that I want it \flushleft without ...
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 & ...
13
votes
2answers
15k views

Text wrap in tables (multirow package loaded)

I searched a bit, but I could not find a reliable way to wrap text in tables with columns spanning more than one row. Any ideas on how to fit this table in the page?: ...
13
votes
1answer
28k views

Multi columns in latex

I am having problems with tables in latex. Here is what I want: Regressors Model 1 Model 2 Coefficient1 Lower1 Upper1 ...
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 ...
13
votes
1answer
374 views

What is the command \span?

I have bumped into the \span primitive a couple of time. I got the impression it is defined in the TeX program, not even in plain.tex. Is that right? And what does that command do and what is it for?
13
votes
2answers
2k views

Tables with colored cells and dashed lines

I would like to draw a table with some colored cells and dashed horizontal lines. Here is my first attempt using the colortbl package and the arydshln package: \documentclass[12pt]{article} ...
13
votes
2answers
135 views

Making a table independent of pgf

I use pgfplotstable to generate tables to be included in online submission to journals. I would like to make my paper independant of pgfplotsable because compilation of the document is made online ...
13
votes
1answer
616 views

Table with rounded corners

I've taken an example of a very cool table from here and I've made some changes to suit my needs, the problem is that the table it's not correctly rounded: Unfortunately it doesn't seem to exist a ...
13
votes
1answer
2k views

Use of \midrule in booktabs table

Are there any formal guidelines/suggestions on the use of \midrule inside a booktabs table with just rows of identically formatted data? The booktabs manual is very specific about vertical rules, ...
13
votes
1answer
2k views

How to remove top and bottom whitespace of longtable?

I am using longtable instead of tabular environment and noticed that it puts some additional whitespace at the top and at the bottom of the table. Is there some way to remove it (something less hacky ...
13
votes
2answers
4k views

Tables with multiple panels in LaTeX, R and Sweave

I would like to know what the accepted Sweave/R/LaTeX solution is for producing tables with "panels": multiple parts, which may or may not contain the same columns, combined into one table. The ...
13
votes
2answers
183 views

'e+08' (don't suppress 0) notation in columns with S-specifier

for symmetry reasons in a large table I want the scientific format with 2 digits (i.e. e+08). By default it suppresses the 0. Here is what I do: \documentclass[]{article} \usepackage{siunitx} ...
13
votes
1answer
2k views

Problem with multicolumn color tables

edition might be grateful since i don´t know how to name this problem. English is not my native idioms. Also I don't know how to interpret this problem as well on so apologies in advance. I am ...
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 ...
12
votes
5answers
8k views

Align Note below table

My question concerns the "Note" below the table. This is my code: \begin{table} \begin{center} \caption{ Descriptive statistics of total sample based on modified data set}\label{table:descrtotal} ...
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 ...
12
votes
2answers
1k views

Rounding of decimal numbers: Looking for an elegant way in latex table

Is there a package to do the rounding numbers for latex tables? For example this table. \begin{table}[htdp] \caption{default} \begin{center} \begin{tabular}{c|c} +1.98185942 & +0.14495331 \\ ...
12
votes
1answer
35k views

horizontally center table

Strangely in this MWE the table is shifted to the left but in my original document I have exactly the same code but the table is centered. Can anyone solve the mystery? \documentclass{article} ...
12
votes
2answers
182 views

Uppercase column in tabular

I need one column of my table to be uppercased. My code which does not work as I want: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{c>{\MakeUppercase}c} a ...