Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical alignment issues on Webkit based browsers #3325

Open
ajinkya-k opened this issue Jan 22, 2025 · 3 comments
Open

Vertical alignment issues on Webkit based browsers #3325

ajinkya-k opened this issue Jan 22, 2025 · 3 comments

Comments

@ajinkya-k
Copy link

The vertical alignment of characters in math formula on webkit browsers is messed up. See examples below:

I noticed that the math rendering in the MathJax on webkit based browsers is inconsistent. Here is an example of the in section B2.4 of an online book, where the vertical alignment of the characters is really off. See the Var and AΣA' rendered in safari on macos:
Image

This also happens in Orion -- another Webkit based browser which makes me think its an issue upstream especially because these issues don't seem to happen in Firefox on macos (which does not use webkit):

Firefox:
Image

This issue occurs on all webkit based browsers i checked:

  • Safari on MacOS
  • Orion on MacOS
  • Safari on iOS
  • Chrome on iOS (which uses WebKit)
@dpvc
Copy link
Member

dpvc commented Feb 3, 2025

This is a duplicate of several other issues. See, for example, #2866. This is a WebKit bug, and one that MathJAx can't do much about. In v4, the situation for multi-character identifiers (like your Var) is improved, but that doesn't take care of all the situations that are affected. Switching to SVG may be the best option for WebKit users.

@ajinkya-k
Copy link
Author

ajinkya-k commented Feb 3, 2025

thanks! I run into this when using quarto and I dont know much about javascript so IDK how I can setup my html/css/js to render svg instead of mathjax based on browser engine. Can you point me to some resources?

@dpvc
Copy link
Member

dpvc commented Feb 3, 2025

I don't know anything about quarto, but a quick google search suggests that including

format:
   html-math-method:
     method: mathjax
     url: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"

in your _quatro.yaml file might do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants