我正在使用 compactenum 环境(在 paralist 包中)。我想自定义数字计数器的字体,但当我这样做时,列表不再右对齐。
在下面的例子中,第一个列表很好,但第二个(自定义)列表现在左对齐。
\documentclass{book}
\usepackage{paralist}
\begin{document}
\begin{compactenum}
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\end{compactenum}
\begin{compactenum}[\bfseries 1]
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\end{compactenum}
\end{document}
答案1
如果您通过特定的宏设置自定义枚举标签,它就会起作用paralist
:
\setdefaultenum{}{}{}{}
梅威瑟:
\documentclass{book}
\usepackage{paralist}
\setdefaultenum{\bfseries1.}{}{}{}
\begin{document}
\begin{compactenum}
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\end{compactenum}
\begin{compactenum}
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\end{compactenum}
\end{document}
或者,下面的方法也有效并且是本地的:
\begin{compactenum}[1.][10.]
\item One
\item Two
\item Three
\item Four
\item Five
\item Six
\item Seven
\item Eight
\item Nine
\item Ten
\item Eleven
\end{compactenum}
[10.]
最宽的标签在哪里