You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The LaTeX inserted by a virtual keyboard macro is different from the macro definition, beyond the placeholders. In particular, my macro uses \operatorname{unitT}, but \operatorname{\mathrm{unitT}} was inserted.This seems to have changed between 0.98.6 and 0.99.0.
As some explanation: For https://next.math3d.org/ I parse (rather heuristically) the latex output into objects parseable by https://github.com/josdejong/mathjs. 1 The change from \operatorname{...} to \operatorname{\mathrm{...}} broke one of those heuristics. I can certainly work around it if this is the new behavior I have improved the heuristics to account for this, but it seemed like a possible bug.
The extra mathrm seemed surprising to me, but if it's desirable for some reason, please feel free to close this. And, as always, thanks for the great library!
Footnotes
(I'm aware of MathJSON, which is an interesting alternative to MathJS for evaluating expressions, but the application I've been working on has used MathJS for ~8 years, and I'm a bit worried about backward compatibility if I ditch MathJS entirely. Not out of the question, but seems like a pretty big change.) ↩
Description
The LaTeX inserted by a virtual keyboard macro is different from the macro definition, beyond the placeholders. In particular, my macro uses
\operatorname{unitT}
, but\operatorname{\mathrm{unitT}}
was inserted.This seems to have changed between0.98.6
and0.99.0
.Steps to Reproduce
See https://gist.github.com/ChristopherChudzicki/9e96df7d04504e29817dc646a29bcf6d, where this virtual keyboard macro
produces LaTeX values with
\operatorname{\mathrm{unitT}}(\placeholder{},\placeholder{})
Actual Behavior
The macro produces
\mathrm
output even though\mathrm
is not included in its definition.Expected Behavior
My expectation is that the output would have been
Environment
MathLive version This behavior seems to have started in
0.99.0
.This behavior seems to have started in
0.99.0
.Operating System MacOS 14.3.1
Browser Chrome Version 131.0.6778.140 (Official Build) (arm64)
The text was updated successfully, but these errors were encountered: