0

Using AMSMATH's gather environment I can subnumber equations, hoewever I am also losing the alignment at the "=". Is there a way to have both, alignment and subnumbering?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{gather}
x = a +  b +c \label{eq:gat}\\
sddsdt = a + b + d \tag{\ref{eq:gat}a} \\
yfgfdg = a + b + d \tag{\ref{eq:gat}b}
\end{gather}

\end{document}

subequations_nonaligned

  • 2
    Did you try this approach with align instead of gather? There is nothing special about gather here – daleif Apr 8 at 19:50
2

Note it is very easy to have a subnumbering like you seem to want, and cross-referencing it

\documentclass{article}
\usepackage{mathtools}
\usepackage{cleveref} 

\begin{document}

\begin{equation}
  a = b
\end{equation}

\begin{subequations}
    \begin{align}
    x & = a + b +c\label{eq:gat}\tag{\theequation}\\
    sddsdt & = a + b + d\label{eq:gat1} \\
    yfgfdg & = a + b + d \label{eq:gat2}
    \end{align}
\end{subequations}
We see from \eqref{eq:gat}, \eqref{eq:gat1} and \eqref{eq:gat2} that $1 = 2$.

\end{document} 

enter image description here

  • 1
    I'd prefer doing \label{eq:gat} after \begin{subequations} and \tag{\ref{eq:gat}} in the first line of the alignment. Cleaner than using \theequation. – egreg Apr 8 at 22:57

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.