16

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.

2 Answers 2

13

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

8
  • 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
    Commented Oct 29, 2017 at 16:01
  • 1
    You have to add leftmargin=15pt (or leftmargin=* if you want the default value). Please see my updated answer.
    – Bernard
    Commented Oct 29, 2017 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
    Commented Oct 29, 2017 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
    Commented Oct 29, 2017 at 16:12
  • 2
    The trick is to choose labelsep=*. See last version.
    – Bernard
    Commented Oct 29, 2017 at 16:39
9

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

5
  • Thanks. That looks right. What do you mean by "labelsep is inherited by the nested lists"?
    – Daniel
    Commented Oct 29, 2017 at 16:38
  • 1
    @Daniel If you have an enumerate or itemize nested inside that enumerate, it will inherit the value for \labelsep.
    – egreg
    Commented Oct 29, 2017 at 16:39
  • I see. I guess I could get around it by setting it for a specific enumerate level.
    – Daniel
    Commented Oct 29, 2017 at 16:43
  • This worked best for me when I put 'labelsep=*' as suggested in the comments of the second answer.
    – Ur Ya'ar
    Commented Mar 22, 2018 at 15:22
  • Nice. Remark in passing: Because of wide labels, I needed a further tweak. I ended up setting widest=100 (a large enough number seemed to work), altogether: label=Chapter~\arabic*.\quad,align=left,widest=100.
    – PatrickT
    Commented May 1, 2022 at 2:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .