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 #2576

Closed
NSoiffer opened this issue Jan 5, 2025 · 0 comments
Closed

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

NSoiffer opened this issue Jan 5, 2025 · 0 comments
Assignees
Labels

Comments

@NSoiffer
Copy link
Collaborator

NSoiffer commented Jan 5, 2025

Description

mathlive 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.

The wrong mapping is in src\latex-commands\symbols.ts:

    ['\\perp', 0x22a5],

Steps to Reproduce

  1. Open https://cortexjs.io/mathlive/demo/
  2. Type x \perp y
  3. Select
  4. Right click and choose Copy:MathML

Actual Behavior

The copied expr is <mo>⊥</mo>. The symbol is U+22A5.

Expected Behavior

It should be U+27C2.

Environment

MathLive version MathLive version 0.103.0

Is this a regression: did it use to work in a previous version?

I suspect it has always been this way.

Operating System Windows 10

Browser Firefox

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

No branches or pull requests

2 participants