2

I'd like to align the numbering to the left margin, i.e. with the non-indented normal paragraph text, rather than having it go over the margin.

Here is an example:

\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} 

enter image description here

Edit

This gets closer:

\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}

enter image description here

But unfortunately, the indentation of text in items is greater than 15pt, as can be seen by comparing it to the indented normal text.

5

Here it is: note, however, that labelsep is inherited by the nested lists.

\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}

enter image description here

  • Thanks. That looks right. What do you mean by "labelsep is inherited by the nested lists"? – Daniel Oct 29 '17 at 16:38
  • 1
    @Daniel If you have an enumerate or itemize nested inside that enumerate, it will inherit the value for \labelsep. – egreg Oct 29 '17 at 16:39
  • I see. I guess I could get around it by setting it for a specific enumerate level. – Daniel Oct 29 '17 at 16:43
  • This worked best for me when I put 'labelsep=*' as suggested in the comments of the second answer. – Ur Ya'ar Mar 22 '18 at 15:22
5

Use the wide= option: it automatically sets align=left and the value of labelindent

\setlist[enumerate]{wide=0pt, widest=99,leftmargin=\parindent, labelsep=*}

enter image description here

  • Thanks. Unfortunately, it not only align the number to the left but also the text after label when it goes over more than one line. This is not desired. – Daniel Oct 29 '17 at 16:01
  • 1
    You have to add leftmargin=15pt (or leftmargin=* if you want the default value). Please see my updated answer. – Bernard Oct 29 '17 at 16:04
  • Now, the second line in 1 looks like it starts more to the right than the first. Also the text for the 10 does not left align with the text of the other items anymore. – Daniel Oct 29 '17 at 16:06
  • It seems \setlist[enumerate]{wide=0pt, leftmargin=15pt, labelwidth=15pt, align=left} gets closer. But then the text of the items starts more to the right than 15pt... – Daniel Oct 29 '17 at 16:12
  • 1
    The trick is to choose labelsep=*. See last version. – Bernard Oct 29 '17 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.