Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Are you using the amsmath package? –  Gonzalo Medina May 23 '12 at 17:16
    
@Gonzalo Medina: Yes. –  Pavasaris May 23 '12 at 17:18
add comment

2 Answers

up vote 6 down vote accepted

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

share|improve this answer
    
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
add comment

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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