mathjax / MathJax

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

Version 3 anomaly in \begin{cases}...\end{cases} #2186

Closed cebola2 closed 4 years ago

cebola2 commented 5 years ago

A cases structure like [ g(x,y)=\begin{cases}1,& \text{ se } x\in\mathbb{Q} \text{ ou } y\in\mathbb{Q}, \ 0, & \text{ caso contrário.}\end{cases}] is typeset anomalously in MathJax v. 3.0.0.

I have adapted https://cdi2tp.math.tecnico.ulisboa.pt/ (version 2.7) to MathJax version 3.0.0 at https:logrus.math.tecnico.ulisboa.pt/ The example comes from

https://cdi2tp.math.tecnico.ulisboa.pt/texto/3 https://logrus.math.tecnico.ulisboa.pt/texto/3

Screenshots: Version 2.7 under Firefox 69 Linux Screenshot_2019-09-05 CDI II — TP — Página 3

Version 3.0.0 under Firefox 69 Linux Screenshot_2019-09-05 CDI II — TP — Página 3(1)

Version 3.0.0 under Firefox 68.1 Android Screenshot_20190905-201620

zorkow commented 5 years ago

I can verify the problem. But only for Firefox/CHTML on Linux. Looks fine in Chrome as well as with SVG renderer on Firefox. Same for Android: Looks good for Chrome/Kiwi/DuckDuckGo with either renderer, Firefox with SVG but not for Firefox with CHTML.

cebola2 commented 5 years ago

I have also noticed in the same example (Firefox or Chrome on Linux) that mtextInheritFont: true seems to be ignored.

cebola2 commented 5 years ago

On MS Edge on Windows (but not on Android) you get something alike what you get on Firefox (Linux or Windows).

dpvc commented 5 years ago

OK, this turns out to have been due to an extra .5ex offset that is part of CSS vertical-align: middle that I didn't take into account. I've made a PR to compensate for it.