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

16
votes
3answers
3k views

How to wrap text in table cell?

this code: %%%%%%%%%%%%%%%%%%Table: Valence x valence crosstab \begin{table*}[t] \centering \begin{tabular}{c c c c c c c} \toprule \midrule ...
14
votes
2answers
9k 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
297 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
2answers
256 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} ...
12
votes
2answers
22k views

Misplaced \noalign

Unfortunately I cannot solve the error with noalign on my own: ! Misplaced \noalign. \hline ->\noalign {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet... l.12 ... ...
11
votes
2answers
214 views

Is there such thing as “p{height}”

I am making a table right now and it's really annoying that items in my cell are getting crunched \begin{center} \begin{tabular}{|c| c | c|} Critical Points $P_0$ & $f(P_0)$ & Conclusion \\ ...
9
votes
3answers
202 views

Code review: Tables on a page

In a document I am working on, I am trying to group four tables on a single page. However, it seems I still have not one, but multiple issues with my understanding of how tables work... I tried to ...
9
votes
4answers
340 views

Center table by end of cell

I want to be able to center my table, but align the center by the end of the first cell. Currently just using the \begin{center} command i am able to center the table but i would rather the table be ...
9
votes
1answer
622 views

Lost float in exam class

For some reason, I can't seem to put a figure or a table environment inside a solution environment while using the exam class. It produces a float is lost error. Has anyone found a way to bypass this ...
9
votes
4answers
2k views

Caption and footnote width with ctable

I am using ctable and I have a table with footnotes. Since the table is narrow, the caption text is squeezed in the table width, which looks odd. I can use mincapwidth to specify a minimum width for ...
8
votes
2answers
612 views

Tabular paragraph vertical alignment

How to make this kind of tabbed paragraph: 3 columns 2cm 10cm 2cm, the last column is right aligned and it's content starts on the last line of the paragraph of the second column. 10. Some text ...
8
votes
1answer
533 views

bracket covering only a part of a matrix

How can I write a matrix, with brackets that cover only rows/columns in a certain range, but still has the right indentation? What I would like: My current solution: \[ \overset{ ...
8
votes
1answer
1k views

How to wrap text around a landscape table over multiple pages? \sidewaystable or \landscape + \longtable

I am trying to create a landscape table that breaks over multiple pages. I have successfully done this with the following: \begin{landscape} \begin{longtabu} to \textwidth{some columns} \caption[my ...
8
votes
1answer
762 views

siunitx number too big when trying to round

Using the siunitx package \usepackage{siunitx} I am trying to put numbers with plenty of decimal digits in a table while rounding them to 3 digits after the decimal point. There is a compilation ...
8
votes
3answers
12k views

How to write vertically in a cell

I know that with \begin{sideways} ... \end{sideways} I can write a text vertically, but it rotates the text by +90 degrees. What should I do to rotate it by -90 degrees?
8
votes
2answers
895 views

Four Language Parallel Column Book

I am trying to format a four column parallel text in four different languages to display on two pages with two columns per page. I have tried using ledpar and parallels but I cannot get it to work. ...
8
votes
1answer
405 views

Can I set the format of an entire column except for the header?

I would like to italicize all of the names in the second column of a table, but presently the only way I have found to do this is to use \textit{} in each cell, i.e.: \begin{table} ...
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. ...
7
votes
2answers
993 views

Difference between tabular and array environment

What is the difference between a tabular and an array environment? When should be used the former and when the latter?
7
votes
4answers
286 views

How to color a cell of a table using multirow and center the cell content?

I have checked for other similar questions. I followed the suggested solution in the question Color in multirows. After implementing this solution, I still have a problem. I want to develop the ...
7
votes
3answers
215 views

Three tables side by side

I have three tables and I need that the three tables stays side by side. I tried with this approach but the tables are overlapping each other. \begin{table}[!htb]\tiny ...
7
votes
2answers
235 views

Rectangles around words in table including diagonals

I'm trying to make a map of word correlations that will include a table of words with similar groupings marked by surrounding them with a rectangle with rounded corners. This needs to also be possible ...
7
votes
1answer
119 views

Import a table with a specified format

Basically, I have a table (from a file) containing only numeric values. I would like to import in latex but it has to be formatted in a specific way, as illustrated by the picture. The ... should be ...
7
votes
2answers
172 views

Allow [ characters in tables without entering math-mode (from R)

I have R code that produces latex code like: \begin{tabular}{D{.}{.}{7}D{.}{.}{7}} \toprule \multicolumn{1}{c}{x} & \multicolumn{1}{c}{y} \\ \midrule [1, 5) & 1 \\ [1, 5) & 2 \\ [5, 8) ...
7
votes
2answers
1k views

How thick a rule does \hline produce?

How thick a rule does \hline produce (in a bog-standard tabular environment) ?
7
votes
2answers
128 views

Braces on either side of a list

I want to create this: The following code does this, but produces a number of overfull hbox and vbox statements in the log -- how can I get rid of those? On the other hand, if there is a better ...
7
votes
1answer
457 views

How to define a table column to always be a math equation, while others are text?

I'd like to typeset a table listing some equations, something like Euler's formula & e^{i\phi} &= \cos\phi + i\sin\phi Euler's identity & 1 + e^{i\pi} &= 0 Putting this in a ...
7
votes
1answer
436 views

General question on floating and non-floating objects in LaTeX

I am wondering when you place a non-floating object such as a minipage into a floating environment such as a table or figure if this construction as a whole is then a floating or a non-floating ...
7
votes
1answer
7k views

“! Misplaced \omit” error

The code below describes a table that goes like: |_|x x|x x| |x|x|x|x|x| |x|x|x|x|x| where |_| = empty cell, |x x| = multicolumn{2}, |x| = cell with text in it. \begin{tabular}{c|c|c|c|c|} ...
7
votes
2answers
1k views

Putting an arrow next to table

I have a table. Each row in that table represents data at a certain point of time. Lower rows represent data for later times. To illustrate this, I'd like to draw an arrow at the side (which doesn't ...
7
votes
2answers
790 views

problem with \ifthenelse + multicolumn

I encounter various problems when i want to control the display of a table with a ifthenelse test. For example, consider the following M(non)WE : \documentclass{article} \usepackage{multirow} ...
7
votes
2answers
2k views

Multicolumn verbatim

Is there someone who could help me with creating a table with some rows merged and verbatim text in it? I actually want to create 3x2 table. Like this \begin{tabular}{rr} \hline ...
7
votes
3answers
3k views

How to make a table with centered images?

On page 6 in this PDF is there a table with centred pictures in the right column. Does anyone know how to make such a table? I am using pdflatex.
7
votes
1answer
1k views

tabular and array

Consider the following example: \documentclass{article} \usepackage{array} \usepackage{calc} \begin{document} \begin{tabular}{p{\textwidth - 3cm}|p{1cm}<{foo}} Caption1 & Caption2\\ ...
7
votes
3answers
1k views

tree list in a table

I would like to put a tree list into a table environment. Smth. like: +--------------------------+---------------------------+-------------+ | Heading 1 | Heading 2 | ...
6
votes
1answer
196 views

Create table with automatic row numbering

I am trying to create a table with subheading and automatic row numbers. The original table looks like this: The latex to generate the table is as follows: \documentclass{article} ...
6
votes
1answer
229 views

Is there a dummy package like Lipsum or Blindtext for Tables and Figures?

Lipsum and Blindtext offer paragraphs, lists, and even whole documents of dummy content for testing LaTeX layouts. Is there a package that will generate tables and figures in a similar way?
6
votes
2answers
123 views

How to indicate a sliding window in a table

I have a table as follows in beamer. \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{default} \begin{document} \begin{frame} \frametitle{test} \begin{center} \huge \Huge ...
6
votes
2answers
220 views

Passing the current column width to a macro (for table headers)

In an attempt to separate the formatting of tables, and in particular their headers, from the content, I have produced the following code: \documentclass{article} \usepackage{array} ...
6
votes
2answers
238 views

Looking for Elegance and Convenience in Code with Many Numbers

I am designing tikz images of numbers arranged in a tabular environment. Each number is formatted according to a particular style (different colors and shape). I first define the style for each number ...
6
votes
2answers
203 views

What is the correct way to calculate \multicolumn size when using tabularx?

What is the correct way to determine the correct size for use with p{} needed by \multicolumn to get the size correct? The problem is this: I want to use tabularx and also use \multicolumn. To do ...
6
votes
1answer
696 views

Alignment at specific character with S column from siunitx

To avoid starting a new question yet again, I'll use this tread as the problem is the same as the first one. \documentclass{article} \usepackage{booktabs,dcolumn} \usepackage{calc} ...
6
votes
1answer
6k views

Line-spacing in a cell of table

I'd like to change the line space of sentence in a cell of table. It is not line-breaked, but over-flowed since the sentence is quite long in the cell. My code example is below. The line space is ...
6
votes
2answers
2k views

Vertical Alignment of tikz picture in a table cell

I apologize in advanced for asking a question that has been asked before. I have read the other posts on SE about vertical alignment but I'm very new to Latex and had difficulty understanding them. ...
6
votes
3answers
701 views

Tabular with automatic \hline

Is there a package or simple command that will insert an \hline after every line in a tabular environment? It is rather annoying to do it all manually, and it seems like there should be a simple way ...
6
votes
1answer
311 views

How to use only mathematical input in the first column with pgfplotstable

I can use a mix of text and mathematical input in the first column of a table generated with pgfplots with no problem, and also mathematical input in, e.g. the last column, as this mwe shows: ...
6
votes
1answer
737 views

How to trim the length of \toprule? [duplicate]

How to trim \toprule (from booktabs package)? It is probably something basic I'm missing, but I need it and it's nowhere to be found.
6
votes
2answers
3k views

table with tabularx and multirow

While using tabularx and multirow I tried to import this table (made with Word) in LaTeX: but it's not really working. It seems as if there isn't enough space for the text, but shouldn't taburlarx ...
6
votes
1answer
2k views

How can I align rotated text in a table at the bottom?

I have a code that produces a table. The three last columns have rotated text. I would like to align them to the bottom (not top as in the code below). In addition I would like to center the "nr" and ...
6
votes
2answers
315 views

How can I define a macro that adds a row to a table that has not yet been printed?

I want to generate a list of technical abbreviations and acronyms that I use. Currently, I'm defining all acronyms with a macro I have designed. Now, I want the macro to call another macro, called ...