[Tex/LaTex] To get one line of equation disregarded during the alignment process in align environment

alignamsmath

Couldn't find any answer to this question on anywhere. I have this one particular solution in my hands, which helps only if the equation to be disregarded for alignment is the first or the last of the array of equations, which is simply:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
    \begin{gather} % or gather*
        2 + 5 + 123 + 45 = 175\\ % the equation I am taking out of alignment
        \begin{aligned}
             2 + 3 &= 5\\
            11 + 5 &= 16
        \end{aligned}
    \end{gather}
\end{document}

Which doesn't really look good to my eyes. Works though; works exactly as I hoped it to, and looks exactly as I wanted it to.

Then again, what would be the proper way to do it, which preferably also manages to deal with a not-aligned equation in between, rather than just at the beginning or the end? Heard and read about this ancient \noalign command, but also read that it is not supported or something like that.

Best Answer

You can use \mathclap from the mathtools package:

enter image description here

References:

Code:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\begin{align}
    \mathclap{2 + 5 + 123 + 45 = 175}\\ % the equation I am taking out of alignment
         2 + 3 &= 5\\
        11 + 5 &= 16
\end{align}
\end{document}