[Tex/LaTex] Formatting Equation Numbers

boldequationsnumberingtext-decorations

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?

Best Answer

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} 

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

\end{document}

enter image description here