2

Is there a set way of referencing a single equation from a set? I have three equations numbered together (as, let's say, (2.3)). I prefer numbering them as a set since they are directly related and it looks much cleaner than individually numbering them. How would I go about referencing, for example, the third of these alone?

Sotiris
  • 69
  • 2
    Hi, welcome. Could subequations be an option, see https://tex.stackexchange.com/questions/38716/adding-letters-to-equation-numbers/48826#48826 for an example. – Torbjørn T. Aug 03 '19 at 06:32
  • Hello! That is precisely what I was looking for. It means that all equations still have to be numbered, but it looks way more elegant. Thanks! – Sotiris Aug 03 '19 at 06:52
  • @TorbjørnT. -- Please leave a "token" answer so this nice question doesn't get lost. – barbara beeton Aug 04 '19 at 14:19

1 Answers1

3

To refer to something using the \label/\ref mechanism it must have a number. For your case you could use the subequations environment from amsmath. All numbered equations in such an environment will be numbered 1a, 1b, etc, instead of 1, 2, etc. Cross references can be made to either the set of equations, or to a subequation.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations} \label{equationgroup}
\begin{gather}
z=x \label{eqA} \\ 
a=b \label{eqB} \\
f=g \label{eqC}
\end{gather}
You can have text in between here.
\begin{equation}
h=i
\end{equation}
\end{subequations}

Refer to \eqref{equationgroup} or for example \eqref{eqB}.
\end{document}

enter image description here

Torbjørn T.
  • 206,688