2

So apparently the suggestion in here doesn't work in my document. I want that all enumerate and nested ones always uses arabic numerals, from 1,2,etc.

My preamble is this.

\documentclass{article}

\usepackage[version=3]{mhchem} % Package for chemical equation typesetting                                                                                               
\usepackage{siunitx} % Provides the \SI{}{} and \si{} command for typesetting SI units                                                                                   
\usepackage{graphicx} % Required for the inclusion of images                                                                                                             
\usepackage{amsmath} % Required for some math elements                                                                                                                   

\setlength\parindent{0pt} % Removes all indentation from paragraphs                                                                                                      
\usepackage{colortbl}
\newcommand{\comrem}[1]{\textcolor{red}{#1}}

\renewcommand{\labelenumi}{\alph{enumi}.} % Make numbering in the enumerate environment by letter rather than number (e.g. section 6)                                    
\renewcommand{\labelenumii}{\Roman{enumii}}
2
  • 2
    Use the enumitem package, then it is very easy to setup. And please always post full examples, not useless sniplets
    – daleif
    Feb 7, 2020 at 20:09
  • 2
    Your code stipulates that firsdt level enumerate will use a., b., &c. and the second level will use I,II, &c.
    – Bernard
    Feb 7, 2020 at 20:19

1 Answer 1

5

The most convenient way to achieve this would be via enumitem's \setlist:

\documentclass{article}

\usepackage{enumitem}

\begin{document}

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

\setlist[enumerate]{label={\arabic*.}}

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

\end{document}

The first list (without any settings) displays the default settings for each (nested) list (level 1 = \arabic, level 2 = (\alph*), level 3 = \roman*.):

enter image description here

The second list displays the updated settings, with each level set as \arabic*.:

enter image description here

Control over individual <level> formatting is also possible using

\setlist[enumerate,<level>]{<format spec>}

Your example code would use

\setlist[enumerate,1]{label={\alph*.}}
\setlist[enumerate,2]{label={\Roman*}}

If you plan on referencing list items, you may also consider specifying a separate ref key-value that doesn't use the trailing period .:

\setlist[enumerate]{label={\arabic*.}, ref={\arabic*}}

You must log in to answer this question.

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