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

Support typing Unicode for all symbols #273

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Support typing Unicode for all symbols #273

merged 2 commits into from
Feb 27, 2024

Conversation

jared-hughes
Copy link

@jared-hughes jared-hughes commented Feb 27, 2024

E.g. you can type/paste "θ" and get "\theta" instead of the raw unicode θ. Inside Desmos, this means you can paste r=\sin\left(θ\right) and get a valid equation instead of "Sorry I don't understand the 'θ' symbol."

There was already some support for this, e.g. , π, , but it was missing for all Greek letters and many advanced symbols. My plan was to just do the Greek letters, but I got carried away.

For each added unicode support, I verified:

  • (by grep) The unicode appears only once in the source (e.g. LatexCmds['∇'] only appears once)
    • This ensures that there's no advancedSymbols definition overwriting a basicSymbols definition.
  • (by pasting into a mathquill field) The mathquill glyph for the corresponding command roughly matches my local glyph (from font Julia Mono) when the unicode is pasted into a mathquill field
    • this ensures I didn't accidentally swap a ⊆ and ⊇

Future PR, if we care:

  • \parallel, \nparallel, and \perp are in both advancedSymbols and basicSymbols
  • advancedSymbols has \bigtriangledown but not \triangledown.

Excluding those that duplicate, like → for both \rightarrow and \longrightarrow. It's only enabled for the non-long version. Likewise, ⊙ is enabled for \odot but not \bigodot
@jared-hughes jared-hughes merged commit b47f030 into main Feb 27, 2024
4 checks passed
@jared-hughes jared-hughes deleted the unicode-symbols branch February 27, 2024 20:33
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

Successfully merging this pull request may close these issues.

2 participants