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.

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.

share|improve this question
    
Welcome to TeX.SX! You don't have to sign with your name since it automatically appears in the lower right corner of your post. –  Adam Liter Mar 7 at 16:48
    
Additionally, a tip: if you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Adam Liter Mar 7 at 16:48

2 Answers 2

up vote 9 down vote accepted

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

share|improve this answer
    
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 at 17:28
    
Welcome to TeX.SX! –  Adam Liter Mar 7 at 17:35
    
Note that if you nest an itemize environment within the enumerate one, the items will still be bolded. –  cfr Mar 8 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 at 1:35

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}
share|improve this answer
    
\bf is obsolete. You should use \bfseries instead. If necessary \normalfont\bfseries. –  cfr Mar 8 at 1:05

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.