Text FormattingBold Equation Numbering

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
kimyoungil
Posts: 3
Joined: Mon Aug 08, 2011 11:34 pm

Bold Equation Numbering

Post by kimyoungil »

I was wondering if someone could tell me how to make the equation numbering bold, but keep the references normal, e.g.

Code: Select all

If we have \begin{equation}\label{eq1} x^2+y^2=1 \end{equation}
Then I want the number of the equation to be bold ,but \ref{eq1} to be normal.

I can get the equation numbering to be bold using

Code: Select all

\renewcommand{\theequation}{\textbf{(\arabic{equation})}}
but this makes the references bold too and I don't know how to undo this.

Thank you in advance for you help.
Last edited by Stefan Kottwitz on Mon Aug 08, 2011 11:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Bold Equation Numbering

Post by frabjous »

Here's a solution using \newtagform and \usetagform from the mathtools package:

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\renewcommand{\theequation}{(\arabic{equation})}
\newtagform{bold}[\textbf]{}{}
\usetagform{bold}
\begin{equation}
E \neq m c^3
\label{ineq}
\end{equation}
That was inequality \ref{ineq}. 
\end{document}

kimyoungil
Posts: 3
Joined: Mon Aug 08, 2011 11:34 pm

Re: Bold Equation Numbering

Post by kimyoungil »

Thank you very much for your reply. I was wondering if you could maybe help me with a related problem too. I have another counter defined by

\newcounter{general}

\renewcommand{\thegeneral}{(\arabic{general})}

which I would like to apply the solution too (actually i don't really want the equations to be bold anymore, i just thought that if i new how to do it for \theequation i would be able to generalise it myself to the above problem, but this unfortunately is not the case).


Kind regards, Young-il
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Bold Equation Numbering

Post by frabjous »

I'm afraid I don't understand the question for a "counter in general". Where else and in what context does the counter show, except for when \ref'd?
kimyoungil
Posts: 3
Joined: Mon Aug 08, 2011 11:34 pm

Bold Equation Numbering

Post by kimyoungil »

I use a counter similar to the one used for equations to number definitions, theorems etc. So for example, I have

\newtheorem{remark}[general]{Remark: }
\renewcommand{\thegeneral}{(\arabic{general})}

As I mentioned above, I would like to have the number for this to be in bold, so that for example, it shows (1) Remark: .....

But when I refer to this remark, I don't want this show in bold, i.e. When I write something like: "According to Remark (1), we see that ..." I don't want the (1) to be bold, i.e. I don't want "According to Remark (1), we see that ..." The latter is what happens when I change \renewcommand{\thegeneral}{(\arabic{general})} to \renewcommand{\thegeneral}{\textbf{(\arabic{general})}}

I hope this explanation is more clear.

Kind regards,

Young-il
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Bold Equation Numbering

Post by Stefan Kottwitz »

Hi Young-il,

you could either customize the theorem layout or redefine \ref to always output non-bold references.
Perhaps show a small compilable example with such a theorem and a reference. Besides testing and extending it, we would see which theorem packages you are using (theorem, ntheorem, amsthm, thmtools, ...)

Stefan
LaTeX.org admin
Post Reply