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 Unicode Symbols #950
Conversation
This is the third in a series of PRs to give KaTeX the ability to recognize Unicode character input. This one supports some but not all letter-like symbols and some other symbols. All the characters in this PR will produce `textord` atoms in `math` mode. The list is not comprehensive. It’s a bit eclectic. Some of these characters are important. Others were just easy to include. A few important characters are omitted because it wasn’t clear to me which is the best way to implement them. I’ll address those characters in future PRs.
Double-struck characters cannot be done with current fonts by just setting a flag in |
As in PR #933, the following table shows the KaTeX function to which each character is mapped and confirmation whether unicode math and/or John Cook’s conversion page map it the same way.
|
I think that's sensible. I think revising the fonts would introduce other complications as it relates to handling font commands such as |
Let's hold off on this until after PR #973 lands. I'll revise this PR accordingly. |
The most recent commit reverts a RegEx in |
Now that PR #973 has landed, this should be good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
defineMacro("\u2119", "\\mathbb{P}"); | ||
defineMacro("\u211A", "\\mathbb{Q}"); | ||
defineMacro("\u211D", "\\mathbb{R}"); | ||
defineMacro("\u2124", "\\mathbb{Z}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
This is the third in a series of PRs to give KaTeX the ability to recognize Unicode character input. This one supports some but not all letter-like symbols and some other symbols. All the characters in this PR will produce
textord
atoms in math mode.The list is not comprehensive. It’s a bit eclectic. Some of these characters are important. Others were just easy to include. A few important characters are omitted because it wasn’t clear to me which is the best way to implement them. I’ll address those characters in future PRs.