我正在尝试使用 配置列表和子列表的对齐enumitem
。以下是代码:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\section{Introduction}
Lists:
\begin{itemize}[align=left, labelindent=0em, leftmargin=0em, itemindent=!, nosep, noitemsep]
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\begin{itemize}[nosep, noitemsep]
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
%
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
\end{document}
标签放置正确,但第一级文本开始(第 1 行和第 5 行)应根据第二级标签(第 3 行)对齐,第二级文本延续(第 4 行)也应根据第二级标签(第 3 行)对齐。我该如何实现?我尝试阅读https://mirror.datacenter.by/pub/mirrors/CTAN/macros/latex/contrib/enumitem/enumitem.pdf,但我完全不懂这些。
答案1
编辑:
希望我的建议能够满足您的需求:
\documentclass{article}
\usepackage{enumitem}
\setlist[itemize,1]{nosep,
align=left,
labelwidth=1em, labelsep=0.5em, leftmargin=0em,
itemindent=!
}
\setlist[itemize,2]{wide,
leftmargin=1.5em
}
\begin{document}
\section{Introduction}
Lists:
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
%
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
%
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
\end{document}