TransWikia.com

Reset number scheme in latex using enumerate

TeX - LaTeX Asked by J_code on June 25, 2021

A very simple question, but I can’t find the answer anywhere. I have a numbering scheme using begin{enumerate}...end{enumerate}

However I want the level 2 numbering scheme to also be Arabic:

level 1: 1

level 2: 1

Instead of

level 1: 1

level 2: (a)

How can I do this?

I’ve tried just using nested begin{enumerate}...end{enumerate}

2 Answers

Nesting enumerate environments is the correct way to do this. But you also need to redefine how the second level enumerate labels are displayed. You can do this by putting the following command into your document preamble (between documentclass and begin{document}:

renewcommand{theenumii}{arabic{enumii}}
renewcommand{labelenumii}{theenumii}

The labels for enumerations are via enumi through enumiv theenumX is responsible for formatting the number and labelenumX calls theenumX and puts any additional formatting around the number on the enumeration.

Answered by Don Hosek on June 25, 2021

It can easily be done using the command setlist from the package enumitem.

documentclass{article}
usepackage{enumitem}
setlist[enumerate,2]{label=arabic*.}
begin{document}
begin{enumerate}
    item An item in the first level.
    item Another item in the first level.
    begin{enumerate}
        item An item in the second level.
        item Another item in the second level.
    end{enumerate}
end{enumerate}
end{document}

Answered by Vincent on June 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP