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

learn more… | top users | synonyms

30
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?
29
votes
3answers
5k 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 ...
22
votes
2answers
1k 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 ...
20
votes
1answer
26k 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 ...
20
votes
2answers
477 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 ...
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 ...
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 ...
17
votes
1answer
942 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 ...
15
votes
1answer
429 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
679 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
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} ...
13
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 ...
12
votes
2answers
4k 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 ...
12
votes
1answer
116 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} ...
11
votes
2answers
801 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
366 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 ...
11
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 ...
11
votes
1answer
621 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
2answers
1k 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 ...
10
votes
3answers
286 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
5k 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
4k 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} ...
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
300 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
246 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
392 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
2answers
404 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
3answers
2k views

Longtable caption numbering

I am trying to prevent a table from showing up in the list of tables. I used long table to create the table. This is the first table in my document. I know \caption*{} command should do the trick but ...
8
votes
1answer
3k views

Sidewaystable together with longtable?

I've a massive sidewaystable (code below). I've been trying different combinations of longtable, supertabular, lscape, rotating, sidewaystable, table, etc, and I can't get it to be sideways and also ...
8
votes
2answers
332 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 ...
8
votes
1answer
203 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
770 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
3answers
1k views

How to prevent page break between section heading and longtabu table?

I have created a minimal working example (MWE) consisting of a section and a longtabu table. \documentclass{report} \usepackage{longtable,tabu} \begin{document} An initial line of text \vskip ...
8
votes
1answer
536 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
2answers
95 views

Longtable and floats: wrong table breaks on pages with floats (part 2)

I think I may have stumbled upon an undocumented feature regarding page breaking in longtable. The following MWE produces (at least in my TeXlive 2014 setup) a document in which the last paragraphs ...
8
votes
1answer
141 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
1k 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
3answers
929 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
2k 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
1answer
3k 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
1k views

How to wrap text around a landscape table over multiple pages? \sidewaystable or \landscape + \longtable

I am trying to create a landscape table that breaks over multiple pages. I have successfully done this with the following: \begin{landscape} \begin{longtabu} to \textwidth{some columns} \caption[my ...
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
3answers
9k views

How to use \footnotesize with longtable command?

I am using \longtable command in a thesis preamble. My problem is that my data are large numbers, and I need to reduce the size of the table to footnote size. I tried using ...
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 ...
7
votes
2answers
2k 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
650 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
2answers
117 views

How to achieve same table width with different column numbers

I have to print several tables with distinct number of columns. I'm using lingtable because sometimes these tables contains over 300 rows each. Here's the problem. Even defining a fixed width in cm, ...
7
votes
1answer
450 views

Keeping two rows on one page using longtable

I am creating a longtable which spreads over multiple pages. The problem is that the coefficients and standard errors which are in two consequential rows sometimes get separated. How to I hold those ...