[Tex/LaTex] Add bold enumerate items on highest level only

#enumerateboldenumitemlists

Can somebody tell me how to make both the item number and the item itself bold – but only on the highest level of my list? So, 1,2,3 etc should be bold, while 1.1, 1.2 etc should stay normal. I'm using enumitem.

I've tried

\begin{enumerate}[label=\textbf{\arabic*}] 

but this turns every first number bold, also on the lower levels.

Best Answer

This can be accomplished for multiple lists by setting the style for each level of the enumerate environment using:

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

By also setting the before formatter, you can set the text of the entire item in a certain font, as you seemed to desire from your question. Resetting for level two will set the fonts for the label and item back to normal for future levels.

An example:

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

% Change format of top-level list items
\setlist[enumerate,1]{label*=\arabic*,font=\bfseries,before=\bfseries}
% Reset formatting for subsequent levels; label type makes 1.1, legal-style labels
\setlist[enumerate,2]{label*=.\arabic*,font=\normalfont,before=\normalfont}

\begin{enumerate}
\item One
\item Two
\begin{enumerate}
\item Three
\item Four
\end{enumerate}
\item Five
\end{enumerate}

\end{document}

This gives:

Output from example code