LaTeX error: md ending with intertext

26 views
Skip to first unread message

Sean Fitzpatrick

unread,
May 22, 2026, 5:43:48 PM (9 days ago) May 22
to PreTeXt development
Probably fair to call this author error, but this worked before the overhaul of the display math markup.

Make an md whose last line is intertext. For example:

      <p>
        <md>
          <mrow>x \amp =2</mrow>
          <mrow>y \amp =4</mrow>
          <intertext>Blah blah blah</intertext>
        </md>
      </p>

This will display fine in HTML, but the LaTeX will not build: this appears to be a case not covered in the XSL, since the closing \end{align*} is never written.

Is it stupid to end an md with intertext? Probably. Is it still a bug? I guess Rob can answer that.

Sean Fitzpatrick

unread,
May 22, 2026, 5:49:16 PM (9 days ago) May 22
to PreTeXt development
I should note that this came up for me in a case where the structure of the md was

equation
intertext
equation
intertext

and it was somewhat reasonable to want the two intertexts to align. But not essential, so there is an easy workaround: don't put intertext at the end.

Rob Beezer

unread,
May 22, 2026, 6:26:41 PM (8 days ago) May 22
to prete...@googlegroups.com
Maybe not "stupid" on the author's part, but I think INTERtext must be
INTER-somethings.

I do generally think #intertext is sorta stupid. LaTeX/PDF is teh onhly place
where we take any advantage of it whatsoever. It is "useless" for any other format.

What does the schema do with your examples?

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/38a31e46-197e-4b13-a981-98b1ca843152n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/38a31e46-197e-4b13-
> a981-98b1ca843152n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Sean Fitzpatrick

unread,
May 23, 2026, 9:45:26 PM (7 days ago) May 23
to PreTeXt development
I was working on Windows, where I don't have Jing set up. 

The pretext-tools extension in vscode does some checking but I don't always trust it. (For example, it claims I cannot have an md without more.)

I've removed all intertext since, as you point out, it's never really been as useful as one might have hoped. 

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzNS5iZWV6ZXI.1779488799%40pnsh.

Rob Beezer

unread,
May 24, 2026, 9:53:26 PM (6 days ago) May 24
to prete...@googlegroups.com
On 5/23/26 18:45, Sean Fitzpatrick wrote:
> where I don't have Jing set up.

I checked, the schema was a bit loose. But the LaTeX conversion presumes an #md
with #intertext will start, and end, with an #mrow. And that there are not two
adjacent #intertext. Many ways to fail.

So I tightened up the schema to match reality:

https://github.com/PreTeXtBook/pretext/pull/2874

Thanks for bringing this one forward.

Rob


Reply all
Reply to author
Forward
0 new messages