LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

\operatorname content should not be parsed

Open xworld21 opened this issue 1 year ago • 0 comments

An improbable edge case: characters like -, * get parsed even within \operatorname{}. This should not happen:

$a-b$ $\operatorname{a-b}$

compiles to the PDF image Per amsmath documentation, \operatorname{} effectively resets the math codes, disabling the special behaviour of -, *, explaining the above behaviour.

LaTeXML instead prints

<mrow>
  <mi mathvariant="normal">a</mi>
  <mo>−</mo>
  <mi mathvariant="normal">b</mi>
</mrow>

which is not a single operator, and moreover the hyphen has become U+2212.

xworld21 avatar Feb 12 '24 21:02 xworld21