Text FormattingBold Enumeration Counter

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Bold Enumeration Counter

Post by Singularity »

Can enumerate items be bolded?

I read about the enumerate package and tried this:

Code: Select all

\documentclass[12pt,fleqn,reqno]{article}
\usepackage{amsfonts,graphics,epsfig,cite}
\usepackage{amsmath,graphicx,amssymb,amsthm}
\usepackage{enumerate}

\begin{document}
	\begin{enumerate}[{\textbf{1}.}]
		\item Is $n$ even or $1 < \gcd(a,n) < n$?
		\item $n-1=772=2^{2}193,\quad q=193,\ k=2$
	\end{enumerate}
\end{document}
It makes the counters bold, but it doesn't increment them. Anyone know how to make the numbers bold and incremented?

Thanks.
Last edited by Singularity on Sat Nov 19, 2011 6:11 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Bold Enumeration Counter

Post by torbjorn t. »

Use the enumitem package instead:

Code: Select all

\documentclass[12pt,fleqn,reqno]{article}
\usepackage{amsfonts,graphics,epsfig,cite}
\usepackage{amsmath,graphicx,amssymb,amsthm}
\usepackage{enumitem}

\begin{document}
   \begin{enumerate}[label=\textbf{\arabic*}.]
      \item Is $n$ even or $1 < \gcd(a,n) < n$?
      \item $n-1=772=2^{2}193,\quad q=193,\ k=2$
   \end{enumerate}
\end{document}
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Bold Enumeration Counter

Post by Singularity »

Wow. Quick answer.

Thanks for the tip. But it seems like I can't use enumitem along with enumerate, so it broke my other enumerations. Can I just add "\label=" inside the brackets of my other enumerations if I switch from enumerate to enumitem?
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Bold Enumeration Counter

Post by torbjorn t. »

If I understand correctly, yes you can add the same to your other enumerations. However, enumitem also allows you to set the style of all enumerations globally:

Code: Select all

\setlist[enumerate,1]{label=\textbf{\arabic*}.}
Add this to your preamble, after loading enumitem. Then you can remove all the optional arguments to the enumerate environments.

I also thought of a workaround for enumerate:

Code: Select all

\documentclass[12pt,fleqn,reqno]{article}
\usepackage{amsfonts,graphics,epsfig,cite}
\usepackage{amsmath,graphicx,amssymb,amsthm}
\usepackage{enumerate}

\begin{document}
   \begin{enumerate}[\bfseries 1.]
      \item Is $n$ even or $1 < \gcd(a,n) < n$?
      \item $n-1=772=2^{2}193,\quad q=193,\ k=2$
   \end{enumerate}
\end{document}
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Re: Bold Enumeration Counter

Post by Singularity »

Thanks. But, I had different levels and different "numbering", so I had to define them all independently.
Post Reply