当有如下列表时:
\documentclass[twoside]{book}
\RequirePackage{enumitem}
\begin{document}
\begin{enumerate}[label=\alph*,start=25]
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\end{enumerate}
\end{document}
我们得到错误:
! LaTeX Error: Counter too large.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.23 \item a
n item
由于计数器超过 26。
例如,当使用 HTML 时,编号将类似于:y
,z
,aa
,ab
,ac
或者ad
至少环绕回到a
?
LaTeX 中也存在类似的东西吗?
答案1
改编这里的一个答案:使用 \item 计数器计算过大错误
\documentclass[twoside]{book}
\RequirePackage{enumitem,alphalph}
\makeatletter
\newcommand{\AlphAlphFmt}[1]{\@alphfmt{#1}} % Define the \alphalph wrapper for enumitem
\newcommand{\@alphfmt}[1]{\alphalph{\value{#1}}} % Internal representation
\AddEnumerateCounter{\alphalphFmt}{\@alphfmt}{aaa} % Register this new format
\makeatother
\begin{document}
\begin{enumerate}[label={(\AlphAlphFmt*)},start=25]
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\item an item
\end{enumerate}
\end{document}