mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 15:08:39 +00:00
Unicode accents (#992)
* Unicode accents * Lexer now looks for combining dicritical marks and adds them to the same character * Parser's `parseSymbol` now recognizes both combined and uncombined forms of Unicode accents, and builds accent objects just like the accent functions * Added CJK support to math mode (not just text mode) * Add invalid combining character test * Add MathML test * Add weak support for other Latin-1 characters This maintains backwards compatibility, but it uses the wrong font. There's a TODO to fix this later. Also refactor symbol code to use for..of * Update Unicode screenshot * Remove dot from accented i and j (in math mode) Also add dotless Unicode characters to support some accented i's and j's * Fix \imath, \jmath, \pounds, and more tests * Switch from for..of to .split().forEach() Save around 800 bytes in minified code * Fix split * normalize() detection * Convert back to vanilla for loops * Fix merge * Move normalize dependency to unicodeMake.js * Make unicodeSymbols into a lookup table instead of macros This is important for multi-accented characters. * Add comments about when to run * Move symbols definition into unicodeMake/Symbols.js * Remove CJK support in text mode * Add missing semicolon * Refactor unicodeAccents to its own file * Dotless i/j support in text mode * Remove excess character mappings * Fix Åå in math mode (still via Times) * Update to support #1030 * Add accented Greek letter support (for supported Greek symbols) * Update screenshot * remove Æ, æ, Ø, ø, and ß from math mode test
This commit is contained in:
committed by
Kevin Barabash
parent
d822f04b9b
commit
484d44ee70
@@ -1,5 +1,62 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`A MathML builder accents turn into <mover accent="true"> in MathML 1`] = `
|
||||
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mover accent="true">
|
||||
<mi>
|
||||
u
|
||||
</mi>
|
||||
<mo>
|
||||
¨
|
||||
</mo>
|
||||
</mover>
|
||||
<mi>
|
||||
b
|
||||
</mi>
|
||||
<mi>
|
||||
e
|
||||
</mi>
|
||||
<mi>
|
||||
r
|
||||
</mi>
|
||||
<mi>
|
||||
f
|
||||
</mi>
|
||||
<mi>
|
||||
i
|
||||
</mi>
|
||||
<mi>
|
||||
a
|
||||
</mi>
|
||||
<mi>
|
||||
n
|
||||
</mi>
|
||||
<mi>
|
||||
c
|
||||
</mi>
|
||||
<mover accent="true">
|
||||
<mi>
|
||||
e
|
||||
</mi>
|
||||
<mo>
|
||||
´
|
||||
</mo>
|
||||
</mover>
|
||||
<mi>
|
||||
e
|
||||
</mi>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
über fiancée
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder should generate <mphantom> nodes for \\phantom 1`] = `
|
||||
|
||||
<math>
|
||||
|
Reference in New Issue
Block a user