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 have the following code:

\begin{align}
[m] &= [n] \nonumber \\

  &= b  
\refstepcounter{equation}
\label{eq:m}
\tag{\theequation,~tag}
\end{align}

If I cross reference the equation, with Equation~\ref{eq:m}, I want only the equation number, without the word 'tag'. Can this be done? Thanks a lot.

share|improve this question

1 Answer 1

Use \ltx@label, which is the default \label inside a display environment. From the amsmath documentation:

... we store the default definition of \label in \ltx@label and then define a new version of \label for use in math display environments. \label@in@display merely issues a warning message if there is already a pending label (which will be discarded) and then stores the label in \df@label.

Below I've wrapped it inside a user interface \ltxlabel:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\makeatletter
\newcommand{\ltxlabel}{\ltx@label}
\makeatother
\begin{document}
\begin{align}
  [m] &= [n] \nonumber \\
      &= b \refstepcounter{equation}\ltxlabel{eq:m}\tag{\theequation,~tag}
\end{align}
See Equation~\ref{eq:m}.
\end{document}

Since you're using amsmath, you may consider using \eqref.

share|improve this answer

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.