Quotation marks in text mode in display math: a MathJax bug

8 views
Skip to first unread message

Sean Fitzpatrick

unread,
Jan 8, 2026, 11:56:31 AM (5 days ago) Jan 8
to PreTeXt development
I've tested this on the MathJax demo page and reported it as an issue on their GitHub page, but I thought I would mention it here as well in case it affects anyone else:

In one of my books, I have some introductory material on sets where I have the following example of a set:

<me>
  S = \{x : x \text{ is a letter in ``pronghorns''}\}
</me>
(the Pronghorn being our mascot animal...)

If you do this, the equation displays correctly, but on the line below it, you'll see

pronghorns'\text{.}\}\end{equation*}

The problem goes away if I use single quotes. 

Sean Fitzpatrick

unread,
Jan 8, 2026, 12:12:57 PM (5 days ago) Jan 8
to PreTeXt development
That said, the single quotes aren't rendered as LaTeX quotes in PreTeXt: it displays as `pronghorns'.
I don't see this happening on the MathJax demo, so I assume that's because we run an older version of MathJax.

But the double-quote bug occurs in both versions.

Sean Fitzpatrick

unread,
Jan 8, 2026, 4:38:13 PM (5 days ago) Jan 8
to PreTeXt development
So, this is a problem with LaTeX markup clashing with AsciiMath markup in MathJax.

On the MathJax demo page, I can do:

$$\let\lq=`$$
$$S = \{x: x\text{ is a letter in \lq`pronghorns''\}$$

and I get the desired output. I can even do
$$\let\lq=` S = \{x: x\text{ is a letter in \lq`pronghorns''\}$$

But \let\lq=` doesn't get processed if I put it in the <macros> section of the docinfo, or inline.
Maybe this only works with MJ v4.
Reply all
Reply to author
Forward
0 new messages