# Question regarding aligning equations

I feel that I very often write

\begin{aligned} a+b&=c\\ y&=x^2+c \end{aligned}

in order to align equations that I wish to group. My problem with the "align" environment is that each equation will get its own number as opposed to the above method where both of these equations are assigned one collective number.

Is there a more universally accepted way to go about this or a more "right" way to typeset these equations? It low-key feels like something that isn't necessarily meant to be so typical but maybe that's just my perception.

• you are using aligned without specifying any alignment point (&) which is a bit strange, probably better would be to use &= if you want aligment or use gathered rather than aligned if there is no alignment. Otherwise what you show is the intended usage. Dec 12, 2019 at 14:26
• Oh sorry I think I was a little too hasty when I drafted the example. Thanks for pointing that out. Dec 13, 2019 at 13:33

Since you use this a lot, that is a good sign for creating a new environment, say numalign, that will do that automatically for you.

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}

\newenvironment{numalign}
{\begin{aligned}} {\end{aligned}}

\begin{numalign}
a + b &= c \\
y &= x^2 + c
\end{numalign}

\end{document}

• Thank you, this is more or less what I was looking for. I had tried creating a custom command but I thought the syntax for calling it was slightly clunky but this is more or less perfect. Dec 13, 2019 at 13:35
• Personally I'd write something like \newenvironment{numalign}{\equation\def\@currenvir{numalign}\aligned}{\endaligned\endequation}. In this way if you misspell the argument of \end{numalign} the error message will be slightly less cryptic. But +1 anyway :-) Dec 13, 2019 at 13:53