# Label indentation of enumerate and itemize don't line up

When using itemize and enumerate and setting the same labelindent, there are different results. The number doesn't line up with the paragraph indentation. This issue is exaggerated when reaching ten items.

MWE:

\documentclass[10pt,a4paper]{article}
\usepackage[left=32.5mm, right=25mm, top=25mm, bottom=20mm]{geometry}
\setlength{\parindent}{1.5em}
\usepackage{enumitem}
\setlist[itemize]{labelindent=\parindent, label={--}}
\setlist[enumerate]{labelindent=\parindent}
\usepackage{lipsum}

\begin{document}
\lipsum[1][1-3]
\begin{enumerate}
\item Test
\end{enumerate}

\lipsum[1][1-3]
\begin{itemize}
\item Test
\end{itemize}
\end{document}


In the place of labelindent=, you should use wide= which adds the left-alignment of the labels. There remains a tiny difference in alignment (< 0.2pt), which can be seen only using a large zoom, and is due to the slightly different side-bearings of glyphs.

Demonstration, adding an \fbox around the labels:

\documentclass[10pt,a4paper]{article}
\usepackage[left=32.5mm, right=25mm, top=25mm, bottom=20mm]{geometry}
\setlength{\parindent}{1.5em}
\setlength{\fboxrule}{0.1pt}
\setlength{\fboxsep}{0.pt}
\usepackage{enumitem}
\setlist[itemize]{wide=\parindent, label=\fbox{--}}
\setlist[enumerate]{wide=\parindent, label = \fbox{\arabic*}}

\begin{document}

\fbox{L}orem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,
placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
\begin{enumerate}
\item Test
\item Another test
\end{enumerate}

\fbox{L}orem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut,
placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
\begin{itemize}
\item A compulsive test
\end{itemize}

\end{document}


First, the label is by default typeset flush right in a box of width \labelwidth that starts at \labelindent from the left margin (as shown below, this can be changed with, for instance, align=left). But this assumes that you give enumitem a way to satisfy the various constraints.

As the enumitem manual explains, there are five horizontal length parameters linked by one linear relation:

\leftmargin + \itemindent = \labelindent + \labelwidth + \labelsep


By default, enumitem does labelindent=! which means that it computes \labelindent from the other parameters; however, in both of your examples, you explicitly set \labelindent, so enumitem must be able to compute another parameter from the others, and you need to specify which one. For instance, you can use leftmargin=*:

\documentclass{article}
\setlength{\parindent}{1.5em}

\usepackage{enumitem}
\usepackage{lipsum}

\setlist[itemize]{labelindent=\parindent, align=left, leftmargin=*,
label={--}}
\setlist[enumerate]{labelindent=\parindent, align=left, leftmargin=*}

\begin{document}
\lipsum[1][1-3]
\begin{enumerate}
\item Test
\end{enumerate}

\lipsum[1][1-3]
\begin{itemize}
\item Test
\end{itemize}
\end{document}


Zoom with vertical rule:

Note that this is explained in the documentation of the labelindent option (and \labelindent length parameter):

labelindent=〈length〉
\labelindent
This parameter is added in enumitem for the blank space from the margin of the enclosing list/text to the left edge of the label box. This means there is a redundancy because one of the parameters depends on the others, i.e., it has to be computed from the other values, as described below. By default, the computed value is labelindent, even if explicitly set with some value (it defaults to 0pt). So, if you are setting it to some value, very likely you want to set some other parameter to ! or *, because otherwise it is ignored.

• @Johannes Your question doesn't mention at all that you wanted line wrapping in the items to use the outer margin on the left. Moreover, the red line from your picture could quite easily be interpreted as meaning that wrapped lines from items should not cross it. Unaccepting an answer based on requirements completely absent from the question is... questionable. Apr 20, 2020 at 8:42
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9098796844482422, "perplexity": 3357.1519544169214}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-27/segments/1656103850139.45/warc/CC-MAIN-20220630153307-20220630183307-00141.warc.gz"}