Home

longtable

Longtable is a LaTeX package that provides the longtable environment, enabling tables that extend over more than one page. It addresses the limitation of the standard tabular environment, which cannot break across pages. By using longtable, a table can automatically insert page breaks and repeat header rows on new pages, keeping the data readable.

To use it, include \usepackage{longtable} in the document preamble. A longtable begins with \begin{longtable}{column spec}. The

Captions in longtable are associated with the table via \caption and can be referenced with \label. The

table
can
contain
a
caption
and
label,
typically
placed
at
the
top.
The
header
and
footer
lines
are
defined
using
the
special
anchors:
\endfirsthead
marks
the
end
of
the
first-page
header;
\endhead
marks
the
header
to
repeat
on
subsequent
pages;
\endfoot
marks
the
footer
on
all
pages;
and
\endlastfoot
marks
the
final
page's
footer.
A
typical
pattern
places
the
column
headings
before
\endfirsthead,
then
repeats
a
header
after
\endhead,
and
defines
continuation
notes
after
\endfoot.
Data
rows
follow
after
\endlastfoot.
Longtables
are
not
floating;
LaTeX
will
break
them
across
pages
as
needed,
and
the
resulting
table
appears
in
the
text
flow
where
placed.
package
cooperates
with
other
packages
such
as
booktabs
for
improved
horizontal
rules
and
with
packages
affecting
page
geometry.
Limitations
include
the
complexity
of
including
footnotes
inside
cells;
several
workarounds
exist
(such
as
tablefootnote
or
threeparttable).
Longtable
is
suited
for
large
data
tables
in
reports
and
theses
where
a
single-page
table
is
insufficient.