Conversation
* When `unicodeTextInMathMode` is `true`, accented letters from `unicodeSymbols.js`, and CJK and other supported languages, get added support in math mode (as requested in KaTeX#895). * When `unicodeTextInMathMode` is `false, all of these stop working in math mode, and are only supported in text mode (matching XeTeX behavior). Note that this is a backwards incompatibility with some 0.9.0 alpha/betas.
|
@edemaine I thought that unicode chars currently don't work in math mode. |
|
https://github.com/Khan/KaTeX/blob/4a87f38e1a9f74883723a0aebce2fb91f1464863/src/symbols.js#L722-L736 |
|
@kevinbarabash @ylemkimon Hmm, probably not... Really, they shouldn't be supported at all right now, because they're not in the fonts. But maybe we can try to predict the future where they are in the fonts.
|
|
@edemaine got it. I forgot whether we had already made that change or not. I guess not. |
|
I think |
|
I want to get #1143 into to 0.9.0 final first. Then we can start 0.10.0-alpha with this. |
|
@kevinbarabash That's fine, though personally I'd lean toward reducing the number of backward-incompatible changes (with non-alpha/beta changes). I'll revise this PR today for consideration, but also fine to wait on it. Personally I actually prefer the current KaTeX behavior of "just working" with Unicode. It's a shame that LaTeX can't do that without a lot of work. Maybe the default |
* Fix double handling of ð (math maps to \eth, not special Unicode character) * Remove Åå special math handling, thanks to KaTeX#1125
|
I removed the special handling of I also realized (thanks to some additional tests) that ð was being handled twice -- once in the I think the commit for the above changes should be merged before 0.9.0 final, if possible, as they are bug fixes. I can split this into a separate PR if you prefer. This PR is also ready to go. It now checks for |
Codecov Report
@@ Coverage Diff @@
## master #1117 +/- ##
=========================================
- Coverage 79.61% 79.6% -0.02%
=========================================
Files 59 59
Lines 3876 3879 +3
Branches 652 653 +1
=========================================
+ Hits 3086 3088 +2
- Misses 656 657 +1
Partials 134 134
Continue to review full report at Codecov.
|
Splitting it out in a separate PR would be the easiest b/c of the other breaking changes in this diff. |
|
@edemaine love the "next version" tag. ^_^ |
|
I've release v0.9.0 so we'll be able to merge this after review. |
k4b7
left a comment
There was a problem hiding this comment.
LGTM I'm sure lots of people will be excited for this new setting.
Fixes #1046
unicodeTextInMathModeistrue, accented letters fromunicodeSymbols.js, and CJK and other supported languages,get added support in math mode (as requested in "KaTeX parse error: Expected 'EOF', got '<bla>' at position 1" when input pure Chinese character(s) #895).
unicodeTextInMathModeisfalse, all of these stop working inmath mode, and are only supported in text mode (matching XeTeX behavior).
Note that this is a backwards incompatibility with some 0.9.0 alpha/betas, but it brings us back into alignment with LaTeX/XeTeX, so seems worth doing (?).
I'm open to better/shorter names for the option name, or for an argument why the default should be true instead of false (more permissive?).