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

20
votes
4answers
4k views

Rotated column titles in tabular

I'd like to create a chart where the column titles are rotated, as per this toy example: I used the rotating package to generate the above. It has certain shortcomings: the rotate command doesn't ...
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 ...
21
votes
2answers
24k views

Vertical spacing of a table cell

I want to tabulate formulas, but I find that the lines of the table cells are too close together, and this is aesthetically unsatisfactory. Example (formulae copied from wikipedia): ...
16
votes
2answers
22k views

How to force table caption on top?

I have a table which works ok...as per example below. But in the thesis, the right column is centered and caption forced to below table. Is there a way I can make it look like? ...
8
votes
1answer
1k views

Pgfplots: plot graph inside table

I would like to plot a table with a graph inside it. I am trying to use this example as a guide. This is the current hand-constructed version. UPDATE: I don't have enough reputation to answer my ...
19
votes
3answers
2k views

tabular input by columns (i.e. transpose a table)

I would like to be able to transpose a tabular(x) table like in the following example. It is not necessary to be completely automated, but I don't want to change the data order, which is a painful and ...
17
votes
2answers
2k views

How to make longtable respect \nopagebreak in the beginning?

For the book I am typesetting now I need a table environment with the following abilities: Span over multiple pages; Allow \nopagebreak between two lines Do not ignore \nopagebreak before the ...
11
votes
2answers
10k 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 ...
10
votes
2answers
770 views

pgfplotstable or datatool?

What are differences, which to use for including .csv, .tsv files ? Datatool ? pgfplotstable ? I've seen at question : How typeset a numeric table from a CSV file how person asked about fixing ...
12
votes
1answer
694 views

Scientific Notation Only For Large Numbers

I have a table full of numbers. Most of them are floating point numbers that are less than one, some are integers from 1-100, and a few are large (×10^75). I know how to set the precision of the ...
12
votes
2answers
14k 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?: ...
11
votes
6answers
3k views

Generate LaTeX Truth Table with Python Cheetah

While looking for code which can automatically generate truth table in LaTeX I stumbled on this Python generator. It appears that the code can be used from Cheetah's framework. Can anybody point me to ...
10
votes
2answers
3k 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:
9
votes
1answer
604 views

Add a curved arrow and a bracket to a table

I'm a beginner to LaTeX. I want to add a curved arrow pointing from one row to another. And I also want to add a { on the other side of the table to mark several rows. \begin{center} ...
8
votes
1answer
627 views

tabular bibliography with biblatex

I’m working on a custom biblatex style as I have to meet very special requirements. The citation part (cbx) works really well, but I have a problem with the bibliography definition. I need a tabular ...
5
votes
4answers
3k views

A list inside a table

I'm using this simple code to align date ranges on a CV: \section{I'm pretty cool}\begin{tabular}{l l} 2009--present & company 1 \\ 2011--2012 & company 2 \end{tabular} Now this looks like ...
5
votes
1answer
377 views

Color changes cell height in tabular

The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}. \documentclass{article} ...
5
votes
5answers
8k views

Centering mutirow text in a table whose cells contain several lines of text

I'd appreciate advise in centering a multirow text. In the MWE below the multirow text "spring" is NOT centered over the three rows that it spans. ...
12
votes
3answers
4k views

Centering in tabularx and X columns

How can I center the column when using X in tabularx environment like in this example? \begin{tabularx}{\textwidth}{@{}lXXXXX@{}} 1 & 2 & 3 & 4 & 5 \\ \end{tabularx}
11
votes
2answers
2k 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 ...
10
votes
3answers
7k views

Tabular with p type columns to fill page width

I wish to be able to have a table (using tabular) that fills the page horizontally with each column using a fraction of that space, for now assume that they are equally sized. I wish to be able to ...
8
votes
2answers
2k views

colortbl: \rowcolor in tables with \begin{tabular}{@{}ccc@{}}

I'm trying to make a table with the following code: \begin{tabular}{@{}ccc@{}} \hline \rowcolor[gray]{.9} a & b & c \\ \hline \end{tabular} Unfortunately the \rowcolor command seems ...
6
votes
1answer
2k views

threeparttablex table notes for tabu tabulars with less than \textwidth

threeparttablex can be used to add table notes to tabu tabulars*. If the tabular spans \textwidth, the output is as expected. It seems however that the tablenotes environment does not adjust its width ...
6
votes
2answers
14k views

itemize in a tabular environment

When compiling this: \begin{table*}[h] \begin{tabular}{|lll|} \hline \bfseries Name & \bfseries Opt 1 & \bfseries Opt 2 \\\hline \hline \bfseries Item 1 & X & ...
4
votes
1answer
863 views

Caption at foot of long tables ('longtable' package)

I would like to ask a question about longtable package. I've already posted it in other forums. I have a long table (a several-pages-long one) using longtable package and I would like to add a table ...
4
votes
2answers
391 views

An improved \rowstyle that takes the cell contents as an argument

It is possible to format the column entries of a tabular in an argument-style fashion using the lrbox environment to store the column cell in a box (say) \mybox; and supply \mybox as an argument to ...
4
votes
1answer
700 views

How do I eliminate the vertical realignment when using arrayrulecolor with cmidrule?

I'm using consecutive \cmidrule commands in conjunction with \arrayrulecolor to alternately hide and unhide horizontal rules in a table. However, when \arrayrulecolor is used with \cmidrule, some odd ...
1
vote
1answer
1k views

bottomrule not working in a self-made environment

I have this environment for consistent tables in my LaTeX documents: \newenvironment{defaultTable}[2] { \@float{table}[h] \noindent \tabularx{\textwidth}{#1} \specialrule{0.5pt}{10pt}{0pt} ...
0
votes
1answer
520 views

How to make table with divided column [duplicate]

Possible Duplicate: How to merge columns in a table? How can I make a table of the type above? I am writing a seminar report using the report class.
10
votes
3answers
344 views

Move tabular entry to bottom of row

How do I get the last column text to be at the bottom of the row? That is I want the XXX to be aligned with the line containing the arrow. I tried playing around with \multirow{3}{-3ex}{XXX}, but ...
9
votes
2answers
1k views

Table column widths disproportionate due to multicolumn cell being too long

I'm trying to typeset a table that would have a header in the first row (I'm not looking for a different/better solution to adding a header, but for a fix to this solution. Thanks). I want to achieve ...
8
votes
1answer
1k 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 ...
8
votes
1answer
429 views

Custom macro for multicolumn with & without xparse

The following example has two normal LaTeX \newcommand macros and two xparse \NewDocumentCommand for specifying multicolumn text. The only difference between each pair of commands is one has the ...
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]} ...
7
votes
3answers
3k views

Set multicolumn width to default table width

I have a two column table with a single multicolumn spanning both of them. The text on that multicolumn is rather long so I need to set its width so it wraps around. I can set the width with ...
6
votes
3answers
4k views

Relative column width in LaTeX

How can I define a tabular with two columns in LaTeX, where the first column fills 30% of the page width and the second column fills the rest?
2
votes
2answers
227 views

Creating a table in LaTex with the following style

I'm new to LaTex, and would like to create a table that looks as follows: How can this be done in LaTex? Thanks.
2
votes
2answers
2k views

How to make a table smaller?

I am going make a table smaller in a paper which I am going to submit to a journal. I used \small but it does not make it small enough ?
21
votes
4answers
1k 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 ...
29
votes
3answers
31k 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 | ...
24
votes
2answers
35k views

How to merge columns in a table?

I have this table, but wanted to format the first row. I like to match the two columns of first row, and last two columns of the same first row. Any suggestion on how to do that? \begin{table}[!h] ...
23
votes
5answers
3k views

Reading data from a relational database into a LaTeX table

I'm using Tex Live 2009 on Debian squeeze. I can upgrade if I really, really have to, but I'd rather not. i was wondering if it would be possible to do the following. Given some data in a ...
10
votes
3answers
5k views

Convert numpy array into tabular

I am doing some data analysis in python, putting the results in form of a matrix stored into a numpy array. I would like to put this results into a report and the best way would be to put a table with ...
15
votes
1answer
1k views

Table looking like a block

The goal is to create a table that has the same style than a block of the used theme in order to have a consequent style trough the document. this can be done by the following two methodes shown in ...
15
votes
2answers
2k views

How to create new table environment

I am working on a book that has many many such tables. Is there a way to create shortcut for the code shown below. I want to make table caption a variable, because in the MWE shown below except ...
14
votes
3answers
1k views

How can I illustrate decimal to binary conversion?

As part of my homework for discrete math I need to convert different decimal values, both positive and negative, to 8-bit binary representations using signed magnitude, 1's complement, and 2's ...
13
votes
2answers
10k views

Math mode in tabular without having to use $…$ everywhere

\begin{tabular}{|l|l|l|} \hline Column A & Column B \\ \begin{math} x & y \\ \end{math} \end{tabular} This won't let me compile and gives a lot of errors, how do I enable math mode in a ...
10
votes
2answers
8k views

Remove vertical lines for table

I am trying to implement the following K-map with a table AB C 00 01 11 10 ______________ 0| 1 0 1 0 1| 0 1 1 0 I implemented it like this: \begin{table}[htdp] ...
31
votes
5answers
54k 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)?
21
votes
1answer
12k views

Fixed column-width table with text left-aligned in cells

\section{Section Title} %label{8.4.47} \subsection*{Some note on Section} \begin{footnotesize} \begin{tabular}{p{2cm}|p{4cm}|p{3cm}|p{3cm}} Heading 1 & Heading 2 & Heading 3 & Heading 4 ...