The code below gives me ?? when referencing the equations. How do i fix it ?
How do I get (1a,1b) for the first equation if possible?
MWE
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
f: A \to B, g: B \to C \label{eq:1} \\
\begin{aligned}
f(a) &= \ldots \label{eq:2} \\
g(b) &= \ldots \label{eq:3}
\end{aligned}
\end{gather}
\ref{eq:1} \ref{eq:2} \ref{eq:3}
\end{document}
subequations
fromamsmath
around the respectivegather
,align
orequation
environments. Or did you mean to ask for numbering these three lines into "(1)", "(1a)" and "(1b)" ?