2

I'm using supertabular to break a table across two pages, but when the table continues on the second page, it resets the width of the table cells based on the first row that carries over to the second page. I would like the table cell widths to take into account the content of the cells in the full table, and thus remain constant.

\documentclass[12pt]{article}
\usepackage{lipsum,supertabular}
\begin{document}
\lipsum[1-3]
\begin{supertabular}{ll}
    123456789 & abcdefghijklmnopqrstuvwxyz\\
    123456789 & abcdefghijklmnopqrstuvwxy\\
    123456789 & abcdefghijklmnopqrstuvwx\\
    123 & abcdefghijklmnopqrstuvwxyz\\
    123 & abcdefghijklmnopqrstuvwxy\\
    123 & abcdefghijklmnopqrstuvwx\\
    123 & abcdefghijklmnopqrstuvw\\
    123 & abcdefghijklmnopqrstuv\\
    123 & abcdefghijklmnopqrstu\\
\end{supertabular}
\end{document}
3

1 Answer 1

3

Using longtable rather than supertabular takes care of that automatically. Add [l] as an option to left-align the table (centered by default).

\documentclass[12pt]{article}
\usepackage{lipsum,longtable}
\begin{document}
\lipsum[1-3]
\begin{longtable}[l]{ll}
    123456789 & abcdefghijklmnopqrstuvwxyz\\
    123456789 & abcdefghijklmnopqrstuvwxy\\
    123456789 & abcdefghijklmnopqrstuvwx\\
    123 & abcdefghijklmnopqrstuvwxyz\\
    123 & abcdefghijklmnopqrstuvwxy\\
    123 & abcdefghijklmnopqrstuvwx\\
    123 & abcdefghijklmnopqrstuvw\\
    123 & abcdefghijklmnopqrstuv\\
    123 & abcdefghijklmnopqrstu\\
\end{longtable}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .