Tag Info

Hot answers tagged

5

You can include the first 10 (or 12 or whatever) lines of the table before the \endfirsthead (or before the \endlastfoot) commands and then they will stick together. Or you can use \\* rather than \\ at the ends of the rows to discourage linebreaking. Or (perhaps) you could use the needspace package and issue \clearpage if you are already near the bottom ...


4

Still another suggestion: Load the afterpage package and encase the longtable environment in an \afterpage{\begin{longtable}...\end{longtable} directive. This will ensure that the table always starts at the top of a page, thereby maximizing the likelihood that the longtable will fit on two (physical) pages.


4

table encloses its contents in a box which will not break across pages, but which can "float" to a convenient location. longtable gets rid of this box, is able to break across pages, and does not float. Hence enclosing longtable inside a table defeats the entire purpose. Remove table environment. longtable provides a \caption facility and hence you can add ...


4

You are running into the same problem as in "[" as first character in table row. booktabs defines the rules to take an optional argument in the form [..] or (..). The use of (2) on the row immediately following \midrule is being interpreted as an optional argument, yet it doesn't match the definition that's expected with that type of optional ...


3

Longtable are centred by default although you can change to left or right with \begin{longtable}[l]. In the example there is very little difference as the table is anyway forced to be full width by the wide p columns, so there is very little alignment of the table needed. Like tabular, it doesn't really have any global settings for fonts and colours, ...


3

It seems that the crucial difference is that in a current texlive bidi is Package: bidi 2015/02/17 yours is a year older. You should at least update bidi, it apparently has fixes to address this issue.


3

Your document (after the last edit) has \usepackage and \documentclass in the wrong order and a spurious XML comment syntax <!-- I do not think it made the error message that you posted, which is from a different document. \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{|p{2cm}|p{3cm}|p{2cm}|} \hline \caption{A simple ...


3

You need to (a) drop the existing table "wrapper", (b) convert the outer tabular environment to a longtable environment, and (c) use \endhead and \endlastfoot to set off the material that belongs in the header and footer, respectively. The following screenshot shows just the header row and the first two data rows. \documentclass{article} ...


3

\documentclass[a4paper]{article} % All packages included for context \usepackage[margin=1.5in]{geometry} \usepackage{hyperref} \usepackage{apacite} \usepackage{natbib} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{graphicx} \usepackage[capitalise,noabbrev]{cleveref} \usepackage{floatrow} \usepackage{subcaption} \usepackage{longtable} ...


2

Explicit usage of \selectlanguage in a document should be very rare. In your case the correct command to use is \foreignlanguage: \documentclass{article} \usepackage[T2A,T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[slovak,ngerman]{babel} \usepackage{droid} \usepackage{tipa} \usepackage{array,longtable} ...


2

Put \singlespacing before longtable and \doublespacing after if you want to return to that setting.


1

The lines &&&&&&&&&&&\\[-12px] Introduce negative space all over the table, and depending where the page breaks will cause the following row to overprint the header. Removing all these lines causes the problem to go. In addition there is a warning from fancyhdr: Package Fancyhdr Warning: \headheight is too ...


1

longtable breaks naturally at the end of the page, as shown here where I have doubled the length of the table, and reduced the length of the page, so it goes on to page 2. \documentclass[a4paper, 10pt]{scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[italian]{babel} ...


1

% arara: pdflatex \documentclass{article} \usepackage[english]{babel} \usepackage{microtype} \usepackage{caption} \usepackage{booktabs} \usepackage{array} \usepackage{longtable} \usepackage{ragged2e} \usepackage{calc} \begin{document} ...


1

Take a look at the longtable package documentation, section 3 "Captions and Headings", especially \endhead and \endfirsthead: Put a \caption without "Continued" into the \endfirsthead section of your longtable and \caption with "Continued" into the \endhead section and voilá, you should get what you want.



Only top voted, non community-wiki answers of a minimum length are eligible