11

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.

12

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

  • I changed this to reflect the desire of the OP to have the entire item (not just the label) be in bold. – cslstr Mar 7 '14 at 17:28
  • Note that if you nest an itemize environment within the enumerate one, the items will still be bolded. – cfr Mar 8 '14 at 1:10
  • That is true. You would need to tailor the \setlist command to the environments you are using, or else set the formatting for enumerate, itemize and description (plus any others that you created with the enumitem package). – cslstr Mar 8 '14 at 1:35
3

You didn't provide a MWE, but I assume that you are using something like

\begin{enumerate}[label=\textbf{\arabic*}] 
  \item first
  \item second
  \item third
    \begin{enumerate}[label*=.\arabic*]

which does make the second level enumerate items bold. This is not surprising, as you are forcing the label to be bold using label=\textbf{\arabic*}.

Instead, you should specify the font face separately, using

\begin{enumerate}[label=\arabic*,font=\bfseries] 
  \item first
  \item second
  \item third
    \begin{enumerate}[label*=.\arabic*]
 ....

Here's a complete MWE to play with.

% arara: pdflatex
\documentclass{report}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\arabic*,font=\bfseries] 
  \item first
  \item second
  \item third
    \begin{enumerate}[label*=.\arabic*]
      \item one
      \item two
      \item three
    \end{enumerate}
  \end{enumerate}
\end{document}
  • \bf is obsolete. You should use \bfseries instead. If necessary \normalfont\bfseries. – cfr Mar 8 '14 at 1:05
1

I am not certain what you mean by the "lower levels" -- are you referring to nested enumerate environments, like the following?

\begin{enumerate}
    \item
    \begin{enumerate}
        \item
        \item
    \end{enumerate}
    \item
\end{enumerate}

If this is what you are referring to, then the following solution worked for me (see also Local in my answer to a related question here):

\begin{enumerate}[font=\bfseries]
    \item
    \begin{enumerate}
        \item
        \item
    \end{enumerate}
    \item
\end{enumerate}

Using TeXstudio and XeLaTeX compiler, the [font=\bfseries] setting for the outer enumerate environment was not inherited by the inner enumerate environments.

Also, as a general rule of thumb, it is preferable to use the font= key for enumitem (as opposed to the label= key suggested in other answers) if all you want to do is to make the numbers/letters/etc. bold. label= completely overwrites the standard settings of enumerate, while font= just modifies them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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