长表中的长枚举

长表中的长枚举

我想要一个长的枚举列表放在 (长) 表中,并将长列表换行到下一页。但是,长表会剪辑枚举列表而不是将其换行。这是一个最小示例:

\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}

答案1

以下是使用 enumitem 和其resume*键的解决方法:

\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} 

在此处输入图片描述

答案2

您可以创建多个表格,每页一个,并更改每页上第一项的编号。

\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}

来源:我如何才能改变枚举项的数量?

相关内容