1

I am trying to have a nested list with a label, using the enumitem package with the "shortlabels" option. But when I add the label "Note" to the list items, the indentation is aligned with the number instead with the start of the label "Note".

 \documentclass[]{article}%
    \usepackage[shortlabels]{enumitem}



\begin{document}

Here's my first list, which has the label ``Note'', but the indentation is too far to the left:

\begin{itemize}
\item First item
\item Second item
        \begin{enumerate}[{Note} 1:]
        \item First nested item
        \item Second nested item
        \end{enumerate}
\item Third item
\end{itemize}

Here's a second list, showing the proper indentation of the nested list when there is no ``Note'' label:

\begin{itemize}
\item First item
\item Second item
        \begin{enumerate}
        \item First nested item
        \item Second nested item
        \end{enumerate}
\item Third item
\end{itemize}


\end{document}

enter image description here

2 Answers 2

2

enumerate labels are right aligned. That means that if they get longer they stick out to the left. You can change this with the align key:

 \documentclass[]{article}%
    \usepackage[shortlabels]{enumitem}



\begin{document}

Here's my first list, which has the label ``Note'', but the indentation is too far to the left:

\begin{itemize}
\item First item
\item Second item
        \begin{enumerate}[{Note} 1:,align=left]
        \item First nested item
        \item Second nested item
        \end{enumerate}
\item Third item
\end{itemize}

Here's a second list, showing the proper indentation of the nested list when there is no ``Note'' label:

\begin{itemize}
\item First item
\item Second item
        \begin{enumerate}
        \item First nested item
        \item Second nested item
        \end{enumerate}
\item Third item
\end{itemize}


\end{document}

enter image description here

1
  • If I just add "align=left", the "Note" is aligned directly under "Second item". Is there a way to have "Note" indented to the right of "Second"? I want the "N" of "Note" in the first list to start with the same indentation as "1" in the second list. Commented Aug 9, 2018 at 22:10
0

Ulrike's response provided half of the solution. The other key is to add "leftmargin=1.2cm" in the enumerate options, in addition to the "align=left" option.

    \documentclass[]{article}%
    \usepackage[shortlabels]{enumitem}



    \begin{document}

    Here's my first list, which has the label ``Note'', but the indentation is too far to the left:

    \begin{itemize}
    \item First item
    \item Second item
                \begin{enumerate}[{Note} 1:, align=left, leftmargin=1.2cm]
                \item First nested item
                \item Second nested item
                \end{enumerate}
    \item Third item
    \end{itemize}

    Here's a second list, showing the proper indentation of the nested list when there is no ``Note'' label:

    \begin{itemize}
    \item First item
    \item Second item
                \begin{enumerate}
                \item First nested item
                \item Second nested item
                \end{enumerate}
    \item Third item
    \end{itemize}


    \end{document}

enter image description here

You must log in to answer this question.

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