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

Already on GitHub? Sign in to your account

Issues with amsmath-testmath.tex #155

phst opened this Issue Oct 5, 2010 · 9 comments


None yet
2 participants

phst commented Oct 5, 2010

Here are the issues I've found so far. Some of them could be font- or engine-related.


  • The hats are too wide. The fifth hat in eq. 2 bumps into the superscript
  • The distance between summation signs and their limits is quite small
  • The scaled parentheses in eq. 23 look a bit too small. Maybe decrease \delimitershortfall for Cambria?
  • directly above Lemma 6.1: distance between \lim and limit is very small
  • eq. 46: \iiiint is in text style, space around dots in \idotsint is too wide
  • subsection 9.2 (over and under arrows): everything is completely wrong except \underleftrightarrow
  • subsection 9.4: double accents are not skewed
  • subsection 9.9, sideset: the stars seem to be a but shifted in the upward direction, the prime is quite small
  • eq. 67: the tildes are too wide
  • pdffonts says that CMSY is embedded, this means that there is at least one symbol missing from unicode-math-table.tex


  • Integrals never appear in \displaystyle
  • wrong placement for the \not slash (e.g. eq. 8), should use the appropriate Unicode characters anyway
  • the \hat on the C's in sec. 7 is too far left
  • the double accents in sec. 9.4. are all wrong, also the simple accents are unacceptable (but the multidots in 9.5. look fine?!)
  • \sideset{}{'}\sum in sec. 9.9 doesn't work
  • the subscript of y'_k in 9.10 is too far right (probably the prime code has a bug)

I think the accents and integrals should be given top priority, currently LuaLaTeX + unicode-math + Cambria Math is pretty much unusable because of them.


phst commented Nov 7, 2010

The integral issue is in fact solved by setting \luatexUmathoperatorsize\displaystyle to the correct value. The only remaining problem is how to find out the correct value ;-)
probably this setting has to be done on every font size change.


khaledhosny commented Nov 9, 2010

This is a bug in Cambria (Asana has similar bug but that is fixed now), Hans patches the font internally in ConTeXt, so I think luaotfload would need to provide such a mechanism (also for the top_accent bug in newer Cambria versions).


khaledhosny commented Nov 9, 2010

The \not issue would be solved by a new primitive (\Umathoverlay?) for overlay character like the negation slash (Unicode have few other similar characters) that are placed similar to accents but need not be moved vertically, see http://tracker.luatex.org/view.php?id=233


phst commented Nov 9, 2010

Cambria Math is the reference implementation, so by definition it cannot contain any bugs ;-)
We don't have the current OTF Math specification, so we don't know how to deal with Cambria Math yet. We should not try to fix something that is probably no bug.


khaledhosny commented Nov 9, 2010

It is a bug as far as our current implementations are concerned, unless there is a new specification that states otherwise.


phst commented Nov 9, 2010

Concerning the \not issue: Actually either unicode-math or the engine should be smart enough to use precomposed characters if available. The amsmath document, for example, has many instances of \not= and \not\in.


khaledhosny commented Nov 11, 2010

It shouldn't be done by the engine, it would be very inflexible. Unicode-math should instead try to use pre-composed negated forms when possible, but it should be configurable (in case the font does not have all the symbols, for example). Also one might want to use overlay bar | for negation, so the generalised support for overlay accent at the engine is still needed.


khaledhosny commented Apr 25, 2012

Regarding XeTeX issues:

  • fixed in the engine
  • font issue, it is rendered exactly the same in Word
  • here \overwithdelims() is used not \left(…\right) and the corresponding math constants (delim1 and delim2) do not exist in OT math spec.
  • font issue, just like \sum
  • \iiiint is a font issue (no display glyph), \idotsint is an engine issue (applying italic correction when it shouldn’t)
  • fixed now but Cambria lacks under arrows (a missing glyph box is shown), and there is now \underleftrightarrow in Unicode (so amsmath’s macro solution is still used)
  • this is because amsmath’s redefinition of the accents is overloaded, opened #239 for it
  • you get the same without unicode-math or Cambria, nothing new, the size of the prime is font related
  • fixed in the engine
  • CMSY is used for AmS logo, no other symbol is taken from it

Regarding LuaTeX issues:

  • we patch Cambria on the fly to fix the wrong math constant now (XeTeX does some sanity check here, this why the issue never showed there)
  • fixed now
  • look OK here
  • the same as XeTeX
  • works here
  • looks OK here

With no issues left here, I'm closing this now. If there are any other issues remaining, I think filing them individually would be better.

khaledhosny added a commit that referenced this issue May 18, 2012

Use XITS fonts
Doesn’t have many of font specific issues in #155.

khaledhosny commented May 18, 2012

Regarding \underleftrightarrow, it actually exits in Unicode as U+034D, so I added it in 121b329, though font support is lacking (I just added it to XITS).

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