# [NTG-context] intertext for aligned equations

Taco Hoekwater taco at elvenkind.com
Mon Mar 27 11:02:38 CEST 2006


Hi,

> This seems to be working fine. However, \intertext defined in
> amsmath.sty seems to be doing  a lot more (I just can't figure out
> what it is doing?) Can someone suggest how to make the above command
> more robust on the lines of \intertext?

It inserts a post/pre-display skip&penalty pair around the intertext,
then creates a \vbox for use a paragraph. The result is (almost) as if
it the text was part of the 'normal' text flow between two displays.

I cannot tell you if this would work exactly the same as expected in
ConTeXt (needs further testing), but a context-like solution would
look like this:

\def\startintertext#1\stopintertext{%
\noalign{\dointertext{#1}}\NR}

\unexpanded\def\dointertext#1%
{\penalty\postdisplaypenalty
\afterdisplayspace  % the matching \before... is not needed
\vbox{\forgetall \noindent #1\par}%
\penalty\postdisplaypenalty }

Cheers, taco