Questions tagged [tables]

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

Filter by
Sorted by
Tagged with
26
votes
3answers
39k views

Vertical Alignment in multirow using cells with >1 lines

I want to vertically align (best would be to center) the text ("TEST") in the left (yellow) column of the following table. It works fine with multirow when every row has exactly the hight of one line: ...
26
votes
1answer
70k 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 ...
26
votes
2answers
2k views

How to print subtotals in each page of a long table?

Some invoices need print a large list of items. In this case, and in my country, invoices must print the subtotal of the previous page for each break page, and add to the last subtotal the accumulated ...
25
votes
4answers
7k views

Tip on how to make a visually good table

I'm using booktabs to make most of the tables in my thesis. However, I'm not sure if that is the best solution for tables with more than 6-7 rows, as it can be difficult to read (there is no line ...
25
votes
3answers
23k views

Aligning Decimal Points in Table

I want to align two numbers in two different rows the decimal point. I do see a link for that here: Aligning numbers by decimal points in table columns However, I don't understand how to ...
25
votes
3answers
16k views

newline in multirow environment

I have a table with many multirow environment that are each compouned with many lines. I have seen that it is possible to break lines in multirows by fixing a particular width (with minipage for ...
25
votes
4answers
14k views

Align large vertical delimiters (brackets) to rows of a table?

I’m trying to typeset a table of data, with brackets (i.e. }) at the right-hand side to show a classification of the rows.  Something like: ----------------------- | Aardvark | Armenia | \ |--------...
25
votes
3answers
34k 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 ...
25
votes
3answers
11k views

Balancing long table inside multicol in LaTeX

I would like to put some longer tabular data inside the multicols environment while maintaining its balancing abilities. I have tried supertabular with the trick to redefine \newpage as columnbreak. ...
25
votes
1answer
76k views

LaTeX table cell with a diagonal line and 2 sub cells [duplicate]

Possible Duplicate: Diagonally divided table cell Diagonal lines in table cell I'd like to have a LaTeX table, where the top left cell marks what the headers are to the right and also mark what ...
25
votes
2answers
10k views

Table with gap between cmidrule's (extra space between two columns)

Example of my final solution based on Werner's suggestion can be found at the end of this question. I would like to make a table that looks about as this one: I can get most of this to work with ...
24
votes
2answers
22k 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 ...
24
votes
1answer
6k views

General differences between array, table, tabular, tabularx, longtable, supertabular, longtabu, etc [closed]

What are the general differences between the various table environments that exist for LaTeX? By this I mean: What are their basic purposes? Which ones are the most important ones for new users? Which ...
24
votes
1answer
6k views

siunitx: Bold single numeric cells

I'm struggling to make a single numeric cell in an siunitx table bold. (A similar question for making a whole column bold is available here.) I want to define a simple macro which I can set for the ...
24
votes
3answers
59k views

Fitting tables into beamer

I have some tables in my presentations that are rather big. I found out how to use \resizebox to fit them into my page. Unfortunately this only works for tables that are wide. For long tables, my ...
24
votes
3answers
41k views

Spaces between rows and cols in a table - Better ways than mine?

I started using Latex recently and I put together 4 ways of changing the space in a table. Two general ways defining the general space between cols and rows as well as two ways of adding space between ...
24
votes
3answers
42k 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?: \documentclass[12pt,a4paper]{...
24
votes
2answers
12k 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 ...
23
votes
6answers
11k views

How to increase row height while using booktabs?

I'm making a table using booktabs. One of the columns contains a series of fractions. \documentclass[12pt, letterpaper]{article} \usepackage{nag} \usepackage[margin=1.0in]{geometry} \...
23
votes
4answers
69k views

Separate \arraystretch value for every table

\arraystretch defines vertical spacing of tables. If I have several tables, how can I define a separate value of \arraystretch for every table? In my case, the last defined \arraystretch works for all ...
23
votes
4answers
3k views

How to draw arrows from cell to cell at the borders of a table

How can I draw arrows from cell to cell at the borders of a table? More precisely I'd like to get something like this: It would be nice to have a solution using TikZ. Edit: Since I have other ...
23
votes
4answers
7k views

A table with square cells

A friend is trying to make some auto-generated bingo boards, and LaTeX seems like an obvious choice - nothing fancy, just a 5x5 table with square cells, centered text, and line wrapping if necessary. ...
23
votes
3answers
97k views

Table with text wrapping?

Row 1 has one line and centered for each cell. Row 2. Column 1 has two (2) lines. each line centered. Row 2. Column 2 has one line. centered horizontal and vertical. Row 2. Column 3 has text wrapping....
23
votes
3answers
51k views

How to make a table on more than one page by using the table environment

EDIT Like some comments below are remarking the table environment doesn't allow tables over more than one page. However the solution works fine I need to make a table over more than one page. The ...
23
votes
2answers
26k views

How to left align text in a table with \makecell

This is my code.. I want to left align the statement "number when majority of the nodes.....". Please help \begin{table}[h!] \caption{Main Notations} \label{tab:table1} \resizebox{9cm}{!} { \begin{...
23
votes
2answers
13k views

Color entire table

How do I get an entire table to get a background color. I dont mean the indivual cells but the entire table to get a gray shade. Something like this:
23
votes
1answer
11k views

How to get a dot instead of colon in table captions?

Now I have Table 1: Title I need Table 1. Title
23
votes
1answer
76k views

How to convert table to longtable being able to break across pages?

As per question title, how can I convert the following table to longtable with the same result (but being able to break across pages)? \begin{center} \renewcommand*{\arraystretch}{1.5} \begin{table}[...
23
votes
1answer
20k views

Do not indent a tabular

In the following minimal example, the tabular seems to be indented, unless I misunderstand (for example, maybe left-aligned does not do what I think?) \documentclass{article} \begin{document} \...
23
votes
2answers
1k views

Add \midrule Every 5 Lines Automatically

I wrote a table listing scores of 40 students using booktabs package. How to write midrule command automatically every 5 rows? \documentclass{article} \usepackage{booktabs} \begin{document} \begin{...
23
votes
3answers
17k views

Different font sizes for different rows in table

I want to put different sizes of fonts (smaller) into different rows of my LaTeX table. I found that it is possible to have different font sizes for different columns of this post. Is there any simple ...
23
votes
1answer
15k 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 ...
22
votes
4answers
3k 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 ...
22
votes
3answers
9k views

How to Create Comparison Tables in LaTeX?

I am a new user (both to LaTeX & this forum). I want to create a Comparison Table for an Article (like the one shown here): Can someone please help me with this.
22
votes
1answer
29k views

How to make a \cline or \cmidrule narrower?

I'm trying to copy this table into TeX: I have problems with the horizontal lines under "Gaussian" etc. When I specify three \cmidrule's, they are not separated but are combined into one big \midrule ...
22
votes
2answers
15k 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 ...
22
votes
1answer
340 views

Does \\ in the last line of an array have any effect?

Consider the following example: \begin{array}{l} line 1 \\ line 2 \\ \end{array} Is the \\ in the last line completely optional or are there circumstances under which it has any effect?
22
votes
3answers
8k views

Is there something like “sidewayslongtable”?

Unfortunately my table is too wide to use longtable. In sideways it fits on width. Unfortunately it's too long to fit on one page. Is there something like sidewayslongtable, a way to combine ...
22
votes
2answers
6k views

Preventing itemize environment to insert initial vertical space

I'm using itemize and tables like the following \begin{tabularx}{\textwidth}{>{\ttfamily}llX} \toprule \textbf{\rmfamily Operator} & \textbf{Typen} & \textbf{Regel} \\ \midrule = & ...
22
votes
1answer
7k 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 ...
22
votes
1answer
14k views

Multiple references to the same footnote inside a table environment

I followed the steps in this answer to get multiple references to the same footnotes working. As shown in this minimal example, the solution is working great for footnotes in the text, also getting ...
21
votes
3answers
22k 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 ...
21
votes
3answers
1k views

“[” as first character in table row

Whenever I try to compile a table that has a "[" as first character in a row it gives me the error: Missing number, treated as zero. Illegal unit of measure Example: \begin{table}[htb] \...
21
votes
4answers
6k 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? ...
21
votes
2answers
8k views

Color merged and regular cells in a table individually

In a LaTeX table with merged cells, how can I color each cell with a different color? %% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know ...
21
votes
5answers
2k views

What are some alternatives to presenting data instead of tables?

What are some alternatives to representing tabular data? Currently, I am trying to construct a table but seeing as how, everyone in my class will be doing that, I want to stand out and I'm looking to ...
21
votes
2answers
32k 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 ...
21
votes
3answers
42k views

Tabular, parbox, vertical alignment

What i want to achieve is really simple: I want to be able to align cell content at the top (which is the default behavior of tabular) while being able to manually break lines (and anything you could ...
21
votes
2answers
21k 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 that ...
21
votes
4answers
60k views

Tables with centered columns of specific width?

I like it when tables have centered columns (e.g. |c|c|c|). However, I have width restrictions. The most obvious solution to force a table to be within a certain width is to do |p{2.5cm}|p{2.5cm}|, ...