4

I would like to make some equation numbers (that will be defined ad hoc) bold, while others are not. I can only figure out how to make all bold or unbold, not what I am looking for.

\documentclass[leqno]{book}
\usepackage{amsmath,amssymb,amsthm, amscd}
\usepackage[a4paper, textwidth=39cm, margin=1.2in, vmargin=3cm, marginparsep=20pt, marginparwidth=.6in,]{geometry} 
\usepackage{fancyhdr}
%\renewcommand\theequation{\bfseries\thesection.\arabic{equation}}
\begin{document}

\begin{equation}
x-y=z
\end{equation}

\begin{equation}
a+b=c
\end{equation}

\end{document}
  • How do you want to deal with cross-references to various equations: should the cross=refs also appear in bold in case the equation numbers of the corresponding equations happened to be set in bold? – Mico Sep 4 '14 at 0:44
4

As far as I am aware, the only way to do this is to keep on turning bold off and on every time that you want to do this. The cleanest solution would be to define a new version of equation that automatically makes the equation number bold:

\documentclass{article}
\begin{document}

\renewcommand\theequation{\thesection.\arabic{equation}}
\newenvironment{boldequation}{\renewcommand\theequation{\textbf{\thesection.\arabic{equation}}}\equation}
   {\endequation}

\begin{boldequation} 1+1=2 \end{boldequation}

\begin{equation} 1+1=2 \end{equation}

\end{document}

which gives:

enter image description here

Alternatively, a cruder way of doing this is using "switches" like:

\documentclass{article}
\begin{document}

\newcommand\boldequations{\renewcommand\theequation{\textbf{\thesection.\arabic{equation}}}}
\newcommand\normalequations{\renewcommand\theequation{\thesection.\arabic{equation}}}

\boldequations
\begin{equation} 1+1=2 \end{equation}

\normalequations
\begin{equation} 1+1=2 \end{equation}

\end{document}

The output is the same.

| improve this answer | |
  • 1
    You also can define a \newtagform{bold} that define equation numbers as bold, and write in your equation \usetagform{bold}. This requires only the mathtools package that you may already use. – Bernard Sep 3 '14 at 23:44
  • @Bernard Yours is more than a comment – egreg Sep 4 '14 at 6:54
1

Let me detail my comment: the mathtools package defines \(re)newtagform commands that help define tag ‘styles’. Then \usetagform{name} is a switch to be used outside a math environment. You may go back to the usual style with \usetagform{default}.

In addition, I define a command that allows to change the tag style for one equation of a multiline group of equations in order to, say, emphasize that particular equation. The definition of this command is not generic, as \usetagstyle will not work in this context, so that you will have to change its definition if you want to change the style.

Here is an example:

\documentclass[12pt,a5paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{xcolor}

\newtagform{coloured}[\bfseries]{\color{red}(}{\mdseries)}
\newcommand\boldtag{\refstepcounter{equation}\tag*{(\textbf{\color{red}\theequation})}}

\begin{document}

\usetagform{coloured}
\begin{align}
 a & = b + c \\
 a^2 & = b^2 + c^2
\end{align}

\usetagform{default}

\begin{align}
 a & = b + c \\
 a^2 & = b^2 + c^2 \boldtag \\
 a^3 & =b^3 + c^3
\end{align}

\end{document} 

enter image description here

| improve this answer | |

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.