ronkok / Temml

TeX-to-MathML conversion library in JavaScript
https://temml.org/
MIT License
155 stars 12 forks source link

`\big/ \Big/ \bigg/ \Bigg/` don't work anymore in Firefox #71

Open tmke8 opened 1 week ago

tmke8 commented 1 week ago

I see this output:

image

But I think it used to work in Firefox (it never worked in Chrome though).

Firefox 131.0.3, Ubuntu 24.04

ronkok commented 1 week ago

I agree that it has never worked in Chrome. Row184 in the Temml Wiki Test has always been a problem. Until recently, I was more concerned with rows 178 & 179, which also displayed Chromium errors. But that Chromium bug has been fixed and now is a good time to focus on row 184.

The source of the problem is that the MathML Core operator dictionary does not give the stretchy attribute to any solidus-type character. I've spent the last 1/2 hour experimenting and I find that I can manually set a stretchy attribute on \ & /, Unicode characters U+002F & U+005C. Then I can set a minsize attribute to mimic LaTeX \big, \Big etc.

Results are mixed. The characters stretch properly in WebKit (Safari). Firefox stretches the solidus but not the reverse solidus. Chromium stretches both, but then inserts too much horizontal space between characters.

That's probably the best I'll be able to do. I'll work up a Temml revision later this week.