{longtable} is a package for making tables that can be broken across pages.

learn more… | top users | synonyms

26
votes
3answers
3k views

How can I make a table that takes up more than a single page?

I've got data that I need to include in a table, but there's a lot if it. I've played with the font size and table formatting as much as I can, but the table still won't fit on the page. Is there ...
24
votes
2answers
5k 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?
20
votes
2answers
341 views

How to print subtotals in each page of a long table?

Some invoices need print a large list of items. In this case, and in my country, invoices must print the subtotal of the previous page for each break page, and add to the last subtotal the accumulated ...
19
votes
2answers
736 views

Column-wise break of extra wide tables

I have to plot geochemical data tables that are like this table , i.e. with a header column, but that have much more sample columns. When having too many columns, the table has to be broken at a ...
17
votes
3answers
2k 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 ...
16
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 ...
15
votes
1answer
335 views

How to make a long table split on even/odd pages?

On an A5 document, I want to print a long table, split on several pages (using longtable I know) but I also need the 2 columns of that table to be on each side of the document: left column on even ...
13
votes
5answers
587 views

Editing *existing* multipage TeX tables in a spreadsheet-like interface?

Is there any GUI/interface/package that will enable me to edit existing data in columns of my super-complicated multipage TeX table? Currently, I count the "&"s to get to the correct column and ...
13
votes
1answer
512 views

Multi-page with Tabulary?

I know that you can combine tabularx and longtable functionality with either ltxtable or ltablex, but is there something similar for tabulary? My searching has come up dry when looking for any way to ...
12
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
1answer
101 views

Adding a shadow to a longtable?

I've already found this answer on how to add a shadowbox around a normal tabular environment. I'd like to add a shadowbox to a longtable environment. Is this possible at all? \documentclass{article} ...
12
votes
1answer
2k views

How to remove top and bottom whitespace of longtable?

I am using longtable instead of tabular environment and noticed that it puts some additional whitespace at the top and at the bottom of the table. Is there some way to remove it (something less hacky ...
11
votes
2answers
527 views

Longtable: page breaks within row possible?

I am editing a longtable. Some of my cells contain a lot of text. Page breaks seem to happen only where table rows end/begin. I'd like, however, for the rows to span pages; it's fine with me if, for ...
11
votes
1answer
544 views

Complicated footnote within longtable environment

I have a footnote that explains color coding within a complicated longtable. I would like this footnote to appear on all pages of the longtable. However, the way I have it now, the footnote itself is ...
10
votes
2answers
1k views

Strange line spacing effects in longtabu

I got some strange effect with longtabu: As you can see the line with λ seems to be closer to the above line than to the one below of it. I cant’t figure out why … This is the code with which I ...
10
votes
3answers
251 views

Watermark for table row

I have a longtable with some columns, all of fixed with (e.g. p{3cm}), so all rows are of the same known width. I want to add a textual watermark (like "New") behind some rows. Of course the rows can ...
10
votes
1answer
280 views

When using longtable, my table counter starts from 2 rather than 1. Why?

When using longtable, my table counter starts from 2 rather than 1. Why? \documentclass[12pt]{article} \usepackage{xcolor} \usepackage{array,booktabs,longtable} %\extrarowheight5pt ...
10
votes
1answer
4k views

how to align longtable at the left side

I'm using longtable package to create tables, that take more than one page. But be default longtable is centered. How to left-align a longtable?
10
votes
1answer
3k views

Longtable vs. supertabular: Which is right for which job?

I have a fixed-column long table, with much text inside, that spans about three pages. I set it using the supertabular package, and for the most part it is working (I will still have to go back to ...
10
votes
3answers
3k views

How do I create a really long table in a two column layout?

I have a table that has about 130 rows. I tried using the longtable package, but it does not work with two column documents. The table will be starting near the top of the left column, and it should ...
9
votes
2answers
269 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
2k views

How to add vertical space struts after hline?

I know the table trick of adding "struts" in the first line after and the last line before a \hline. I use it throughout my document, and it looks good that way. However, now I am working within a ...
9
votes
2answers
162 views

Boldfacing an entire row in a longtable environment

I have a really long \longtable - some 150 rows. I need to make certain rows (~80 of them) boldface and leave the other ones normal. But just putting {\bf a & b & ... & z} \\ causes an ...
9
votes
1answer
15k views

Make a table span multiple pages

I have a table that takes up a full page, but I want it to start on a page that already has some text and then continue onto the next page (i.e. it's ok if the table gets broken up and spans two ...
8
votes
2answers
329 views

longtable changes the page heading

Consider the following MWE: \documentclass{article} \usepackage{kantlipsum} \pagestyle{headings} \usepackage{longtable} \begin{document} \section{First} \kant[1] % using this longtable changes ...
8
votes
1answer
181 views

Referring to specific list item with hyperref

using the following code, when I click on references (having red boxes), they do not refer to proper places. \documentclass{article} \usepackage{array,longtable} \usepackage{hyperref} ...
8
votes
1answer
170 views

How to prevent page break between section title and table

I have several consecutive subsections which only contain one longtable each, right after the subsection title. So it happens that some of the subsection titles are at the bottom of the page and the ...
8
votes
1answer
3k views

How to fit landscape multi-page table to textwidth

\usepackage{longtable} \begin{landscape} \begin{table}[!htb] \centering \resizebox{\linewidth}{!}{% \begin{longtable}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} % Table here \end{longtable}% }% \end{table} ...
8
votes
1answer
560 views

Unable to Remove Vertical Space Before and After Lists within longtable

All the tricks to remove vertical space before and after itemize lists (using enumitem) seem to work well in table/tabular environments, but not in longtable. The following MWE illustrates the ...
8
votes
1answer
2k views

longtable multirow problem with cline and nopagebreak

I have a problem using with the package lontable and multirow together. It seems that the \* is not avoiding the page breack, if I'm using \cline{i-j} just afterwards. Here the original code for ...
8
votes
1answer
399 views

Vertical spaces above and below longtabu

This is, in a way, a follow-up-question to New table-environment, spaces and enclosing { } in a new environment, which has already been answered conveniently by @egreg. Please compile this MWE to ...
8
votes
1answer
122 views

Adding some text on a page break

How can one test if certain chunks of text (say, numbered questions in a questionnaire) is split between two pages and add automatically related text ("Continued question NN") on the top of the second ...
7
votes
3answers
842 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?
7
votes
2answers
781 views

Underfull \vbox in each longtable… can it be fixed or must it be ignored?

I got some strange "underfull \vbox (badness 10000) detected at line ..." warnings, obviously at each of my "longtable"s. Is there a way to fix them (I actually don't see the cause) or do I have to ...
7
votes
3answers
823 views

datatool with longtable

I have a CSV file that has many rows. I want to typeset these rows into a table using longtable and datatool package. However just before before the "lastfoot" (which says concluded) I am getting ...
7
votes
2answers
1k views

Longtable does not break correctly when used with \specialrule instead of \hline

I'm writing an application that generate latex code, therefore the solution must be the most generic possible to ensure that it will generate clean pdf all the time. I would like to let my users ...
7
votes
2answers
179 views

Line down the side of the page

At the moment I'm using the {tabular} environment to distinguish examples in a document I'm writing: \begin{tabular}{r|p{11cm}} \emph{Example} & [Lots of text and equations] \end{tabular} It ...
7
votes
2answers
2k views

Splitting a wide table or a longtable into two blocks

I have a very wide table (code below). I would like to put a small gap between the data under "First Group" and "Second Group" - two of the main multicolumns column headers. I tried putting in a ...
7
votes
2answers
1k views

How to use a longtable with only one entry in the list of tables

I'm using longtable to spread my table over three pages. Unfortunately the caption is also added three times to the list of tables. Is is possible to have it displayed only once?
7
votes
1answer
2k views

How do I set right alignment in a longtable column with a fixed width?

How do I set right alignment in a longtable column with a fixed width? I have \begin{longtable}{p{3cm}p{8cm}} and I'd like my first column to be aligned on the right.
7
votes
1answer
459 views

Vertical line in longtable

I would like my vertical line to be slightly detached from the horizontal lines. I am using \usepackage{longtable}. \footnotesize \begin{longtable}{r | p{10cm}} \caption{My caption 1\label{1}}\\ ...
7
votes
1answer
318 views

\usepackage[group-separator={,}]{siunitx} Not working with longtable?

I have a table with very long counts (in the millions), so I would like to add commas. I have tried to use siunitx in a variety of ways in the preamble: \usepackage[group-separator={,}]{siunitx} ...
7
votes
1answer
894 views

Usage of longtable (or equivalent) and pgfplotstabletypeset

I'm a new user of TikZ pgfplots and pgfplotstable and have been stoked to discover how easy it is to go between Matlab (via matlab2tikz and writing to CSV) and LaTeX. I'm getting a little more ...
7
votes
1answer
387 views

In-row table page break

I'm stuck on a problem for hours. I'm using the tabularx environment to create a double-column table where the second column takes up several lines. An example of that table is shown here. Since such ...
7
votes
1answer
796 views

Is it possible to use tabularx inside a longtable environment?

Is it possible to use tabularx inside a longtable environment? If not, is there any way I can get the "X" funcionality of tabularx with the option of long tables ---In order for me to be able to ...
7
votes
1answer
497 views

Bad width of head of longtable

Here is an MWE: \documentclass[a4paper,11pt]{article} \usepackage{soul} \usepackage{amsmath} \usepackage{amssymb} \usepackage{longtable} \usepackage{booktabs} \usepackage{multirow} ...
6
votes
2answers
453 views

longtable in beamer environment (lacks headers/footers)

In Beamer, I wish to use the longtable package to break up tables across multiple frames automatically. I am aware of the xtab package, which works fine in Beamer, but I prefer longtable as it is the ...
6
votes
3answers
738 views

longtabu and scrpage2: line breaks in page header cause compilation errors

Please consider the following MWE: \documentclass{scrartcl} \usepackage{longtable,tabu} \usepackage{lipsum} \usepackage{scrpage2} \chead[Headline 1\\ Headline 2]{Headline 1\\ Headline 2} ...
6
votes
2answers
2k views

Vertical aligning text and vertical height of rows in longtable environment

I have now been working on fixing this problem for some time and I have read through some forums on the Internet and tried different things, but I can't solve this problem. I am looking to have some ...
6
votes
1answer
770 views

How does LaTeX make line-breaking for word that can not fit in cell?

Often in my tables LaTeX doesn't want to line-break a word that can not fit in a cell. How I can teach it to split such a word? As you can see in my example below the same word in some cases will be ...