brucemiller / LaTeXML

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

asterisk in math should be rendered as U+2217 #2318

Closed xworld21 closed 9 months ago

xworld21 commented 9 months ago

Something I noticed recently and surprised me greatly: LaTeXML outputs a simple asterisk for the character , whereas it should be using U+2217 (ASTERISK OPERATOR).

dginev commented 9 months ago

Sounds like a reasonable upgrade.

I wonder if this should also be handled in the MathML post-processor, akin to stylizing unicode minus.

xworld21 commented 9 months ago

Adding the following line to TeX.pool.ltxml seems to do the job:

DefMathLigature("*" => "\x{2217}", role => 'MULOP');

Unicode math output (as in latexmlmath --unicodemath) will show U+2217.

The 'correct' fix would be for LaTeXML to support math codes, which is easy in principle, but could have far reaching effects (e.g. math codes include role information, which could affect parsing).