Extra spacing when displaying mover with bar

19 views
Skip to first unread message

Oleg Putilin

unread,
Mar 6, 2024, 2:22:45 AMMar 6
to MathJax Users
When rendering bellow expression the bar appears too high over the letter.

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mover accent="true">
    <mrow>
      <mi>A</mi>
    </mrow>
    <mo>̅</mo>
  </mover>
</math>

The expected output is shown below. 
https://www.screencast.com/t/jOL3gvoj

Is this an issue with MathJax?

Thank you,
Oleg

Davide Cervone

unread,
Mar 6, 2024, 10:33:40 AMMar 6
to mathja...@googlegroups.com
The MathJax TeX fonts used in v3 have a limited glyph coverage, and it turns out that U+0305, the character you are using for the overlain, is not in the MathJax fonts.  That means, among other things, that it doesn't have any metric information about that character, so it doesn't know how to place it properly.

One solution is to use a different overlain character, like U+00AF.  Since that character is starchy by default, you may want to use stretchy="false", as in

  <mover accent="true">
    <mrow>
      <mi>A</mi>
    </mrow>
    <mo stretchy="false">&#xAF;</mo>
  </mover>
</math>

The fonts used by MathJax v4 (now in beta release) have a wider coverage, and include U+0305, so another alternative is to switch to v4, if you are in control over the page that you are using and its MathJax version.

Davide



--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/55192225-68fe-41e1-9b68-7431d3880512n%40googlegroups.com.

Oleg Putilin

unread,
Mar 6, 2024, 6:18:56 PMMar 6
to MathJax Users
Thank you Davide!

Using  &#xAF; code addresses the issue, so we have a solution.
Will also try the v4.

Thanks again for your help!
🤝
Reply all
Reply to author
Forward
0 new messages