0

I'm trying to create a few new enumerate-type environments such as enumerate-alph to have manual numbering type but also match the label style of my document class. In defining enumerate-alph, enumerate-arabic and enumerate-roman, I'm using essentially the same code, yet the labels are not vertically aligned. How can I fix this behavior?

Below is a MWE.

enter image description here

\documentclass{article}

\usepackage{enumitem}
\newlist{enumerate-alph}{enumerate}{10}
\setlist[enumerate-alph]{labelsep=*, leftmargin=*,
    label=\normalfont\emph{\alph*}$\mskip-1mu\big)$,
    ref = \normalfont\emph{\alph*}$\mskip-1mu\big)$}
\newlist{enumerate-arabic}{enumerate}{10}
\setlist[enumerate-arabic]{labelsep=*, leftmargin=*,
    label=\normalfont\arabic*$\mskip-1mu\big)$,
    ref = \normalfont\arabic*$\mskip-1mu\big)$}
\newlist{enumerate-roman}{enumerate}{10}
\setlist[enumerate-roman]{labelsep=*, leftmargin=*,
    label=\normalfont\emph{\roman*}$\mskip-1mu\big)$,
    ref = \normalfont\emph{\roman*}$\mskip-1mu\big)$}

\begin{document}

\begin{enumerate-alph}
    \item Text
\end{enumerate-alph}

\begin{enumerate-arabic}
    \item Text
\end{enumerate-arabic}

\begin{enumerate-roman}
    \item Text
\end{enumerate-roman}

\end{document}

1 Answer 1

0

The alignment is quite fine if you remove leftmargin=* and labelsep=* :

    \documentclass{article}

    \usepackage{enumitem}
    \newlist{enumerate-alph}{enumerate}{10}
    \setlist[enumerate-alph]{%
        label=\normalfont\emph{\alph*}$\mskip-1mu\big)$,
        ref = \normalfont\emph{\alph*}$\mskip-1mu\big)$}
    \newlist{enumerate-arabic}{enumerate}{10}
    \setlist[enumerate-arabic]{%
        label=\normalfont\arabic*$\mskip-1mu\big)$,
        ref = \normalfont\arabic*$\mskip-1mu\big)$}
    \newlist{enumerate-roman}{enumerate}{10}
    \setlist[enumerate-roman]{%
        label=\normalfont\emph{\roman*}$\mskip-1mu\big)$,
        ref = \normalfont\emph{\roman*}$\mskip-1mu\big)$}

    \begin{document}

    \begin{enumerate-alph}
        \item Text
    \end{enumerate-alph}

    \begin{enumerate-arabic}
        \item Text
    \end{enumerate-arabic}

    \begin{enumerate-roman}
        \item Text
    \end{enumerate-roman}

    \end{document} 

enter image description here

2
  • Thank you for this. The removed code is my failed attempt to remove the left indent, do you have some idea on how to achieve this?
    – Jinwen
    Aug 25, 2022 at 16:44
  • @Jinwen: If you mean the indentation of the label, you could use labelwidth=widthof{\textit{a}$\mskip-1mu\big)$} , or any letter you know you'll use. You also can set labelindent=0pt. If you mean yje indentation of the item contents, this is set with labelsep.
    – Bernard
    Aug 25, 2022 at 21:14

You must log in to answer this question.

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