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

| and \| fail as vertically extendable delimiters #2682

Closed cebola2 closed 3 years ago

cebola2 commented 3 years ago

Issue Summary

| and \| fail as vertically extendable delimiters. Try

\[\left|\int_a^b f\right|\]

Steps to Reproduce:

  1. Include with MathJax 3.1.4 \[\left|\int_a^b f\right|\]
  2. Include with MathJax 3.1.4 \[\left\|\int_a^b f\right\|\]

Vertically extended absolute value and norm symbols should appear.

Technical details:

Supporting information:

dpvc commented 3 years ago

The test page you cite works for me (Firefox 88.0, Mac OS X):

mj

Have you tried clearing your browser cache and restarting the browser? The update to 3.1.4 was fairly recent, and it may be that you have cached versions of some of the older pieces.

cebola2 commented 3 years ago

Clearing the cache did not help. But I fail to see it on Windows (several browsers), Firefox on Android and changing from CHTML to SVG.

dpvc commented 3 years ago

If you switch to 3.1.2 (cdn.jsdelivr.net/npm/mathjax@3.1.2/es5/tex-chmlt.js) does it work for you?

cebola2 commented 3 years ago

Neither!

dpvc commented 3 years ago

OK, do you have any plugins or anything extra in your copy of Firefox? (And can you try turning off all plugins?)

Does it work for you in Chrome on you Linux Mint?

Does it work for you if you enter those expressions in the demo on the MathJax website?

Do other delimiters, like parentheses and braces work for you?

I'm kind of out of ideas.

cebola2 commented 3 years ago

This turns out to be a very weird anomaly. It was reported by a student and I was immediately able to reproduce it, but that was just a coincidence. I have not been able to reproduce it unless on my laptop, with Linux Mint 20.1, Firefox 88.0, using CHTML and very specific page Zoom levels (100%, 30%; at the 67% zoom level only one vertical line per symbol is seen). This happens on the same laptop with other accounts, provided the same browser is used, independently of screen resolution, at the same Zoom levels. Going to the official MathJax site test page I am able to reproduce it but at different Zoom levels (not 100%). My temporary conclusion is this has to do on how Firefox draws thin vertical lines on the page but is dependent on many factors.

cebola2 commented 3 years ago

No problem with MathJax 2. A test page using MathJax 2 is https://cdi2tp.math.tecnico.ulisboa.pt/test_1.php

physics-HTFI commented 3 years ago

I seem to have the same problem. When I enter $$\dfrac{1}{\left\| x' \right\|}$$ on https://www.mathjax.org/#demo, the text is rendered as: image and subsequently after I click "Render HTML" button, it becomes: image On the other hand, with LaTeX: image Reproducible on Microsoft Edge 90.0 and Firefox 88.0.

dpvc commented 3 years ago

@physics-HTFI, this is actually a different problem, introduced by a change in how delimiters are handled. I will submit a PR to fix it.

cebola2 commented 3 years ago

Finally got rid of this anomaly with a new Firefox on Linux Mint version (88.0.1) and a new attempt at cache cleaning.