2

I have two enumerate environments. In the MWE, the numbers in the second environment are seemingly right-aligned with the numbers in the first, I would like to left-align the numbers in the second environment with those in the first.

The third environment should also be left-aligned with the first two environments. The fourth environment should continue to display as expected.

MWE

\documentclass{book}
\usepackage[inline,shortlabels]{enumitem}
\setlist[enumerate]{leftmargin=4em, align=left}
\begin{document}
\begin{enumerate}
    \item Item 1
    \item Item 2
    \item Item 3
\end{enumerate}
\begin{enumerate}[label=1.\arabic*.]
        \item Item 1.1
        \item 1.2
    \end{enumerate}
\begin{itemize}
    \item Item 10
    \item Item 20
\end{itemize}
\begin{enumerate*}[label=(\roman*)]
    \item Item 100
    \item item 200
\end{enumerate*}
\end{document}
1
  • 2
    There are various settings described in the enumitem manual
    – daleif
    Commented Aug 16, 2020 at 8:30

2 Answers 2

5

See if adding

\setlist[enumerate]{leftmargin=4em, align=left}

in your document preamble solve your problem.

enter image description here

Complete MWE:

\documentclass{book}
\usepackage{enumitem}
\setlist[enumerate]{leftmargin=4em, align=left}

\usepackage{lipsum}

\begin{document}
\lipsum[11]
\begin{enumerate}
    \item Item 1
    \item Item 2
    \item Item 3
\end{enumerate}
\begin{enumerate}[label=1.\arabic*.]
        \item Item 1.1
        \item Item 1.2
    \end{enumerate}
\end{document}

Addendum:

After your editing of question situation is changed a lot. Note: enumitem doesn't allow separate settings for in-line lists (as far as I know), however in such situation it advise to define new list with desired features. For example, as:

\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{label=(\roman*), 
                        before=\unskip{: }, itemjoin={{, }}, itemjoin*={{, and }}}

Considering this in the first version of answer, you can write your document example as follows:

\documentclass{book}
\usepackage[shortlabels]{enumitem}
\setlist[enumerate]{leftmargin=4em, align=left}
\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{label=(\roman*),
                        before=\unskip{: }, itemjoin={{, }}, itemjoin*={{, and }}}
\usepackage{lipsum}

\begin{document}
\lipsum[11]

\begin{enumerate}
    \item Item 1
    \item Item 2
    \item Item 3: 
\end{enumerate}
\begin{enumerate}[label=1.\arabic*.]
        \item Item 1.1
        \item Item 1.2
    \end{enumerate}

\noindent%   
Some text 
\begin{inlinelist}[label=(\roman*)]
    \item Item 100
    \item item 200
    \item item 300
\end{inlinelist}.
\end{document}

which yields to:

enter image description here

8
  • Thank you! That seems to handle it - though 4em seems severe. Do you know what the default margin is? I have struggled to find it written down anywhere. Commented Aug 16, 2020 at 8:46
  • Note, for consistency, I've had to do the same for itemise environments. Commented Aug 16, 2020 at 8:47
  • @DavidPoxon, you can select left margin according to your wish/taste. Default margin seems to be 25pt. See tex.stackexchange.com/questions/367616/… how to measure default versions
    – Zarko
    Commented Aug 16, 2020 at 10:05
  • this solution negatively impacts inline lists. Commented Aug 16, 2020 at 11:09
  • 1
    @DavidPoxon, no. I add this only to show all options. If you not like to have it, just remove before=\unskip{: } from inlinelist settings.,
    – Zarko
    Commented Aug 17, 2020 at 5:37
1

enter image description here

\documentclass{book}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[
                leftmargin=\parindent,
                align=left,
                labelwidth=\parindent,
                labelsep=10pt]
    \item Item 1
    \item Item 2
    \item Item 3
\end{enumerate}
\begin{enumerate}[
                label=1.\arabic*.,
                leftmargin=\parindent,
                align=left,
                labelwidth=\parindent,
                labelsep=10pt]
        \item Item 1.1
        \item Item 1.2
    \end{enumerate}
\end{document}
1
  • 1
    How do I make this work without modifying the first enumerate? I don't necessarily need the text of the items to line up, just the numbers. Commented Aug 16, 2020 at 8:32

You must log in to answer this question.

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