mathjax / MathJax

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

[v4 beta.6] visual regression around (poor use of) \mid #3239

Open pkra opened 4 months ago

pkra commented 4 months ago

This falls under bad authoring and we will probably change the source to \vert but I wanted to let you know that the following had visual changes (for the worse) when upgrading from beta.4 to beta.6. (I'm guessing it's really an SRE issue.)

\begin{equation*} d\big ((t,x,\lambda ),(s,y,\mu )\big )=\mid t-s \mid + \parallel x-y\parallel + d_{M}(\lambda ,\mu ). \end{equation*}
$A=\{x\in \mathbb{R}^2: 1\leqslant \mid x \mid \leqslant 2\}$

beta 4:

image

image

beta 6:

image

image

Edit: updated screenshots.

pkra commented 4 months ago

Sorry, the screenshots were wrong. I've added new ones (using STIX Two) - my "vanilla" v4 setup was failing me just now. I'll try to reproduce it there, too.

dpvc commented 4 months ago

I'm not able to reproduce this with a generic beta.6 using STIX2 fonts. This is what I see:

mjs-mid

This seems in line with your beta.4 images, though mine has the proper spacing between the equal sign and the \left\vert in the displayed equation, which is not the case for yours. I'm wondering if there isn't something else affecting your output?

dpvc commented 4 months ago

Or perhaps the first one was supposed to use \mid rather than \left\vert and \right\vert?

pkra commented 4 months ago

Oh, sorry!! You're of course correct. I had paste the "fixed" example :pensive: no wonder I couldn't reproduce :rofl:

pkra commented 4 months ago

I've edited the top card.

dpvc commented 4 months ago

OK, the spacing between the equal and the \mid is now gone, but I don't get any extra space after the \mid in the first expression, and the second expression didn't change, so still is as in my image above. So I'm still not able to reproduce the problem spacing that you are seeing.

pkra commented 4 months ago

So I'm still not able to reproduce the problem spacing that you are seeing.

Ugh, that's unfortunate. I'm not doing anything new in the AMS setup. But as you know it's somewhat custom, server-side etc. I'll try to build a better test case.

dpvc commented 4 months ago

Perhaps it is browser-specific? Which browser are you using? I tested in Firefox, but will try Chrome.

dpvc commented 4 months ago

Nope, Chrome works for me, too.

pkra commented 4 months ago

I'm seeing this in a nodejs setting. I'll try to get you a MWE tomorrow.