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

learn more… | top users | synonyms

32
votes
2answers
11k 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?
31
votes
3answers
7k 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 ...
26
votes
1answer
41k 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 ...
23
votes
2answers
2k 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
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 ...
20
votes
2answers
573 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
2answers
3k 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
1k 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
2answers
5k 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 ...
15
votes
1answer
479 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
748 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
1answer
125 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
1k 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
449 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
4k 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
674 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
370 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 ...
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
1answer
6k 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
3answers
316 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
610 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 ...
10
votes
1answer
5k 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
312 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
1answer
4k 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.
9
votes
0answers
179 views

Doing things to every page of a multi-page table

So, the designers did their job and specified coloured backgrounds and rounded corners for all tables. Like so: As described here, this requires doing nasty things like putting the whole table ...
8
votes
2answers
451 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
3k 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
4k 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
438 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
209 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
4k 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 ...
8
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 ...
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
903 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
3answers
2k 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
625 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
11k views

Vertical Alignment in multirow using cells with >1 lines

I want to vertically align (best would be to center) the text ("TEST") in the left (yellow) column of the following table. It works fine with multirow when every row has exactly the hight of one line: ...
8
votes
1answer
3k 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 ...
8
votes
2answers
217 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
159 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
4answers
522 views

How would you reproduce the Leibniz binary table

I would like to reproduce the original Leibniz binary table (as seen here). The most precise the better...
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
1k 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} ...
7
votes
3answers
11k 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
3answers
990 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 ...