2

I've just found out here I can use the subequations environment to have equations share a number but with a letter (1a, 1b). So now, I have

\begin{subequations}
  \begin{align}
     a & = b\\
     b & = c
  \end{align}
\end{subequations}

I can use labels to easily refer to eq (1a) or (1b), but how do I refer to equation (1) in its globality ?

Vincent Fourmond
  • 486
  • 2
  • 11

1 Answers1

3

Turns out it's trivial:

\begin{subequations}
  \begin{align}
     a & = b \label{eq:a}\\
     b & = c \label{eq:b}
  \end{align}
\label{eq:global}
\end{subequations}

I just have to refer to \eqref{eq:global}.
Vincent Fourmond
  • 486
  • 2
  • 11
  • I'd put the global \label at the top, but it's not a big deal. – egreg Jan 13 '17 at 11:40
  • I think it's good to keep in mind that labels come more at the end (after \caption in figure, for instance). – Vincent Fourmond Jan 13 '17 at 11:49
  • I prefer to think in a different way: here you're labeling subequations, in a figure or table you're labeling a caption. You can have two captions in the same figure environment; to the contrary, subequations is for a single number. – egreg Jan 13 '17 at 11:54
  • A little twist on this. I followed this without putting the labels (a,b) in the \align and it still worked fine. I then put an \intertext into the align and it stopped working. I put the labels back and now It works again. Sometimes you just need that rabbits foot. – Philip Roe Jul 24 '23 at 19:42