# [Tex/LaTex] Putting equations in \intertext to annotate a proof

alignamsmathequations

I'm trying to typeset a proof with Latex. When I do proofs, I like to alternate between a line of text, to explain each step, and the resulting equation. I also like to have the equations align at the =.

I can do this quite easily with begin{align} and \intertext{}. My issue, though, is that I would now like to put an equation into the \intertext. Essentially, it's a side equation which isn't directly part of the proof but is important to get from one step to the next.

Obviously, I could just abandon begin{align} and alternate between text mode and math mode, but then lines of my proof wouldn't be aligned at the =.

Is there some way that I can force \intertext to accept my equation? Otherwise, what do people generally do when they have an equation that's important to the proof but not part of the direct logic?

This appears to just work, depending on what you want he output to look like, did you get an error message from your use of \intertext?

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
1 &=2\\
\intertext{aaa}
a+b&=c+d\\
\intertext{dont't forget that
% use primitive display math here as a nested equation
% disturbs align counting
$$1111=1 \refstepcounter{equation}\eqno(\theequation)$$}
0.5&=\frac{1}{2}
\end{align}

\end{document}


The code above produces the following output: