Is it possible to have amsmath automatically number equations in "subequations" style, when a multiline construct like

E &= m c^2 \\
c^2 &= a^2 + c^2

is encountered?

Using the subequations environment explicitly is useful, when it is necessary to refer to a group of equations. When the only reason for using it is a style requirement, that successive equations should be numbered as (13a), (13b), etc., it would however be nice to have this automated away.

Additionally, this would be extremely useful in LyX, where using the Subequations module breaks the layout of the live-preview.

1 Answer 1


Not a good idea, in my opinion. If LyX is not able to cope with subequation, then don't use it or ask its developers to fix it.

Anyway, you can do it:




a &= b \\
c &= d

a &= b \\
c &= d


It's necessary to change all environments, because they depend on \endalign, so one cannot just change it.

But don't. Really.

enter image description here

  • This solution works pretty well (except that I add a \appto\subequations{\let\subequations\relax} to allow \begin{subequations}\label{eq:equation-group}\begin{align}... without getting labels (1aa), (1ab), (1ac)...). But is there maybe some solution, that still allows using \begin{align} \notag hello \\ & world \end{align} without getting (1a) instead of (1) as the label?
    – kdb
    Nov 7, 2018 at 15:31
  • 1
    @kdb Aha! Now you know why it's not good to do that. Really. ;-)
    – egreg
    Nov 7, 2018 at 15:33

You must log in to answer this question.

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