# Make some equation numbers bold

I would like to make some equation numbers (that will be defined ad hoc) bold, while others are not. I can only figure out how to make all bold or unbold, not what I am looking for.

\documentclass[leqno]{book}
\usepackage{amsmath,amssymb,amsthm, amscd}
\usepackage[a4paper, textwidth=39cm, margin=1.2in, vmargin=3cm, marginparsep=20pt, marginparwidth=.6in,]{geometry}
\usepackage{fancyhdr}
%\renewcommand\theequation{\bfseries\thesection.\arabic{equation}}
\begin{document}

$$x-y=z$$

$$a+b=c$$

\end{document}

• How do you want to deal with cross-references to various equations: should the cross=refs also appear in bold in case the equation numbers of the corresponding equations happened to be set in bold? – Mico Sep 4 '14 at 0:44

## 2 Answers

As far as I am aware, the only way to do this is to keep on turning bold off and on every time that you want to do this. The cleanest solution would be to define a new version of equation that automatically makes the equation number bold:

\documentclass{article}
\begin{document}

\renewcommand\theequation{\thesection.\arabic{equation}}
\newenvironment{boldequation}{\renewcommand\theequation{\textbf{\thesection.\arabic{equation}}}\equation}
{\endequation}

\begin{boldequation}$$1+1=2$$\end{boldequation}

$$1+1=2$$

\end{document}


which gives:

Alternatively, a cruder way of doing this is using "switches" like:

\documentclass{article}
\begin{document}


\boldequations
$$1+1=2$$

\normalequations
$$1+1=2$$

\end{document}


The output is the same.

• You also can define a \newtagform{bold} that define equation numbers as bold, and write in your equation \usetagform{bold}. This requires only the mathtools package that you may already use. – Bernard Sep 3 '14 at 23:44
• @Bernard Yours is more than a comment – egreg Sep 4 '14 at 6:54

Let me detail my comment: the mathtools package defines \(re)newtagform commands that help define tag ‘styles’. Then \usetagform{name} is a switch to be used outside a math environment. You may go back to the usual style with \usetagform{default}.

In addition, I define a command that allows to change the tag style for one equation of a multiline group of equations in order to, say, emphasize that particular equation. The definition of this command is not generic, as \usetagstyle will not work in this context, so that you will have to change its definition if you want to change the style.

Here is an example:

\documentclass[12pt,a5paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{xcolor}

\newtagform{coloured}[\bfseries]{\color{red}(}{\mdseries)}
\newcommand\boldtag{\refstepcounter{equation}\tag*{(\textbf{\color{red}\theequation})}}

\begin{document}

\usetagform{coloured}
\begin{align}
a & = b + c \\
a^2 & = b^2 + c^2
\end{align}

\usetagform{default}

\begin{align}
a & = b + c \\
a^2 & = b^2 + c^2 \boldtag \\
a^3 & =b^3 + c^3
\end{align}

\end{document}