0

I would like to have a LONG enumerated list inside a (long)table and have the long list wrapped to the next page. However, the longtable clips the enumerated list instead of wrapping it. Here is a minimal example:

\documentclass{article}
\usepackage{longtable}
\pagestyle{empty}
\begin{document}
    \begin{longtable}{p{0.2\linewidth}p{0.8\linewidth}}
        Some text &
            \begin{enumerate}
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
            \end{enumerate}
    \end{longtable}
\end{document}
  • 2
    A table cell cannot be split across pages. Do you really need a longtable? – egreg May 20 at 22:44
  • I guess not, but I do need two "columns" that look like a table with horizontal and vertical rules to separate the rows and columns. That is, I need it to resemble a table that wraps pages (even if I don't use a (long)table per se). – Troy Henderson May 20 at 22:53
1

Here is a workaround with enumitem and its resume* key:

\documentclass{article}
\usepackage{longtable, array}
\usepackage{enumitem}

\pagestyle{empty}

\begin{document}%

    \begin{longtable}{p{0.2\linewidth}p{0.8\linewidth}}
        Some text & \begin{enumerate}[topsep= 0pt, partopsep=0pt, before=\vspace*{-\baselineskip}, after=\vspace*{-\baselineskip}, series=TE]
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
\end{enumerate} \\
    Some more text & \begin{enumerate}[resume*=TE]
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
                \item An enumerated item
            \end{enumerate}
    \end{longtable}

\end{document} 

enter image description here

  • Thank you, but the nature of the lists (and possibly having to re-insert text above the table later), I'm looking for a solution that "automagically" breaks for me. If this cannot be done with a table, I wonder if it can be with something that mimics the look of a table. – Troy Henderson May 21 at 3:03
0

You can create multiple tables, one per page, and change the number of the first item on each page.

\documentclass{article}
\usepackage{longtable}
\pagestyle{empty}
\begin{document}
\begin{longtable}{p{0.2\linewidth}p{0.8\linewidth}}
Some text &
\begin{enumerate}
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\end{enumerate}
\end{longtable}

\newcommand\setItemnumber[1]{\setcounter{enumi}{\numexpr#1-1\relax}}

\begin{longtable}{p{0.2\linewidth}p{0.8\linewidth}}
Some text &
\begin{enumerate}
\setItemnumber{31}
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item
\item An enumerated item     
\end{enumerate}
\end{longtable}
\end{document}

Source: How can I change the number of enumerate items?

  • Having to figure out exactly where to break the page (especially since other text may need to be inserted later) can be challenging. – Troy Henderson May 21 at 3:03

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.