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

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 ...
10
votes
2answers
9k 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] ...
21
votes
1answer
13k 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 ...
19
votes
4answers
2k 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. ...
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} ...
10
votes
2answers
9k views

How to highlight table rows by colors in Beamer

I would like to highlight rows in tables, in rowwise, that is I would like to highlight row 1 in red, then make row 1 in black but row 2 in red, etc. How can I manage to do so in Beamer?
17
votes
2answers
626 views

How to put the list of figures into a table

How can I get a “list of figures” of the following type? List of figures Exactly, this list of figures is set as a table. I know this cannot be obtained by the command \listoffigures directly, but ...
11
votes
2answers
801 views

PGFplotstable: Is it possible to set a number format for a *row* instead of a column?

Using pgfplotstable, it's straightforward to set a column number format using columns/(columnname)/.style={(format)} What I would like to do is change the number format of a particular row. In my ...
7
votes
4answers
8k views

Table with foot note

I have a table and some of the number inside has some symbol like * and ** which should be explianed as footer ( at the end of the table not the page) I dont know how to do that and I dont want to ...
7
votes
1answer
8k 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: ...
6
votes
2answers
6k views

Shrink table to fit on a page, or keep it as it is

I am using \resizebox{\columnwidth}{!}{% ... %} to fit a table which might be too wide onto a page by scaling it down. However, my problem is that if the table is smaller than the column width, it ...
24
votes
3answers
28k views

tabular vertical alignment to top?

I'm trying to create a simple tabular with two cells of text and two images below them like so: \begin{tabular}[h]{ c | c} \emph{Normal} & \emph{Cone} \\ ...
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} ...
12
votes
2answers
8k views

Evenly distributing column widths

Consider the following hunk of code: \begin{tabular}{| c | c | c | c | c | c | c | } \cline{2-7} \multicolumn{1}{c}{} & \multicolumn{3}{|c|}{Fantastical aardvarks} & ...
10
votes
1answer
1k views

Create a vertical line in a table that spans a range of rows but not all rows

I'm interested in methods to create a vertical line in a table that spans a range of rows but not all rows. I've found one solution below, but is there another solution such as \cline which allows ...
8
votes
1answer
3k views

Aligning a figure and table side by side

I would like to place a figure side-by-side with a table, and have both of them aligned to the top. This is what I came up with: \begin{figure} \begin{minipage}[b]{0.65\linewidth} ...
7
votes
2answers
923 views

Underbrace under table, stretching over multiple columns

I want to notate some information to table column groups, using underbraces. So there should be an \underbrace under the table, that stretches over multiple rows. I tried the following: ...
7
votes
3answers
993 views

Keep first column on every page of long sideways-table

I have a table with a lot of columns, so I am going to make it landscape.The very first column is a sort of header, so I would like to repeat it on every page. Is there a way to do that?
6
votes
2answers
1k views

Crop entire document around figure

Have you ever submitted a LaTeX paper to a journal that wants separate figures? When you want to include a figure composed of a table of images, you must build it separately. When I run latexpdf, I ...
6
votes
3answers
12k views

how to vertically align a cell in a table?

I have a table that I define \begin{tabular}{lllllllllllll} \includegraphics[width=7.3in]{img1.pdf} & \includegraphics[width=7.3in]{img2.pdf} & \includegraphics[width=7.3in]{img3.pdf} & ...
5
votes
1answer
303 views

Counters for use in array/tabular cells

The following practical example \documentclass{article} \usepackage{array}% http://ctan.org/pkg/array \newcounter{tabcol}\newcounter{tabrow} \newcolumntype{C}{>{\stepcounter{tabcol}}c} ...
5
votes
2answers
569 views

generating LaTeX tabular code during compilation

I use LaTeX for scientific reporting in brain imaging (fMRI). I have a tabular array in LaTeX, that contains quite a lot of rows and columns, which both are brain regions and in the each intersecting ...
5
votes
2answers
2k views

Wider tables in LaTeX, which is the best solution?

Hi I have a LaTeX table code generated from R like the following \usepackage{rotating} ... \begin{sidewaystable} \begin{center} \small\addtolength{\tabcolsep}{-7pt} ...
4
votes
4answers
1k views

How to obtain width of longtable?

I need to create multiple tables of the same width, one of them needs to be a longtable due to spanning multiple pages. I could set the width of all of them to a predefined value. However, I would ...
4
votes
2answers
2k views

Clickable Table Footnote

I'm trying to have some clickable footnotes within tables. I tried using \footnote{}, it does create a link but there's no footnote text associated with it. \footnotemark[number] along with ...
12
votes
2answers
8k views

How to color the font of a single row in a table?

I have a table and I want to make the font color red for just one row (not the background). How do I do that? Here's my table: \begin{tabular}{ l | l l l l } & 1 & 2 & 3 & 4 ...
12
votes
3answers
453 views

Define a table one column at a time instead of one row at a time

Is there a way to define a table like so? \begin{tabular}{|c|c|} column 1, row 1 \\ column 1, row 2 \\ column 1, row 3 \\ column 1, row 4 \\ column 1, row 5 \\ && ...
12
votes
3answers
332 views

Expansion of first token in a tabular cell

Background I currently do some work on the collcell package which collects the content of a tabular/array cell and provides it to a user defined macro, e.g. using ...
11
votes
1answer
642 views

Tables in Latex with diagonal first row

I'm trying to create a table with a diagonal first row, like in how-to-draw-diagonal-table-borders-in-latex-like-in-excel I've looked through the documentation for PGF-TiKZ, but am still unsure as to ...
10
votes
3answers
579 views

Control order of columns in table

Is there maybe a way to define the order of columns oneself? Say I have \begin{tabular}{ l l l } A1 & C1 & B1 \\ A2 & C2 & B2 \\ A3 & C3 & B3 \\ \end{tabular} but ...
9
votes
2answers
297 views

Best practices longtable

I have a long table with the explanation of 50 items (the MWE displays only 9). I believe this is hard to read. How do I make it easy to read? \documentclass[10pt,cleardoublepage=empty,twoside]{book} ...
9
votes
2answers
1k views

How to include tabularx/y in a new environment?

I am looking for a way to define a customizable environment for tables in my latex documents. This means: caption and label width of table customized column format (tabular preamble) While this ...
8
votes
2answers
529 views

How to shrink a table automatically so that it fits onto a page?

I have a table that looks like this: \begin{table}[h] \centering \caption{MYCaption} \label{tbl:table1} \begin{tabular}{|l|l|l|l|} \hline \rowcolor[gray]{.8} \multicolumn{4}{|c|}{Team 1}\\ \hline ...
7
votes
1answer
3k views

Center wide longtable (not tabular or tabularx)

I have a long and wide table that does fit on A4 format, but is too wide for the text margins. I want that table to be able to spread over multiple pages, but I also want it to be centered on the ...
6
votes
1answer
5k views

How to fit a wide table

I see that many people have already asked the same question, but unfortunately I can't make it work for me at the moment. So, once again, how can I centre and fit tables larger than that to my report? ...
6
votes
2answers
2k views

Reference table rows by automatic counter

Problem I have defined an environment to automatically number example sentences throughout my document. It uses the tabular environment and automatically numbers the first column of each row using a ...
6
votes
2answers
816 views

Error with hyperref + tabular + footnotes in tabular

Here's the code: \documentclass[12pt,letterpaper]{article} \usepackage{array} \newcommand{\fntxt}[1]{\footnotetext{#1}} \newcommand{\fnstep}{\stepcounter{footnote}} ...
6
votes
4answers
2k views

Footnotes in Tabulars?

Is there a simple, elegant solution to add footnotes in a table (tabular)? Preferably, the solution can also support the cleveref package. EDIT: My intended effect is that, the footnotes should be ...
6
votes
1answer
954 views

tabular, siunitx and input - `Extra }, or forgotten $.`

I'm trying to include data into a tabular environment \usepackage{booktabs} \usepackage{siunitx} \begin{table} \begin{center} \begin{tabular}{SSSS} \toprule {$na^3$} & ...
5
votes
1answer
348 views

Why does adding color to a table row increase the height?

I'm trying to make a beamer slide containing a table with the text in a row styled in a different color. However, the row's height increases when colored, as opposed to the default. The same problem ...
5
votes
1answer
902 views

Tabular with arrows or lines between some cells

I have a table like the one below and want to write this in Latex. what would be the best aproach? I have tried it with Tikz where i can nest a Table but failed with the lines wich connect the ...
5
votes
1answer
671 views

Page breaks in table rows

I want to make a document that contains a synopsis of events, like YEAR HISTORY CULTURE SCIENCE 1770 History para- culture para- science para- ...
5
votes
1answer
289 views

Table with a numbered list

What is the best way to make a table/list that looks like this: 1. Item 1 subitem type date subitem type date 2. Item 2 subitem type date ...
4
votes
1answer
581 views

Add Table in Header with image

I'm trying to create question paper using Latex. Sample copy of expected header for first page is mentioned below. Note: Image above "First Page Header". Can you please suggest, how can I add table in ...
4
votes
1answer
7k views

Regression tables made with esttab in Stata have columns with different widths, using LyX

I am relatively new to LyX and I am trying to output regression results into TeX code, and then insert the resulting tables in a LyX document. The command I use to create the table is: reg y1 x1, ...
3
votes
0answers
501 views

Want to add more column on the left side? [closed]

Want to add more column on the left side? \documentclass{article} \usepackage{pgfgantt} \usepackage{rotating} \usepackage[graphicx]{realboxes} \newganttchartelement*{mymilestone}{ ...
21
votes
3answers
6k views

How to specify a fixed height for all rows in a table?

I have something like this: \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} \begin{tabular}{| c | C{3cm} | C{4cm} |} Short Text & Short Text & Short Text ...
17
votes
3answers
3k 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 ...
13
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 ...