6

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
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

  • 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
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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.