Questions tagged [longtable]

{longtable} is for questions relating to the use of the longtable package, which allows for making tables that can be broken across pages.

Filter by
Sorted by
Tagged with
219 votes
2 answers
476k 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 pages)...
user avatar
  • 2,635
91 votes
4 answers
53k 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?
user avatar
  • 1,279
72 votes
4 answers
69k 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 ...
user avatar
  • 29k
54 votes
3 answers
66k views

how to have a caption on top of longtable?

I want to have a longtable like this: \begin{center} \begin{longtable}{|p{2cm}|p{3cm}|p{7cm}|p{3cm}|} \caption{my caption} \hline 1 & 2 & 3 & 4\\ \hline \hline 1 & 2 & 3 & 4\...
user avatar
  • 841
46 votes
7 answers
37k views

How to solve longtable is not in 1-column mode error?

I'm trying to compile a document with the example code for longtable but I get an error saying that longtable is not in 1-column mode. Suggest me the correct way?
user avatar
  • 982
41 votes
2 answers
11k 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 ...
user avatar
37 votes
5 answers
58k 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: ...
user avatar
  • 373
34 votes
1 answer
11k views

General differences between array, table, tabular, tabularx, longtable, supertabular, longtabu, etc [closed]

What are the general differences between the various table environments that exist for LaTeX? By this I mean: What are their basic purposes? Which ones are the most important ones for new users? Which ...
user avatar
  • 6,237
31 votes
3 answers
67k views

Set longtable to fit the page-width

I would like to set a longtable to fit correctly the page-witdh. From now, I've this situation: and the related tex code is: \usepackage{array} \usepackage{multirow} \usepackage{longtable} \...
user avatar
30 votes
1 answer
10k 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 ...
user avatar
  • 1,244
26 votes
2 answers
3k 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 ...
user avatar
25 votes
3 answers
27k views

Tabularx: Break long tables over several pages

I am making a long table for my thesis correction. It will be a really long table and here is what I have till now: \documentclass[12pt]{article} \usepackage{mathptmx}% \usepackage{tabularx} \...
user avatar
24 votes
1 answer
27k 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?
user avatar
  • 5,109
24 votes
1 answer
92k views

How to convert table to longtable being able to break across pages?

As per question title, how can I convert the following table to longtable with the same result (but being able to break across pages)? \begin{center} \renewcommand*{\arraystretch}{1.5} \begin{table}[...
user avatar
  • 3,665
24 votes
3 answers
11k 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 ...
user avatar
24 votes
2 answers
9k 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 ...
user avatar
  • 4,217
24 votes
1 answer
4k 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 ...
user avatar
  • 363
23 votes
2 answers
10k 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 ...
user avatar
  • 17.7k
22 votes
2 answers
13k 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 ...
user avatar
  • 7,577
22 votes
2 answers
12k 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 page....
user avatar
  • 345
22 votes
1 answer
18k views

Adding row spacing to a longtable?

I want to add some extra spacing between the rows of my longtable - but not for every table of the entire document, just one of them. I've tried to use the \\[dist] mechanism, but with surprising (at ...
user avatar
  • 2,783
22 votes
2 answers
5k 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 ...
user avatar
  • 1,244
20 votes
3 answers
35k 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 \begin{footnotesize}-\end{...
user avatar
  • 611
20 votes
1 answer
16k views

Sidewaystable together with longtable?

I've got a massive sidewaystable (code below). I've been trying different combinations of longtable, supertabular, lscape, rotating, sidewaystable, table etc. but I can't get it to be sideways and ...
user avatar
20 votes
1 answer
862 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 into ...
user avatar
  • 1,786
19 votes
3 answers
8k 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?
user avatar
  • 1,696
19 votes
2 answers
8k 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 ...
user avatar
  • 3,086
18 votes
2 answers
28k views

Problem with fontsize when using longtable

I am using longtable package to make my large table span two pages. However I have set the font size with \fontsize to my table to be quite small. The only problem is that when the table is finished, ...
user avatar
  • 575
18 votes
2 answers
2k 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} \usepackage{longtable,...
user avatar
  • 7,817
18 votes
1 answer
29k views

Landscape-oriented table over multiple pages

I would like to spread my vertical table over multiple pages. I tried it with sidewaystable and longtable, but that put everything on one page. Another idea would be just to create x tables, where x ...
user avatar
  • 419
18 votes
1 answer
16k 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.
user avatar
  • 4,217
18 votes
1 answer
9k views

Start a longtable in Latex at top of next page

I want to use the longtable environment for a table. However, I do not know how to place it at the top of the next page, as I can do with the table environment. Do you know how to do it?
user avatar
17 votes
1 answer
40k views

Vertical lines in a multirow and multicolumn table

I am trying to finish this table scheme but I can't figure out what I am doing wrong. I want to convert those discontinued lines into continuous lines and I want to center the label "Total" between ...
user avatar
  • 273
17 votes
1 answer
4k 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 ...
user avatar
  • 2,040
16 votes
2 answers
2k 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 ...
user avatar
  • 5,571
15 votes
1 answer
13k 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} \...
user avatar
  • 493
15 votes
3 answers
3k views

The longtable environment pushes content below it into the bottom margin of a page

When I have two floating environments on a page (one figure and one table), the longtable can push the content below it into the bottom margin of the page. Here is a minimal example: \documentclass{...
user avatar
  • 2,690
15 votes
1 answer
2k 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 ...
user avatar
  • 151
14 votes
3 answers
9k views

'longtable' caption without incrementing 'table'?

For reasons both complex and confusing, I would like to caption a longtable without incrementing the table counter in the process. I want to have two consecutive longtable environments to be ...
user avatar
  • 7,577
14 votes
2 answers
4k 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 ...
user avatar
  • 535
14 votes
5 answers
1k 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 ...
user avatar
  • 1,549
14 votes
1 answer
3k 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 ...
user avatar
  • 401
14 votes
1 answer
6k 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 ...
user avatar
  • 141
13 votes
2 answers
17k views

longtable misplaced noalign

Question Why am I getting multiple misplaced \noalign errors? Reproducible example \documentclass{scrartcl} \usepackage{longtable} \usepackage{booktabs} \begin{document} \section{Table test} \...
user avatar
13 votes
2 answers
13k views

I don't use \centering, but why must I use \arraybackslash in my table?

I don't use \centering or \Centering in my table below. But I will get errors if I don't insert \arraybackslash. Question: What is \arraybackslash for? It seems so mysterious for me. Why must I ...
user avatar
13 votes
4 answers
16k views

How to change font size of longtable-lines without changing font size of caption?

I'd like to change the font size of all contents of a longtable to footnotesize. However the rest of the document and also the caption (!) shall be (stay) in normal size. (pdflatex is used) How can I ...
user avatar
13 votes
3 answers
6k views

pgfplotstable; longtable with caption and repeating header

I would like to use the pgfplotstable package in order to import data from a .csv file into a multi-page table. I would like for the table to have: a caption above it and its header to repeat at the ...
user avatar
13 votes
2 answers
11k views

Controlling longtable page breaks

Is it possible to specify where the preferred page breaks in a longtable are? I'm trying to create a longtable with three types of rows: rows which should never be followed by a page break rows ...
user avatar
13 votes
1 answer
71k views

LaTeX split long table in multiple pages and resize the width

I am trying to find a way to fix the width of my table to the margin of a portrait page (not landscape) while continuing the table in another page since it is very long. I can adjust the width by ...
user avatar
12 votes
3 answers
2k 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 ...
user avatar
  • 53.6k

1
2 3 4 5
47