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

\perp is mapped to the wrong Unicode code point #3322

Open
NSoiffer opened this issue Jan 5, 2025 · 2 comments
Open

\perp is mapped to the wrong Unicode code point #3322

NSoiffer opened this issue Jan 5, 2025 · 2 comments

Comments

@NSoiffer
Copy link

NSoiffer commented Jan 5, 2025

Issue Summary

MathJax maps the TeX macro \perp to the Unicode char U+22A5 which Unicode defines as "UP TACK {base, bottom}". It should be mapped to U+27C2 which Unicode defines as "PERPENDICULAR {orthogonal to}". Although they look similar, they are slightly different.

Beside the potential subtle difference in rendering, the bad mapping means that screen readers will say the wrong thing for \perp unless they (wrongly) map U+22A5 to "perpendicular". If they do that, then they won't speak "up tack" or "bottom" when they should.

Steps to Reproduce:

The bad mapping is in the code in several places. If you want to check the output, you can

  1. open https://mathjax.github.io/MathJax-demos-web/input-tex2chtml.html
  2. Enter x \perp y
  3. Right click in the rendered result and choose "Show Math As: MathML Code"

Technical details:

  • MathJax Version: in master branch and v4.0-beta
@dpvc
Copy link
Member

dpvc commented Jan 15, 2025

This goes way back to version 1, and is due to the fact that the original MathJax fonts didn't include a glyph for U+27C2, and to the fact that I didn't know Unicode very well at that time, and that MathJax had not yet become involved in assistive technology.

It should probably be changed for v4.

@NSoiffer
Copy link
Author

That seems to be the case for many other translators including KaTeX and pandoc. I think everyone started with a similar mapping. I filed bug reports with them also.

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

No branches or pull requests

2 participants