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

2
votes
1answer
659 views

Hyphenation within multicolumn

I've got the following table, which I'd prefer not to split, and it's slightly too wide for the page. How can I make some of the column headings hyphenate? I don't want to have to define a fixed width ...
0
votes
1answer
171 views

Why did my exact calculation still produce small gaps on the most left and right table rules?

I have specified each tabular cell width exactly using formula ##1\linewidth-2\tabcolsep-1.5\arrayrulewidth as shown in the following code snippet: \documentclass[dvips,dvipsnames,rgb]{book} ...
7
votes
1answer
856 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
1answer
2k views

Color of square cell in array

I would like to have array with square cells and fill cells with colors. There is done implementation of table with square cells by W. Robertson ...
1
vote
1answer
534 views

Setting table placement as “here” in a multicol environment, spanning 2 columns

I have a problem with table placement. I want the table to be anchored to the position where it occurs in the text (i.e. "here", "h") and the columns should simply wrap around it. The table should ...
1
vote
2answers
175 views

How to align some lines under tabular?

I am using tabular, and I would like to realize something like that: word1 word2 word3 word4 longerword5 word6 word7 word8 So word1,2,3,4,6,7,8 are well aligned, and I do not ...
2
votes
2answers
507 views

How to avoid orphan line of multipage tabular?

There is an orphan line on page 2. How to get rid of it? Minimal Code \documentclass{article} \usepackage[a4paper,margin=5cm,landscape]{geometry} \usepackage{longtable,array} ...
10
votes
1answer
8k 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 ...
4
votes
1answer
608 views

Generate table with dynamic number of columns

Is it possible to create a table with with a dynamic number of columns that depend on some given width, e.g., \textwidth? For example, given a fixed-width table t with size(t) <= 0.5\textwidth that ...
6
votes
2answers
1k views

Line break in the table item

I am creating table in LaTeX and I need to get the text to perform line break automaticaly when it's too long. And if possible, I'd like to get the text alignment to the left. Is it possible to handle ...
3
votes
1answer
1k views

Vertical alignment of subfigures

So I have a document which in a lot of places uses one pstree (part of the pstricks package) and a simple tabular side by side...I do this with subfigures. The problem is that because the pstree image ...
4
votes
1answer
617 views

SQL Markup and CSV Formatting in LaTeX

I have had a quick look for similar questions but I couldn't find anything, so apologies if this is a duplicate. Firstly, I am looking for a way to grab information from external source files (i.e. ...
2
votes
1answer
825 views

Table Cell Alignment - Last Column 'Misbehaving' - Simultaneous Vertical and Horizontal Alignment Problems

I am going a little crazy with alignment in the tabular environment. In the following code I would like both the top-left cell 'Green Die', and the last cell in the 2nd row '6' to be aligned ...
0
votes
0answers
170 views

How to make a table column disappear? [duplicate]

Possible Duplicate: Easiest way to delete a column? I have many table in my document, and I have decided I don't want one of their columns to appear in the output. I don't want to just ...
18
votes
1answer
10k 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 ...
2
votes
2answers
981 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 ...
20
votes
3answers
5k views

Highlighting table cells

I have a large (13x13) table in which I need to highlight a subset of cells. I know that I can set a background color to those cells using colortbl or xcolor. But I need to highlight the table without ...
2
votes
1answer
436 views

right-aligned table from csv

I have a csv file formatted like this one: "","head 1","head 2","head 3" "count 1","23","24","25" "percentage 1","23%","24%","25%" "count 2","53","54","55" "percentage 2","53%","54%","55%" I'm ...
1
vote
2answers
994 views

LaTeX table: line thickness varying and incorrect horizontal alignment

This LaTeX source ( http://pastebin.com/3HdpbQi5 ) yields two types of errors ( http://i.stack.imgur.com/4J87t.png ): The line thickness of the table borders in the primary header row varies and the ...
9
votes
2answers
6k views

How can i set the width of a table?

How can i set the minimum width of a table? I want to have a series of tables that are all the same width?
1
vote
1answer
348 views

Excel2latex table running over page

I have a couple of tables in excel that i would put in my thesis. From this forum I learnt I could use excel2latex to export them into latex. Unfortunately when i tried, it is not working out as it ...
1
vote
2answers
945 views

Right Align Equation Number with hfill in Custom Environment

I have a couple of custom environments that I want to be able to use \hfill to right align the last column (similar to what {align} environment does with equation labels}. I attempted to use \hfill ...
2
votes
1answer
774 views

Aligning multiple tables

I have several tables I'd like to align, but it comes out messed up. I'm using revtex4 for my general layout (two column), and I have this: \begin{tabular}{|c||@{\hspace{12pt}} c ...
11
votes
1answer
2k views

Multiline Header/Footer?

Using LaTeX, I'm trying to make a multi-line header (using \markright), and having a somewhat difficult time doing it. I've tried: Putting a table within the header using ...
9
votes
3answers
12k 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 ...
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 ...
7
votes
1answer
1k views

Text positiong in cell (tabular)

I'm using the beamer class and this code: \begin{tabular}{|c|l|}\hline \includegraphics[scale=0.4]{2_1} & hey ho \\ \hline s & ho hey \\ \hline \end{tabular} and I get this output: ...
3
votes
2answers
286 views

Getting tabulars to line up in the end of two columns

In the following document: \documentclass[twocolumn]{article} \begin{document} \begin{tabular*}{\linewidth}{|c|}\hline test\\\hline\end{tabular*} \vfill \begin{tabular*}{\linewidth}{|c|}\hline ...
7
votes
1answer
369 views

Align number ranges in table

I have a table column that contains ranges of numbers (e.g. 7--12) as well as numbers that are formatted differently (e.g. < 4). These numbers don't align vertically, no matter what kind of ...
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 ...
3
votes
1answer
725 views

line-breaking in longtable

I'm using the longtable environment with the field p{0.5\textwidth}. The text on that field is set with very odd spacing, because latex attempts to justify it both for the left and right column ...
1
vote
1answer
1k views

\newline not working with booktabs?

A while ago I had a question about having multi-line strings in a table cell ( http://tex.stackexchange.com/questions/3748/in-cell-newlines-in-tabular-environments). I remember seeing it working but ...
3
votes
1answer
829 views

Break a table between pages AND rotate it sideways

I have a long table with a lot of columns, so I want it to be landscape. The problem is I can't figure out how to have both a rotated table, and automatic break between pages?
0
votes
0answers
248 views

Include image in a table [duplicate]

Duplicate of: How to Label and Caption a Tikzpicture inside a tabular environment I am trying to include an image inside a table cell. But I am declaring the image using the figure ...
5
votes
1answer
642 views

Prevent xtab breaking table too soon

Xtab breaks a long table spanning multiple pages too soon -- see my screenshot: The output seems rather unsightly to me. Can I make it take more of the available space? Alternatively, is there a ...
3
votes
2answers
8k views

How can I create a LaTeX table with merged cells in 2nd column or later

I wish to generate a LaTeX table with merged cells in the 2nd column. Any examples I have seen so far have merged cells in the 1st column. The text also needs to wrap with in the cell. (couldn't ...
5
votes
2answers
1k views

Maintaining table format with space between rows

I want to put spaces between rows in a table however my current implementation cuts off the vertical lines. I know I can replace \\with {} \ {} \ {} ..., but is there a more elegant solution? ...
2
votes
1answer
1k views

Wide table problem when generating PDF

I have a LaTeX wide table generated from a data frame in R using xtable, but when the PDF is created not all the data is shown, just a part of it, and the other part is hidden on the right of the PDF. ...
7
votes
1answer
764 views

Generating tables with \@for command

I'm making a report template that requires the list of authors to be presented in several different ways, one of which is a table that lists each author and provides a space for them to sign the ...
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 ...
5
votes
2answers
289 views

Creating a table that uses all available space

Is there a way to use tabular or some other method to create a table that expands to use the entire available space? So if I created a table with 4 rows, each row would use 25% of the space. Thanks! ...
4
votes
1answer
3k views

Complex Table Layout

I'm trying to display a fairly complex table using Latex. Here is what I want it to look like (formatting, alignment, borders, columnspan, and rowspan). I would also like the columns to be fixed width ...
4
votes
1answer
770 views

Table wrapping in tables not working

I am having a problem with text wrapping in a long table. Here is a copy of my table: \begin{longtable}[c]{l|b{2in}b{3in} b{2in}} %\centering %\begin{tabular}{llll} Author and Year ...
3
votes
1answer
274 views

Making an enclosing, fitting PDF for a table

I want to make a document out of a single table, for inclusion into PowerPoint, etc., as a PDF just the size of the table, with a small customizable margin. Which document class should I use, and how ...
7
votes
2answers
455 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} ... ...
5
votes
2answers
1k views

Combined header cell in a table

This question is closely related to at least two other ones; namely, Tables of numbers, and slashbox alternative. What I'm after, is the horizontal- and vertical-alignment of row- and column-headers ...
1
vote
1answer
3k views

Centering Text using multirow that overflows onto multiple lines

I am trying to create a table where one column has multiple rows. This is very easy to do using the multirow package. However, if I specify a width for this \multirow and my text overflows, the second ...
1
vote
2answers
158 views

Opposing alignment of multiple lines of long text without exceeding \linewidth

I'm trying to create some documents using the flashcards macros, and I'd like to have the text aligned like follows ____________________________________ | | ...
2
votes
1answer
606 views

makecell package vertical centering of vertical text

I'm using makecell package to write vertical text to my table cells. It works fine, but I have trouble centering it. Normal vertical text (within a {tabular}) is displayed as: \rothead{Some ...
9
votes
1answer
9k views

tables side-by-side using minipage

I'm trying to get three tables side by side using minipage. In spite of my horrific efforts my tables keep stacking on top of each other instead of standing beside what drives me mad. Can anybody spot ...