7

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?

2
  • Are you using the amsmath package? Commented May 23, 2012 at 17:16
  • @Gonzalo Medina: Yes.
    – Pavasaris
    Commented May 23, 2012 at 17:18

2 Answers 2

7

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

2
  • Thanks! I didn't even used \eqref{} for this, thought that it should be done like this [\ref{}].
    – Pavasaris
    Commented May 23, 2012 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. Commented May 23, 2012 at 17:34
6

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

% !TeX program = pdflatex
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«

\begin{document}
  \newtagform{bbrackets}[\textbf]{\textbf{[}}{\textbf{]}}
  \usetagform{bbrackets}
  \begin{equation}
    a^2+b^2=c^2
  \end{equation}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .