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

2
votes
2answers
297 views

Macro behaviour different inside tabular environment

I have a lot of problems lately with macros expanding (or not expanding) at unexpected times, so thought I was having a related problem here. But, in this case, things are working as I want outside of ...
6
votes
2answers
11k views

How to set table size to \linewidth without using a package such as tabularx?

PLOS journals provide the following instructions for preparing a LaTeX manuscript: Do NOT use any other packages than those specified in the template. If you use any other packages, your ...
1
vote
1answer
512 views

Align a parbox at the bottom of a table

Below, how can I align the \tiny text in the \parbox at the end of the right column table so that its last line is on level with the last row of the left column table? In general, it would not be a ...
8
votes
1answer
466 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 ...
0
votes
1answer
768 views

Applying a function to column of table

I got Bruno's solution to work but now xcolor bizarrely gives me 'TeX capacity exceeded' when I use \rowcolors: \documentclass{article} \usepackage{ltablex,colortbl} \usepackage[table]{xcolor} ...
2
votes
1answer
527 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 ...
8
votes
1answer
7k views

Auto-fit table column widths based on content

Is there any solution in LaTeX tables that implements similar functionality to MSWord's AutoFit?
10
votes
2answers
12k 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
366 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
1k 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 ...
1
vote
2answers
1k 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 ...
58
votes
3answers
3k views

Easiest way to delete a column?

I have a set of 10 tables and each has an extra column that I don't want. Specifically, these tables are descriptions of database tables exported by phpMyAdmin, and they all have a "MIME" column that ...
47
votes
4answers
51k views

Adding space between columns in a table

I notice that the space between each column of a table in LaTeX is not quite wide (at least for me). Is there any way to set this? I found the \hspace, but I don't get how to use this in the table. ...
2
votes
1answer
1k 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 ...
4
votes
1answer
728 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. ...
17
votes
2answers
10k views

How can the margins around a table set to 0pt?

I need to put a table inside another table, and would like to set the outside margins of the inner table to 0pt. How can I do this (in particular for tabularx, but hopefully this would be the same for ...
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
1answer
509 views

Why is the left column of this table vertically-aligned to the bottom, no matter how I specify the column?

This document produces a table that mostly looks like I want it to look... except that I can't get the text in the left-hand column to be aligned in the vertical center. What I would really like is ...
4
votes
1answer
973 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 ...
4
votes
1answer
1k 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
256 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 ...
9
votes
2answers
825 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? ...
3
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
961 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 ...
5
votes
2answers
368 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! ...
34
votes
4answers
155k views

Tabular: title above and caption below?

I have a table that I would like to put the Title above and a caption below. Intuitively (though I know how troublesome intuition can be in something like LaTeX), I should be able to do as below: ...
21
votes
4answers
7k views

Align large vertical delimiters (brackets) to rows of a table?

I’m trying to typeset a table of data, with brackets (i.e. }) at the right-hand side to show a classification of the rows.  Something like: ----------------------- | Aardvark | Armenia | \ ...
4
votes
1answer
897 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 ...
4
votes
2answers
5k views

Background for table cells in LyX

The title speaks for itself - how do I choose a background color for table cells in LyX?
3
votes
1answer
347 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 ...
2
votes
1answer
1k views

Dealing with Long Table head entries ?

As seen below, my goal is to save some space. For example, Applied Model Logistic Model The code i'm using to generate the table is: ...
2
votes
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 ...
5
votes
1answer
2k views

Big table with rotated column labels using booktabs

I'm trying to get a big table to fit into my document using the booktabs package, but it is too wide. An example of a couple of rows of the table is given below. I'm using the ...
10
votes
1answer
14k 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 ...
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 ...
7
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?
8
votes
2answers
235 views

Convert macro with one argument to switch

With the package array, I want to define a new column type for my tables with the command \newcolumntype{U}{>{\switchon}{l}<{\switchoff}} However, the command I’d like to use is not a switch ...
4
votes
2answers
505 views

Problem in visualizing tabular with TikZ

I'm quite new to LaTeX (I've used it at university for some basic formulas and ready to use templates) and I'm getting again into it for graphics stuffs: I love its clearness. I'm trying to make a ...
2
votes
1answer
432 views

Problem with side-by-side tables

I've checked out related questions here, and found similar answers via Google, and still can't figure out why the following code does not produce two side-by-side tables. They are narrow enough to fit ...
4
votes
1answer
456 views

Shifting text out of tabular cell

Is there a simple and robust way to achieve what is illustrated by the two black arrows below, i.e., shifting the title in a right-aligned column right by a fixed amount. ...
3
votes
2answers
2k views

How combine make diagonal column heads in table with multicolumn headers

I want to fit this table on a portrait format page and make the columns that show numbers to be of equal width however, type 3 has a longer name than the others, hence setting the column heads ...
3
votes
1answer
789 views

Create environment inside another environment?

Why can't I define an environment, that encloses another tabularx environment inside it? For example, why can't I do this: \newenvironment{customTabular}{ % This is the begin code ...
2
votes
1answer
715 views

How to remove colon(:) on longtable suffix caption

Using svmono package and \renewcommand\tablename\{Tab.}. When I use table, the caption shows “Tab.1 Bah Bah”. But if I use longtable, the caption shows “Tab.2: Bah bah”. How to remove colon as “Tab ...
2
votes
1answer
781 views

How to “glue” the caption to the table (stay on the same page as the table)

Normally, my captions stay with the table (cannot remember my exact example - couldn't replicate it - but I am now using the booktabs package anyway so let us take this one just in case this one is ...
4
votes
1answer
1k views

Top-align two parboxes with tables

I am looking for a two-column solution: The left column contains one table, the right column several tables. I was thinking of using parboxes as follows: \parbox[t]{2cm}{\vspace{0pt} ...
5
votes
1answer
4k views

Color running over text in multirow column

I have a simple table with 2 multirow cells. However when I apply background color, it covers the lower portion of the multirow cells and cuts through the middle of my text entry which is obviously ...
6
votes
1answer
5k views

What are the correct arguments for overlayarea?

When I compile the following code, pdflatex takes up 100% of one of my CPU and doesn't stop. I'm probably passing wrong arguments to overlayarea, since I have no idea what they should do (the ...