[Tex/LaTex] Labels in subequations

cross-referencingsubequationstags

I have the following system of equations

    \begin{subequations}\label{eq}
    \begin{align}
    &\alpha_x = \dots\label{eqa}\\
    &\beta_x = \dots\label{eqb}\\
    &\gamma_x = \dots\label{eqc}\\
    &\delta_x = \dots \quad\quad \mbox{if $\dots$}\label{eqd1}\\
    &\delta_x = \dots \quad\quad \mbox{if $\dots$}\label{eqd2}\\
    &\delta_x = \dots \quad\quad \mbox{if $\dots$}\label{eqd3}
    \end{align}
    \end{subequations}

Now the labels are (1a), (1b), (1c), (1d), (1e), (1f) and calling \ref{eq} I can obtain (1).
Being the last three expressions all referred to \delta I want their tags to be in the form (1d-1), (1d-2), (1d-3) and to have the possibility both to call a single one of them (\ref{eqd2} for example) and to call them globally to get (1d).
Is there an easy way to do it?

Best Answer

This requirement may require many manual tags,

\documentclass{book}
\usepackage{amsmath}

\begin{document}

 \begin{subequations}\label{eq}
    \begin{align}
    &\alpha_x = \dots\label{eqa}\\
    &\beta_x = \dots\label{eqb}\\
    &\gamma_x = \dots\label{eqc}
    \end{align}
    \end{subequations}
\vspace{-\belowdisplayskip}
\vspace{-\abovedisplayskip}
\setcounter{equation}{3}
\renewcommand{\theequation}{\theparentequation\alph{equation}}
 \begin{subequations}\label{eqd}
   \begin{align}
    &\delta_x = \dots \quad\quad \mbox{if
    $\dots$}\label{eqd1}\tag{1d-1}\\
    &\delta_x = \dots \quad\quad \mbox{if
    $\dots$}\label{eqd2}\tag{1d-2}\\
    &\delta_x = \dots \quad\quad \mbox{if
    $\dots$}\label{eqd3}\tag{1d-3}
    \end{align}
    \end{subequations}

\setcounter{equation}{1}
\renewcommand{\theequation}{\arabic{equation}}
Trial \ref{eqd}\quad \ref{eqd3}
\begin{align}
a+b=c
\end{align}

\end{document}

I am not sure whether this suggestion is the correct way to do (if not suits then leave this)...

Related Question