tags:

views:

53

answers:

3

Is it possible to combine multiple equation references into one, like it is for the \cite command? What I would like is the following:

\begin{subequations}
 \begin{align}
  a & = b \label{eq1} \\
  c & = d \label{e2}
 \end{align}
\end{subequations}

Some text referring to the formulas \eqref{eq1,eq2}.

which would then compile as "Some text referring to the formulas (1a,b)." Obviously, this example doesn't work, but I'm hoping there's a package out there that does something similar. Any ideas?

+1  A: 

What I do when I have multiple equations that will always need to be referenced together, is tagging only one (the top one if there's two, the middle one if there's three, if there's more I split it up):

\begin{align}
a & = b \label{eq1} \\
c & = d \notag
\end{align}

Some text referring to the formulas \eqref{eq1}.

There's also no reason to use subequations here IMHO. I'd never even heard of that...

rubenvb
I agree that one can reference equation 1a and equation 1b separately but it doesn't make sense to say equations(1a,b). As rubenvb points out, \eqref{eq1} is what to use if one wants to reference both equations at the same time. 1 vote up.
yCalleecharan
A: 

You can use cleveref-package. Here's documentation.

You can then use \cref{eq2,eq1,eq3,eq5,thm2,def1} in order to do it.

phimuemue
A: 

Consider the following:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
See the equations below:
\begin{subequations}
\label{all1}
 \begin{align}
  a & = b \label{eq1} \\
  c & = d \label{e2}
 \end{align}
\end{subequations}

These refer to \ref{all1}, \ref{eq1} and \ref{e2}.
\end{document}

The amsmath package introduces the subequations environment. The first label, 'all1', before the \begin{align}, creates a label for the complete set of equations (1, in this case). The two subsequent labels refer to 1a and 1b respectively.

Is that what you were asking about (the existence of the subequations environment, and numbering the composite equation distinctly from the subequations), or the \eqref part?

Norman Gray