如何使嵌套的 asparaenum 正确缩进?

如何使嵌套的 asparaenum 正确缩进?

我使用asparaenum列出一些段落,它们缩进正确。但是当我使用 nested 时asparaenum,内部段落根本没有缩进。我希望它们比外部段落有更多的缩进。这可能吗?

\documentclass{article}
\usepackage{paralist}
\begin{document}
\begin{asparaenum}
\item Sample paragraph 1.  This paragraph is only intended as a test and
    contains no information at all.
\item Sample paragraph 2.  This paragraph is properly intented.
    \begin{asparaenum}
    \item Sample paragraph a.  This paragraph is not indented.  How to fix
        this?
    \item Sample paragraph b.  This paragraph is not indented.  How to fix
        this?
    \end{asparaenum}
\item Sample paragraph 3.  This paragraph is only intended as a test and
    contains no information at all.
\end{asparaenum}
\end{document}

答案1

您可以使用 来实现enumitemasparaenum环境与wide选项相对应,不同之处在于该项目可以有多个段落。

如果要以文档方式使用这些设置,则可以使用命令在序言中声明它们\setlist[listtype, level]{…}。请注意,所有水平参数都与更高级别的设置相关。

以下是一个例子:

\documentclass{article}
\usepackage{enumitem}
\usepackage[nomarginpar, showframe]{geometry}
\usepackage{lipsum}

\setlist[enumerate, 1]{wide}
\setlist[enumerate, 2]{wide = 2\parindent, leftmargin = \parindent}%
\setlist[enumerate, 3]{wide = 2\parindent, leftmargin = \parindent}%

\begin{document}

\begin{enumerate}
\item
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.
\begin{enumerate}
\item \lipsum[3]
\begin{enumerate}
 \item Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. blah blah blah blah blah blah blah blah
\end{enumerate}
\end{enumerate}
\item \lipsum[4]
\end{enumerate}

\end{document}

在此处输入图片描述

相关内容