我正在使用包wide
的列表enumitem
。除了每个项目的开头都有一个标签外,列表的项目wide
看起来就像普通文本一样。我希望列表中的列表wide
看起来就像在第一级一样。但是,由于wide
父列表的选项,它似乎继承了更改。如何恢复默认缩进值?请参阅下面的一个不言自明的示例。
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\begin{document}
Normal text. Now a `wide' list:
\begin{enumerate}[wide]
\item This is a list for long text and therefore has no left margin.
\begin{enumerate}[label=(\alph*)]
\item This has a strange indentation\\
It should be indented exactly like (*) below since to the reader it should look as if we were on the first list level, not the second.
\end{enumerate}
\end{enumerate}
And now a normal list:
\begin{enumerate}[label=(\alph*)]
\item This (first level) list (*) is being referred to.\\
New line of the same item.
\end{enumerate}
\end{document}
答案1
这里有一种方法可以做到这一点。但是我认为,宽列表中的列表应该将其标签与宽列表的标签对齐,而不是与“一般”第一级列表的标签对齐,因为后者略微向段落缩进的左侧移动(~ 2.5-3pt),在我看来,这看起来不太好。演示:\documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{enumitem}
\begin{document}
Normal text. Now a `wide' list:
\begin{enumerate}[wide]
\item This is a list for long text and therefore has no left margin. Text text text text text text text text text Text text text text text text text text text
\begin{enumerate}[label=(\alph*), wide=0.95\parindent, leftmargin =2.8em]
\item This item is aligned with the above first level item. \\
It should be indented exactly like (*) below since to the reader it should look as if we were on the first list level, not the second.
\end{enumerate}
\item This is another item with long text. Text text text text text text text text text Text text text text text text text text text
\begin{enumerate}[label=(\alph*),labelindent =0.3\parindent, align = right, leftmargin =2.5em , labelsep=! ]
\item This one has a the normal indentation of a first level list. \\
It is indented exactly like (*) below since to the reader it should look as if we were on the first list level, not the second.
\end{enumerate}
\end{enumerate}
And now a normal list:
\begin{enumerate}[label=(\alph*)]
\item This (first level) list (*) is being referred to.\\
New line of the same item.
\end{enumerate}
\end{document}