Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

If I have a nested enumerated list style that I would like to use throughout my document, what's the best way to do it in LaTeX that will make it easy to change the style of all the lists in the document. By style I mean not just the style of the labels but also the style of the items in the list. For example first level bold, second level italics, third level normal etc..

I would think this is a very common task but I can't find an explicit description of how to do it. I am new to LaTeX and still trying to figure out where it's best to hard code formatting or do it programmatically.

I have managed to put together some code that does what I want but I am wondering if there is more elegant way (or standard way) of accomplishing this:

\documentclass{article}
\usepackage{enumitem}
\begin{document}

\setlist[enumerate]{noitemsep,nosep}
\setlist[enumerate,1]{label*=\arabic*.,before=\normalfont\bfseries,after=\normalfont}
\setlist[enumerate,2]{label*=\arabic*.,before=\normalfont\itshape,after=\normalfont}
\setlist[enumerate,3]{label=\alph*.,before=\normalfont}

\begin{enumerate}
    \item First Level A
    \begin{enumerate}
        \item Second Level A
        \begin{enumerate}
            \item Third Level A
        \end{enumerate}
        \item Second Level B
        \item Second Level C
    \end{enumerate}

    \item First Level B
    \begin{enumerate}
        \item First Level A
        \begin{enumerate}
            \item Third Level A
        \end{enumerate}
        \item Second Level B
        \item Second Level C
    \end{enumerate}

\end{enumerate}

\end{document}
share|improve this question
    
I think your method is the best way to go :) –  cmhughes Oct 24 '12 at 0:19
add comment

1 Answer 1

enumitem provides a clean interface to the standard list environments (enumerate, itemize and description) through global settings (using \setlist) or localized customizations (via optional arguments to the respective environments).

Another alternative would be to define your own depth-intelligent list environment(s). However, this may remove some of the code readability already provided by enumitem's interface, as well as code portability.

enumitem is therefore most likely the best way to go.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.