# \eqref to give reference to a sequence of subequations

Suppose I have the following code

\begin{subequations}
\begin{align}
a+b = c \label{eq.1}\\
d+e = f \label{eq.2}
\end{align}
\end{subequations}


I want now that upon giving the reference, it should appear as (1a-b). \eqref{eq.1} and \eqref{eq.2} will give output as 1a and 1b not what I want, which is (1a-b).

-
Is this a convention you need to observe? Because it goes very much against the customs of scientific publications, AFAIK, and makes the document very hard to read. –  Stephan Lehmke Aug 31 '12 at 16:52

I don't think it's a very good idea. However, this is how you can do it:

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\globallabel}[1]{%
\protected@edef\@currentlabel{\theparentequation a--\alph{equation}}\label{#1}%
}
\makeatother
\begin{document}
\begin{subequations}
\begin{align}
a+b = c \label{eq.1}\\
d+e = f \label{eq.2}
\end{align}
\globallabel{eq}
\end{subequations}

\eqref{eq}

\end{document}


The \eqref command will print

(1a-b)

-