我只是想要一个没有索引的罗马风格标签,但leftmargin=*
与标签选项结合使用时不起作用。这是一个 MWE:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section*{First section - ok}
\begin{enumerate}[leftmargin=*]
\item 1 is alligned with the letter 'F' in 'First section'
\item 2 is alligned with the letter 'F' in 'First section'
\end{enumerate}
\section*{Second section - not ok}
\begin{enumerate}[label=\bfseries(\roman*),leftmargin=*]
\item (i) is NOT alligned with the letter 'S' in 'Second section'
\item (ii) is NOT alligned with the letter 'S' in 'Second section'
\end{enumerate}
\end{document}
答案1
默认情况下,列表标签是右对齐的。在阿拉伯数字中,除非超过,否则您不会注意到这一点9
,但在罗马数字中,这一点立即就显现出来。
所以我认为,您正在寻找align=left
。这不仅会将标签的左侧彼此对齐,还会将它们设置为分配给标签宽度的空间的左侧。
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section*{First section - ok}
\begin{enumerate}[leftmargin=*]
\item 1 is aligned with the letter 'F' in 'First section'
\item 2 is aligned with the letter 'F' in 'First section'
\end{enumerate}
\section*{Second section - now ok}
\begin{enumerate}[align=left,label=\bfseries(\roman*),leftmargin=*]
\item (i) is NOW aligned with the letter 'S' in 'Second section'
\item (ii) is NOW aligned with the letter 'S' in 'Second section'
\end{enumerate}
\end{document}