# \intertext in MathJax

MathJax, at least as used on MO, recognises many multi-line environments, like {multline}, {align}, and {gather}. However, it does not seem to recognise \intertext for a quick interjection in the middle of a group of related equations. Is there any analogue of \intertext in MathJax, possibly by \requireing an appropriate package?

Here's what I want to work, although it does not (edited in response to @FrançoisG.Dorais's comment to explain why I don't just end one environment and begin another—namely, that I want to preserve alignment points):

\begin{align*} 1 + 1 & {}= 2 \intertext{and} 1 + 2 & {}= 3. \end{align*}

• This is interesting but I don't think there's a meaningful way to implement this. The reason behind \intertext is to add less space between the two equations than the trivial solution \begin{gather*}...\end{gather*}and\begin{gather*}...\end{gather*}. There is no better way to do this while making sure that the inter-text is processed just as regular text, but then regular spacing rules apply. Mar 5 at 6:57
• Another workaround \begin{gather}1 + 1 = 2\\ \text{and}\\1 + 2 = 3.\end{gather} \begin{gather}1 + 1 = 2\\ \text{and}\\1 + 2 = 3.\end{gather} Mar 5 at 15:15
• @FrançoisG.Dorais, that solution certainly works fine for {gather*}; but, despite my poor choice of that as an example, I'm mainly interested in {align*}, and ending an {align*} and beginning a new one loses all the alignments (I think?). Mar 5 at 18:51
• @GeraldEdgar, that I guess is the best possible (since it avoids ending the environment, and so would remember positions within an {align*}, which was, despite my puzzlingly not saying so, my reason for not wanting to end a multi-line environment). It's not left-aligned, and unfortunately \hfill does not convince it to be either, but beggars can't be choosers. Mar 5 at 18:53
• @FrançoisG.Dorais : The effect of \intertext is NOT only to have less space between two displayed lines than there would otherwise be. Rather, it makes the vertical alignment below \intertext match the vertical alignment above \intertext. Mar 6 at 17:08

No, MathJax doesn't have an implementation \intertext, as MathJax's internal format is MathML and there is no natural way to accomplish it within the MathML that MathJax supports.
• Ignoring all the MathML niceties around formatting the equations, doesn't <mtable><mtr><mtd>1 + 1</mtd><mtd>= 2</mtd></mtr><mtr><mtd colspan="2">and</mtd></mtr> <mtr><mtd>1 + 2</mtd><mtd>= 3</mtd></mtr></mtable> work? (EDIT: Ah, no, at least on Mozilla's MathML Tester, colspan is accepted but ignored, as became clear when I tried something longer than and as intertext.) Mar 6 at 17:15
• No, that would not be the same as what \intertext would produce. In LaTeX, \intertext produces text that is outside the table, flush left (unless you are in a centering environment). If the text is long, for example, it will not affect the sizes of the columns in the table. Using colspan would make the text be part of the table, it would not be flush left with the rest o the page, but only within the table (if you also used align="left"), and it would affect the column sizes if the text were longer than the combined columns it spans. Mar 6 at 18:10
• As for the MathML tester, that is unrelated to MathJax and tests the native MathML handling of your browser, so your results will depend on which browser you are using. Even Firefox's relatively complete MathML implementation doesn't seem to handle colspan, however. But it's also true that MathJax doesn't yet implement colspan either, so while this could be a work-around for some situations, it is not yet available in MathJax, either. Mar 6 at 18:15
• You could probably use \rlap{\hspace{...}\text{and}} the proper distance for the \hspace to get what you want, but it is a hack and would need to have the spacing determined by hand for each expression. Mar 6 at 18:17