brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
961 stars 101 forks source link

--noinvisibletimes: choose zero-width space over invisible times #2303

Closed dginev closed 10 months ago

dginev commented 10 months ago

Fixes #1941 . At least it allows it to be fixed, via a new option.

Here is a draft following some offline discussions on allowing a customization switch for preferring zero-width space (U+200B) over invisible times (U+2062) in implied <mo> elements.

The PR minimally touches up the character in post-processing, via the MathML::stylizeContent sub.

An easy test is:

$ latexmlc 'literal:2x' --whatsin=math --dest=test.html \
  --noinvisibletimes

I have exposed the option in latexmlpost and latexmlc. But not yet in latexmlmath (maybe later).

brucemiller commented 10 months ago

I think I tend to prefer one of the variants we discussed, like --noinvisibletimes, for example. There isn't really a good solution, but there is clearly at least a temporary need.

So why don't you take a fresh look, change the option name if you want to, and then go ahead & merge it whichever way you feel good about :>

dginev commented 10 months ago

--noinvisibletimes works, thanks!