2

For a cooperative latex document with a lot of authors, it was decided to use tables for certain structures. Therefore, I have to cope with the problem of automatic page breaks of tables that only consist of 1 column and several rows. The column often contain different lists. The attached example shows the problem: The table does not break within a list. Is there a way to work around this issue?

\documentclass{book}
\usepackage{longtable}
\usepackage{blindtext}
\usepackage{paralist}

\begin{document}
\begin{longtable}{|p{\textwidth}|}
\hline
\blindtext[1]\\
\blindtext[2]\\\hline
\begin{compactenum}
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\item test
\end{compactenum}\\
\blindtext[2]
\hline
\end{longtable}
\end{document}
  • What's the purpose of having a one column longtable? – egreg Jan 4 '12 at 20:33
  • Not very useful, I know. But decided by the coordinator and everyone is working with it now. – ChrisP Jan 4 '12 at 22:16
  • 1
    No single longtable cell can be split across pages. – egreg Jan 4 '12 at 22:23
  • This is what I experienced an described in the example above. Any other ideas to work around this problem? – ChrisP Jan 5 '12 at 7:29
  • Rather than longtable, I'd suggest mdframed. – egreg Jan 5 '12 at 9:18
2

A table cell cannot be split across pages; there might be some magic trick, but a one column longtable seems inappropriate. In order to get a frame the package mdframed seems to be a better choice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.