[Tex/LaTex] Merging inside align-environment

align

An align-environment allows for line-splitting and aligning as in table columns when writing math in latex:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{align*}
      lefthandside1 &= righthandside1\\
      lefthandside2 &= righthandside2\\
      lefthandside3 &= righthandside3\\
      lefthandside4 &= righthandside4
    \end{align*}

\end{document}

All equal-signs = will be right under one another because of &.

I need to add a remark in-between two math-lines. Something like the following:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{align*}
      lefthandside1 &= righthandside1\\
      lefthandside2 &= righthandside2\\
      This is a remark before the third line.\\
      lefthandside3 &= righthandside3\\
      lefthandside4 &= righthandside4
    \end{align*}

\end{document}

Essentially this extra line must merge the two "columns" that the & symbol has created on all other lines. It should act like a normal text-line and not be split or aligned. If I don't include a &, then the end of the remark is still aligned according to the other lines.

Is it possible to merge "columns" (or "ignore" the & splitting) on a specific line, without altering the others?

ShareLatex example here.

Best Answer

If this remark line is not part of the math lines, then using intertext{..} is another way for doing this.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{align*}
      lefthandside1 &= righthandside1\\
      lefthandside2 &= righthandside2
      \intertext{This is a remark before the third line.}
      lefthandside3 &= righthandside3\\
      lefthandside4 &= righthandside4
    \end{align*}

\end{document}

enter image description here

Another method is to use \noalign{..}. This will be similar to the \shortintertext.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{align*}
      lefthandside1 &= righthandside1\\
      lefthandside2 &= righthandside2\\
      \noalign{This is a remark before the third line.}
      lefthandside3 &= righthandside3\\
      lefthandside4 &= righthandside4
    \end{align*}

\end{document}

enter image description here