# Formatting Equation Numbers

I need the numbers of equations and brackets around to be in bold. Doing like this

\usepackage{etoolbox}
\pretocmd{\theequation}{\bf}{}{}


only the number is produced in bold, how to bold brackets?

And second question. I want my references to equations also to be with bolded brackets automatically, how to do this?

-
Are you using the amsmath package? –  Gonzalo Medina May 23 '12 at 17:16
@Gonzalo Medina: Yes. –  Pavasaris May 23 '12 at 17:18

You can redefine \tagform@#1 from amsmath.sty:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\def\tagform@#1{\maketag@@@{\bfseries[\ignorespaces#1\unskip\@@italiccorr]}}
\makeatother

\begin{document}

$$\label{eq:test} a = b.$$
As we see from equation~\eqref{eq:test}...

\end{document}


-
Thanks! I didn't even used \eqref{} for this, thought that it should be done like this [\ref{}]. –  Pavasaris May 23 '12 at 17:32
@Pavasaris you're welcome! The advantage of using \eqref over \ref is that the former automatically supplies the declared format around the equation number. –  Gonzalo Medina May 23 '12 at 17:34

The »mathtools« package can do this job for you.

% !TeX program = pdflatex
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
$$a^2+b^2=c^2$$