I'm trying to create a system of equations with sub-numbering using the \begin{subnumcases} environment. Everything works perfectly but I would need to place a label somewhere in order to ref the system itself using the main number assigned to it, without having to ref one equation of it.

This is my code:

    \frac{d\psi}{d\zeta} = \frac{m_1}{y_1\prime}(x_1-\beta y_1\prime) \label{eq:dpsidz}
    \frac{dx_i}{d\zeta} = \frac{m_i}{\psi y_i\prime}(x_i-y_i\prime)(x_i-\beta y_i\prime) \qquad \forall i=1,...,C-1 \label{eq:dxdz}
    0 = y_1\prime (x_j-\beta y_j\prime)-\alpha_{1j}y_j\prime(x_1-\beta y_1\prime) \qquad \forall j=2,...,C \label{eq:algeb1}
    0 = \sum_{i=1}^{C}y_i\prime -1 \label{eq:algeb2}
    \psi|_{\zeta=0} = 1
    x_i|_{\zeta=0} = x_i^F \qquad \forall i=1,...,C
The system illustrated in \ref{eq:system} is a \textsc{dae} system with a differential index equal to 1.

As you can see, I've tried to place the label{eq:system} inside the environment, before the first equation, but when I ref it in text it appears the name of the first equation. If the system equations are labelled 1.1a, 1.1b etc., I would like to ref the system as 1.1. I hope I was clear in explaining my issue. Thank you


You can use empheq together with amsmath and its subequations environment.



  &\frac{d\psi}{d\zeta} = \frac{m_1}{y_1'}(x_1-\beta y_1') \label{eq:dpsidz}
  &\frac{dx_i}{d\zeta} = \frac{m_i}{\psi y_i'}(x_i-y_i')(x_i-\beta y_i')
    \qquad \forall i=1,\dots,C-1 \label{eq:dxdz}
  &0 = y_1' (x_j-\beta y_j')-\alpha_{1j}y_j'(x_1-\beta y_1')
    \qquad \forall j=2,\dots,C \label{eq:algeb1}
  &0 = \sum_{i=1}^{C}y_i' -1 \label{eq:algeb2}
  &\psi|_{\zeta=0} = 1
  &x_i|_{\zeta=0} = x_i^F \qquad \forall i=1,\dots,C
The system illustrated in \ref{eq:system} is a \textsc{dae} system 
with a differential index equal to~$1$.


With hyperref the anchor will be immediately above the system.

enter image description here

A couple of stylistic notes:

  1. instead of ... you should input \dots;
  2. instead of \prime you should use ^{\prime} or the easier ' (apostrophe) as in the code above.
  • thank you, that solved the problem!! and thanks for the other tips as well! – Diego Sep 21 '18 at 10:02

Try putting \label{eq:system} inside the empty bracket next to \begin{subnumcases} as shown below. then you can refer it properly.

  • Thanks!! Now it works almost fine. The referred name is right, the only problem is that when I click on the referred eq. (i use hyperref) the position it shows me is not the system's position, but higher in the page. To be clear: the system is labelled 3.13 and when i click on it it sends me to eq. 3.12 which is before the system of course. – Diego Sep 20 '18 at 10:56
  • That might be because you have really long equations, you could try using breaqn, as suggested in this post tex.stackexchange.com/questions/133773/… , also accept the answer to know others the problem is solved, thank you – Komal Pathade Sep 20 '18 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.