mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.21k stars 1.16k forks source link

[v4 alpha] Overline adds extra space after text #3032

Open bluelightning32 opened 1 year ago

bluelightning32 commented 1 year ago

Issue Summary

In 4.0.0-alpha.1, overline adds extra horizontal space after the text it wraps. This does not happen with 3.2.2. The bug only affects \overline, not \bar.

Steps to Reproduce:

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?

Technical details:

The following is a script to reproduce the issue. The browser console did not have any error messages.

<!DOCTYPE html>
<html>
<head>
<title>Overline Test Page</title>
<!--
<script type="text/javascript" id="MathJax-script" async
  src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
        -->
<script type="text/javascript" id="MathJax-script" async
        src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0-alpha.1/es5/tex-mml-chtml.js">
</script>
</head>
<body>
  <p>Overline over pi: $$f : \overline{\Pi} a : A . B$$</p>

  <p>Bar over pi: $$f : \bar{\Pi} a : A . B$$</p>

  <p>Overline over U: $$A : \overline{\mathcal{U}}(u)$$</p>

  <p>Bar over U: $$A : \bar{\mathcal{U}}(u)$$</p>
</body>
</html>

Output from 4.0.0-alpha-1

image

Output from 3.2.2

image

dpvc commented 1 year ago

This has already been fixed in the develop branch, and will be in the next release of v4. I believe it was mathjax/MathJax-src#846 that did it, but it was a while ago and I don't remember the exact cause.