5

I need equation (1) followed by equation (1.a), (1.b), etc. But I am getting equation (1), then (2.a) (2.b), etc.

\documentclass{llncs}
\usepackage{amsmath}
\usepackage{placeins}

\begin{document}
\begin{equation}
Result = X + \sum\limits_{i=0}^{n}Y 
\end{equation} 

\begin{subequations}
\begin{align}
X &= ab \\    Y &= cd 
\end{align}
\end{subequations}
\end{document}
2
  • @Mico it worked. Why not adding this as answer? Apr 3, 2017 at 17:18
  • Because the method in egreg's answer is far more general. \addtocounter{equation}{-1} is quite hackish in comparison.
    – Mico
    Apr 3, 2017 at 17:22

1 Answer 1

3

You can use \ref:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{subequations}\label{whatever}
\begin{gather}\tag{\ref{whatever}}
\mathrm{Result} = X + \sum\limits_{i=0}^{n}Y
\\
\begin{align}
X &= ab \\    Y &= cd
\end{align}
\end{gather}
\end{subequations}

\end{document}

Note how you can get the right vertical spacing instead of using equation and align with align nested in gather.

enter image description here

It's the same with llncs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .