2

I want to write down some equations, with some commentary between the equations. However, the equations need to be aligned and I want the commentary to be aligned to the left. My code is:

\begin{document}
\begin{align}
a+c&= b +d\\
a&= b+ d-c\\
\mbox{text at the left}\\
0&=b+d - a-c    
\end{align}
\end{document}

Is this possible within the align environment?

LaRiFaRi
  • 43,807
Sven
  • 95
  • 1
  • 5

1 Answers1

3
% arara: pdflatex

\documentclass{article}
\usepackage{blindtext}
\usepackage{mathtools}

\begin{document}
\blindtext
\begin{align} 
a+c&= b +d\\
a&= b+ d-c\\ 
\shortintertext{text at the left} 
0&=b+d - a-c    
\end{align}
\blindtext
\end{document}

enter image description here

If the text is longer than in your example, you should use \intertext instead. The latter is included in amsmath as well.

LaRiFaRi
  • 43,807
  • 1
    It might be helpful to note that the \shortintertext{} macro here requires the mathtools package, whereas \intertext{} requires only the amsmath package. – darthbith Nov 04 '14 at 13:38
  • @darthbith Thanks. I had no idea. Thought both is from mathtools. – LaRiFaRi Nov 04 '14 at 13:41
  • 1
    Nonetheless, I usually load mathtools since I have no legacy documents that might be changed by the changes in mathtools as compared to amsmath. Actually, mathtools provides some fixes to intertext and shortintertext (See page 23 of the mathtools manual), so it is probably better to load mathtools: http://tex.stackexchange.com/q/43860/32374 . – darthbith Nov 04 '14 at 13:51