How to Set a Different Text Style for Each Enumerate Level
At a glance
- 1. Load enumitem
Add the enumitem package to your document preamble.
- 2. Choose a level
Use setlist with enumerate and the nesting depth you want to style.
- 3. Style item text
Set the before key to choose the font and size for the list contents.
- 4. Style labels separately
Use the font key for the numbers or other item labels.
To give each nested enumerate level its own text style, use the enumitem package. Its level-specific settings let you change the item text and the label (the number or symbol before each item) independently.
The key distinction is that before changes the style inherited by the list contents, while font changes the label style. This lets you, for example, make first-level item text small and italic while keeping its numbers bold and upright.
Set styles by nesting level
Put \usepackage{enumitem} in the preamble, then use \setlist[enumerate,1]{...} for the outermost enumerate, \setlist[enumerate,2]{...} for the next nested enumerate, and so on.
For the list text, set before to font declarations such as \small\itshape. For the label, set font, such as \bfseries. The list environment confines these declarations to the list, so the surrounding paragraph returns to its previous style afterward.
Complete example
\documentclass{article}
\usepackage{enumitem}
% Level 1: small italic item text, bold upright labels.
\setlist[enumerate,1]{
before=\normalfont\small\itshape,
font=\normalfont\bfseries\upshape
}
% Level 2: footnote-size typewriter item text, bold sans-serif labels.
\setlist[enumerate,2]{
before=\normalfont\footnotesize\ttfamily,
font=\normalfont\bfseries\sffamily
}
\begin{document}
\begin{enumerate}
\item First-level text is small and italic.
\begin{enumerate}
\item Second-level text is footnote-size and typewriter-style.
\item Another item at the same level.
\end{enumerate}
\item Back to the first-level style.
\end{enumerate}
Ordinary paragraph text returns to the document's normal style.
\end{document}
The 1 and 2 arguments identify the enumerate nesting levels. before sets the style used by the item text at that level. font applies to the label; it does not change the paragraph text. The \normalfont declaration resets inherited family, weight, and shape before the requested style is applied. This is useful for nested lists, where a child list can otherwise inherit properties such as italics from its parent.
You can also set a style for every enumerate level by omitting the level number, as in \setlist[enumerate]{before=...,font=...}. A level-specific setting is preferable when the outline should change style as it gets more deeply nested.
Apply a style to just one list
If the change should affect only one list, put the options in that environment’s optional argument instead of changing the document-wide list settings:
\begin{enumerate}[before=\small\itshape,font=\bfseries]
\item Styled item text with a bold label.
\end{enumerate}
These options require enumitem. Without it, the optional argument syntax shown here is not available in standard LaTeX enumerate.
Common mistakes
- Changing only the label:
font=\smallmakes the number smaller, but leaves the item text at its existing size. Usebefore=\smallto change the list contents. - Changing only the item text:
before=\bfseriesmakes the text bold, but does not necessarily give the label the intended independent formatting. Setfontwhen the label needs its own style. - Using the wrong level number:
\setlist[enumerate,2]{...}styles second-level enumerates, not every list that happens to contain a particular kind of item. Check how deeply the list is nested. - Expecting a global change from a local option: Options placed on one
enumerateenvironment affect that list, not all enumerates in the document. Use\setlistin the preamble for reusable settings. - Using font switches without considering inheritance: A nested list can inherit italic or bold styling from its parent. Starting
beforewith\normalfontresets family, series, and shape before applying the new style; the font size still needs to be specified if it should differ.
References
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.