使子列表看起来像第一级列表

使子列表看起来像第一级列表

我正在使用包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} 

在此处输入图片描述

相关内容