我想将编号与左边距对齐,即与非缩进的普通段落文本对齐,而不是让它超出左边距。
以下是一个例子:
\documentclass{article}
\usepackage{enumitem}
\setlist{leftmargin=15pt,labelindent=15pt}
\setlist[enumerate]{align=left}
\begin{document}
\noindent Some text
\begin{enumerate}
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\end{enumerate}
\end{document}
编辑
这更接近:
\documentclass{article}
\setlength{\parindent}{15pt} % Default is 15pt.
\usepackage{enumitem}
\setlist{leftmargin=15pt,labelindent=15pt}
\setlist[enumerate]{wide=0pt, leftmargin=15pt, labelwidth=15pt, align=left}
\begin{document}
Some text\\
\noindent Some text
\begin{enumerate}
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\end{enumerate}
\end{document}
但不幸的是,项目中的文本缩进大于15pt,通过与缩进的普通文本进行比较可以看出。
答案1
答案2
它在这里:但请注意,它labelsep
是由嵌套列表继承的。
\documentclass{article}
\usepackage{enumitem,showframe}
\begin{document}
Some text
\begin{enumerate}[leftmargin=\parindent,align=left,labelwidth=\parindent,labelsep=0pt]
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\item Some more text
\end{enumerate}
\end{document}