GithubHelp home page GithubHelp logo

Comments (4)

dpvc avatar dpvc commented on June 2, 2024

I'm not able to reproduce the result. It looks like there may be a minimum font size that is preventing MathJax from reducing the exponents to their proper size. It might be that that is a language-specific setting. There are old reports of Chrome enforcing a minimum font size for some languages (including Chinese). See here and here. It might be that that is what is causing your issue.

Try checking the custom font preferences and see if there is a minimum value set there when you are viewing a page in the zh language setting.

You might also try putting

<div lang="en">...</div>

around the math delimiters for one of your examples and see if that helps.

from mathjax-demos-node.

joshua7v avatar joshua7v commented on June 2, 2024

@dpvc thanks for looking into it

I confirmed this can be reproduced by installing a new windows os inside VirtualBox before posting the issue.
my steps are:

  1. install English version of windows
  2. install chrome
  3. add Chinese support in the region setting
  4. toggle language preference in chrome setting to see the change
  5. use the newly installed windows to load the existing site rendered by mathjax node

You sort of demystified the issue for me, I can confirm it is caused by chrome's minimum font setting for Chinese.
By checking the value of minimum font, Chinese is 12px, English is 0.
If I reduce the minimum font setting, the problem disappears.

However, it is not possible to change chrome settings for my users.
Also the lang="en" trick seems no luck.

Ok, looks it's not easy to walk around this.
But surely it is better than knowing nothing.
thanks.

from mathjax-demos-node.

dpvc avatar dpvc commented on June 2, 2024

I can confirm it is caused by chrome's minimum font setting for Chinese.

Thanks for the updated information. As you point out, there is nothing MathJax can do about that setting. A potential future possibility is to have a font with smaller characters, rather than using a scaled version of the main fonts. There are several other reasons this would be valuable, as well, but the drawback is the need for additional fonts to be downloaded (or larger fonts, if all the characters are in the same font). It is something to consider for the future, however.

But surely it is better than knowing nothing.

Agreed, and you could include a note for Chrome users on the page so that they can at least be made aware of the situation and its solution.

from mathjax-demos-node.

dpvc avatar dpvc commented on June 2, 2024

An alternative that you might consider is the use of SVG output rather than CHTML output. Since that uses paths (at least for the characters in the MathJax fonts), that should not fall prey to the minimum font size issue.

from mathjax-demos-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.