LaTeX enumerate - bold item with non-bold text
You can use the enumitem
package. If you don't want to use additional packages, you can simply redefine \labelenumi
:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\renewcommand\labelenumi{\bfseries\theenumi}
\item First item.
\item Second item.
\item Third item.
\end{enumerate}
% requires the enumitem package
\begin{enumerate}[label=\bfseries\arabic*]
\item First item.
\item Second item.
\item Third item.
\end{enumerate}
\end{document}
EDIT: on a more programmatic level, you could define a new list-like environment that behaves like the standard enumerate
, but with the desired format for the label. This can be done using something like this
\documentclass{article}
\newenvironment{boenumerate}
{\begin{enumerate}\renewcommand\labelenumi{\textbf\theenumi}}
{\end{enumerate}}
\begin{document}
\begin{boenumerate}
\item First item.
\item Second item.
\item Third item.
\end{boenumerate}
\end{document}
or imitating the definition of the enumerate
environment as given in source2e
):
\documentclass{article}
\makeatletter
\def\boenumerate{%
\renewcommand\labelenumi{\textbf\theenumi}
\ifnum \@enumdepth >\thr@@\@toodeep\else
\advance\@enumdepth\@ne
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
\expandafter
\list
\csname label\@enumctr\endcsname
{\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
\fi}
\let\endboenumerate =\endlist
\makeatother
\begin{document}
\begin{boenumerate}
\item First item.
\item Second item.
\item Third item.
\end{boenumerate}
\end{document}
Something similar, but now with the help of the enumitem
package:
\documentclass{article}
\usepackage{enumitem}
\newlist{boenumerate}{enumerate}{4}
\setlist[boenumerate,1]{label=\bfseries\arabic*}
\begin{document}
\begin{boenumerate}
\item First item.
\item Second item.
\item Third item.
\end{boenumerate}
\end{document}
You should use a package like enumitem
. The package allows to modify the item
by a key-value-syntax.
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\textbf{\arabic*},start=0]
\item First item
\item Second item
\item Third item
\end{enumerate}
\end{document}
It's not a good idea to redefine \item
, as it's used in many parts of LaTeX. Here is a \benumerate
environment in which you can use the \bolditem
command alternating it to the normal one.
\documentclass[a4paper]{article}
\let\ifbolditem\iffalse
\def\bolditemtrue{\global\let\ifbolditem\iftrue}
\def\bolditemfalse{\global\let\ifbolditem\iffalse}
\newenvironment{benumerate}
{\def\bolditem{\bolditemtrue\item}%
\enumerate
\renewcommand\makelabel[1]{\hss\llap{\ifbolditem\bfseries\fi##1\bolditemfalse}}}
{\endenumerate}
\begin{document}
\begin{benumerate}
\item Normal
\bolditem Bold
\item Normal again
\bolditem[9] Bold
\end{benumerate}
\end{document}