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?

  • 3
    \intertext{} is the command you are looking for. – darthbith Nov 4 '14 at 13:34
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.

  • 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 4 '14 at 13:38
  • @darthbith Thanks. I had no idea. Thought both is from mathtools. – LaRiFaRi Nov 4 '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: tex.stackexchange.com/q/43860/32374 . – darthbith Nov 4 '14 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.