Tagged Questions

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

17
votes
5answers
898 views

How to apply a macro to each column of a table

I want to apply a macro to all the cells of a column with the cell content as the input to the macro. Is this possible? For example if the cell contents have the word TEST, the macro should take TEST ...
4
votes
2answers
1k views

\parbox “textwidth” for the combined width of a subset of table cells

I would like the parbox width of the text in a multicolumn to be calculated automatically from the combined width of the cells that the multicolumn spans. (Their width will vary in different copies of ...
4
votes
1answer
3k views

Tabular, make a column or a row emphasized

I want to create a table and to make all cells of a column emphasized. Is there a simple way to do it, or do I have to emphasize every single cell?
3
votes
1answer
430 views

Diagonal separator in table corner in ConTeXt

How can one create a diagonal separator in a table corner in ConTeXt (like the package slashbox for LaTeX)?
2
votes
1answer
393 views

Table Reference Format and Hyperlinks

I'm using hyperref package and refer to hundreds of tables from the appendix. My labels for tables look like: \label{table:some-numbers}. I then refer to it from the main text as ...
4
votes
1answer
811 views

Rotating text in a table, and getting hlines in the right place.

I have a table where the first line includes quite some text, and then each of the other cells is fairly small (a symbol or two maximum). At the moment, my code looks like this: ...
10
votes
6answers
854 views

How do I expand a macro into a tabular head?

I would like to be able to define a macro that can be used in the tabular definition. How can I do this? This does not work: \documentclass{article} \begin{document} \gdef\buildtabularhead{|||} ...
4
votes
5answers
6k views

Formatting table

I have a table that is created with the following code: \begin{table}[htdp] \caption{Comparison of Elements in Air on the Space Station and sea level on Earth} \centering \begin{center} ...
2
votes
1answer
342 views

Include source text from URI (e.g., Wikipedia)

Background Wikipedia content is reasonably current and free to use. Consider the tabular content at: http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Java Problem Copying ...
4
votes
1answer
390 views

ConTeXt - indented table, but horizontal rules go to left margin

This will be my last ConTeXt question for a little while...I've set up \setuptabulate[indenting=yes,margin=40pt] This works only to the extent that the table cells are indented appropriately - but ...
9
votes
2answers
726 views

Protrusion of fractions in tabulars

I have a number of tables in a book that I am busy with that have quite a few tables of the general form shown below: If you notice the fractional part of the numbers 5 1/2 and 16 1/2 protrude to ...
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 ...
3
votes
1answer
946 views

Table cell overflow

Consider this document example: \documentclass[a4paper,draft]{article} \usepackage{calc} \usepackage[demo]{graphicx} \usepackage{tabularx,multirow} \usepackage{geometry} \geometry{hmargin=0cm} ...
4
votes
1answer
579 views

Figure in the table with Tikz

How do I align a figure Tikz item at the top of the table? Its my result. I need the second alignment.
5
votes
1answer
1k views

Creating tables with spanning rows/columns

I'm trying to create a table which looks like but I'm not really sure how to incorporate multiple spanning rows and columns together (to add 'Organism 1' and 'Organism 2'). I've gotten to this ...
5
votes
2answers
729 views

xtabular* does not work on two columns

I'm trying to split a table in several pages, for doing this I'm using the xtab package and xtabular. However, the behavior of the xtabular* environment (that supposedly should break the two column ...
7
votes
1answer
3k views

Putting LaTeX table legend in a “x\y” style [duplicate]

Possible Duplicate: Tables of numbers Is it possible to put a "x\y" style legend in one cell (maybe be made up of several cells) of a table? It would be great to make the 'x' slightly lower ...
19
votes
2answers
21k views

How to include enumerate in tabular?

I would like to have text in one column table with multiple rows, but I need to include an enumerate in one cell. I get errors and read on the Internet the problem is in combining environments with ...
11
votes
5answers
2k views

Improve intercolumn spacing of this table

I'm trying to spruce up the appearance of this table: \begin{tabular}{rr@{\hspace{2em}}rr@{\hspace{2em}}rr@{\hspace{2em}}rr} \toprule \multicolumn{2}{c@{\hspace{2em}}}{\textbf{Word C}}& ...
2
votes
2answers
1k views

Starred version of “xtabular” not working

I want to insert a long table in a two-column paper. I tried "tabular" first, but the problem is that it doesn't divide the table among pages. Then people in this post suggested that I use xtab: In ...
28
votes
2answers
8k views

How to repeat top rows (column headings) on every page

I have a big table which contains hundreds of rows. I want to repeat the top two rows on every page of the table. How can I do it in TeX?
2
votes
3answers
248 views

How to set the width of the cell and allow it to take multiple lines?

I have a table below \documentclass[a4paper,12pt]{article} \begin{document} \begin{quote} \begin{tabular}{|c|c|c|c|c|} \hline \multicolumn{4}{c}{Table title}\\ \hline Fuze Type ...
1
vote
1answer
417 views

Table Out of Page [duplicate]

Possible Duplicate: In LaTeX, how can I make a table that takes up more than a single page? I have a big table which one page is not enough for. I would suppose that since LaTeX is WYSIWYM ...
1
vote
1answer
510 views

Drawing lines in tables?

I use the following code to draw a table: \makebox[\textwidth]{% \begin{tabularx}{\textwidth}{|X|S|S|S|S|S|X|} \hline & $--$ & $-$ & $-/+$ & $+$ & $++$ &\\ \hline The ...
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 ...
3
votes
1answer
363 views

paper edition of my university facebook

I'm trying to make the paper edition of the face-book of my university. I got some constraints; for example, I have to do very small margins. \documentclass[a5paper,twoside]{book} ...
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 ...
4
votes
3answers
176 views

Table environment that can break inside a cell

I am wondering if there is an environment for creating a table in LaTeX that will not only break at \hline, but instead can break in the middle of a cell. I have to write very long reports in one ...
6
votes
3answers
330 views

Adding colour to table cells when decimals are aligned with arrays and {.} used in the column definition

I've got a table (below) that aligns the decimal points of my data - I wish to highlight a value (2 adjacent cells), however this leaves a white space where the decimal point is! If I increase the ...
2
votes
1answer
791 views

Aligning equations by row and column — with vertical lines

I want to include two sets of equations side-by-side in a table. Here is my example: \documentclass{article} \usepackage{amsmath} \newcommand{\eqnbox}[2]{ ...
10
votes
2answers
15k 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 ...
7
votes
1answer
1k views

List environment inside the tabular environment: extra line at top preventing alignment

I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one ...
31
votes
3answers
45k views

Is there a way to slightly shrink a table, including font size, to fit within the column boundaries?

I have a table that is just a little too wide for a 3.33" column. Is there a way to simply shrink the table a little to make it fit? I'm OK if the 10pt font becomes 9pt-something. Here is an example. ...
8
votes
2answers
2k views

How to make really wide tables narrower

Is there a way to fix extremely wide tables? I have the following table: \begin{tabular}{lllll} \toprule & Manual Tests & Randoop 2.5 Minutes With GUI Code & ...
7
votes
2answers
514 views

Aligning columns, but allowing for text inbetween

I need help aligning text that spans multiple lines where I have Verbatim code in between. Here is a mock example to show what I mean: Fruit Amount Apple $3.00 \begin{verbatim} ... ...
50
votes
3answers
83k views

How to force a table into page width?

I have the following table: \begin{table}[htb] \begin{tikzpicture} \node (table) [inner sep=0pt] { \begin{tabular}{ l | l } {\bf Symptom} & {\bf Metric} \\ \hline Class that has many accessor ...
1
vote
2answers
460 views

synttree in tabular: vertical alignment of other columns

synttree is a package that allows you do define tree graphs in an easy way. Now I'm trying to put such a tree in a table cell like so: \begin{tabular}{lp{3cm}} ... My left column & \synttree[A ...
3
votes
2answers
4k views

Underfull hbox error on tabular context

I am having a problem with the following document, pdflatex is continuously complaining with Underfull \hbox (badness 10000) in alignment at lines 3--7 in this sample, but it does for many more lines ...
9
votes
2answers
668 views

Using an image as a table

I have an image containing tabular data and would not like to convert this to a real table. What I do want is for this image to have a proper caption and be included in the listoftables. Is it ...
1
vote
2answers
2k views

Bad spacing of table inside subfigure

I have a figure setup as follows: \begin{figure*}[t!] \centering \subfigure[Part 1] { \includegraphics*[totalheight=2in,origin=c]{ost100} } \subfigure[Part 2] { ...
3
votes
2answers
3k views

Default value for \addlinespace from booktabs

In the booktabs package documentation the command is described in the following: Occasionally we want to put an extra space between certain rows of a table; for example, before the last row, if ...
9
votes
1answer
3k views

LaTeX template for use cases

Currently I am trying to create a template in LaTeX for my team members in order to create a set of use cases. I thought of using tabular to create something like the picture below 2 (without colors). ...
9
votes
3answers
15k 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 ...
10
votes
2answers
18k views

Table Border Options

\begin{tabular}{|c|c|c|} Column 1 & Column 2 & column3 \\ \hline second row & & \\ \hline \end{tabular} Please help me with table border options. Using | I can draw thin solid ...
6
votes
4answers
2k views

Table with rounded corners?

This table I can create with this code: \begin{tabular}{|l|l|} \hline \multicolumn{2}{|c|}{Team sheet} \\ \hline GK & Paul Robinson \\ LB & Lucus Radebe \\ DC & Michael ...
3
votes
1answer
335 views

Maximizing page usage for a table

I'm printing a table enclosing 4 other data tables, one per page, and would like to maximize the space available by reducing the margins as much as possible. I still need the page number, but wonder ...
17
votes
5answers
9k views

bordermatrix with blocks

I need to write a complicated matrix, that has a structure as in the attached picture.
12
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 ...
4
votes
2answers
111 views

how do I set up a table in a page such that it is flipped?

I have a table which is too wide to appear horizontally. I want to flip it such that it appears vertically, and put it in a page by itself (no other text appearing in that page). How would I approach ...
1
vote
1answer
1k views

Using tabular in fancyhdr

For my header page layout, I use fancyhdr. I use tabulars in the headers. The following is my code. \documentclass[titlepage,a4paper,12pt]{article} %***************************** preamble region ...