Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaTeXML should set explicit spacing for operators outside the MathML dictionary #789

fred-wang opened this issue Jul 17, 2016 · 2 comments


Copy link

Simple testcase: $\int dr$

This will generate

`<math id="p1.m1" class="ltx_Math" alttext="\int dr" display="inline"><mrow><mo largeop="true" symmetric="true">∫</mo><mrow><mo>𝑑</mo><mi>r</mi></mrow></mrow></math>`

But MATHEMATICAL ITALIC SMALL D is not an operator in the Operator Dictionary ( so rendering engines are likely to use the default value thickmathspace for lspace/rspace ( This leads to too much spacing compared to what e.g. XeLaTeX does. I guess this may happen for more cases of operators outside the Operator Dictionary.

@dginev dginev added this to the LaTeXML-0.8.3 milestone Jul 17, 2016
Copy link

I've been meaning to hunt down a machine readable operator dictionary for other purposes; And, I'd like to have access to a good set of font metrics covering all of Unicode, but...

what would you suggest using for the default spacing for otherwise unknown symbols?

Copy link

Actually, Knuth recommends writing \int \,dr, other than that TeX has no idea that "d" is an operator.

On the more general issue, the MathML spec seems to imply an equivalence between simple codepoints with mathvariants, and secondary plane characters, but doesn't seem explicit about whether it's the spec writer's responsibility to include the plane 1 codepoints in the operator dictionary or the implementer's responsibility to do the reverse lookup! :> And in any case, it's not clear that all the spec writers would agree that "d" is an operator in the mo sense!!

At any rate, I've tuned the spacing for diffop, which makes it look more right. For the more general case, I'd need some help in figuring out what spacing TeX would have wanted. That could be carried through & compared to the std operator dictionary and include the right spacing if it is different.
But this fixes the most egregious case; Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants