* Add support for \aa, \AA, \lq, \rq, \lbrack, \rbrack
The lack of \aa and \AA was reported in #1066. Added these
via simple macros, with supporting tests. Also add \lq, \rq,
\lbrack, \rbrack as aliases for "`", "'", "[", "]" which were
in the same area of latex.ltx.
* removed duplicate comment
This patch just makes KaTeX recognize Unicode codepoints in the
range \u0900-\u109f so that those South and Southeast Asian scripts
do not get automatically rejected.
The patch also generalizes the way that Unicode blocks are handled
to make it easier to add support for new scripts in the future.
src/unicodeRegexes.js is replaced with the new file src/unicodeScripts.js
This is an attempt to flesh out the required <head> tags needed to make a full
working example of autorender, including KaTeX itself, to help people get
started with KaTeX.
* Update testing infrastructure NPM packages
Travis is currently failing all tests. This should fix it,
as documented in https://github.com/eslint/eslint/issues/9767
* Add package-lock.json
* 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
* Fix frac lline
For frac-line, use an SVG line in an extra tall span.
I still need to think of a way to adust `vertical-separator`.
* Fix spaces in katex.less
* regenerate screenshots
* update HorizontalBraces and StrikeThrough screenshots
* Make accents zero width
Make the width of an accented character equal to the width of the character,
by making accents zero width. In particular, fixes#1028 (`\ddot\imath`).
This involved reworking all of the accent offset machinery, in particular
skew and accent-hungarian. A bit cleaner now.
Also added support for the new width character metrics in symbolNode.
* Update AccentsText test
* Fix comment
* Implement \TextOrMath, \@secondoftwo
* Parser now tells MacroExpander about mode switching. (This seems preferable
to a circular reference between Parser and MacroExpander.)
* Implement \TextOrMath
* Improve when we switch modes so that this actually works,
in all cases except single-symbol arguments.
* Add \@secondoftwo to match \@firstoftwo.
* Add comments documenting all the conditional macros
* Define type for switchMode
* Fix mode detection for ligatures
* Switch mode before the call to parseSymbol() in parseGroup
This fixes the Colorbox screenshot test.
* Adding support for SansSerif-Bold
* Updating to include SansSerif Italic.
* WIP
* Working text stacking
* More robust screenshot.
* Don't want to break users :)
* Updating per PR comments.
* Fixing Unicode and updating snapshots.
* Adding suggested tests.
* Opting to use old method for unit testing.
* Adding TODO
* added support for \boldsymbol
* added \boldsymbol tests
* added \boldsymbol screenshots
* added \bm, snapshot, updated screenshots
* updated snapshot for \boldsymbol
* properly display \imath and 2 in boldsymbol
* implemented \boldsymbol for +
* fix typo, remove boldsymbolLetters hardcode
* make comment about using Main-Bold more general
* fixed trailing space CI error
* Support Unicode middle dot
This PR adds support for Unicode characters U+00B7 MIDDLE DOT and U+22C5 DOT OPERATOR.
* Use escapes for tests. Edit macro comment.
* Refactor \kern, proper \mkern support, add \hskip
* Move \kern, \mkern into functions directory
* Add \hskip, \mskip support (but without supporting plus/minus)
* Properly separate \kern, \hskip from \mkern, \mskip.
(The former work in both modes, and don't support mu units.
The latter work only in math mode and only support mu units.)
* Render \kern etc. using MathML <mspace>
* Implement \TeX macro
* Implement \LaTeX
* New KaTeX logo \katex
* Rename hskip.js -> kern.js
* Tweak katex \kern to 0.16em
* \katex kern -.17em
* Compute A raise height in \LaTeX and \katex
* Switch mu unit errors to warnings
* LaTeX screenshot test
* Replace \KaTeX with macro definition
* Update screenshots with \KaTeX in them
* Fix font selection for \*TeX macros
This is a workaround for #836 for the command case of using \bmod,
without changing any spacing (and making the code and generated output
slightly more efficient). In particular, fix#982.
* \hspace*, \@ifstar, \@ifnextchar, \@firstoftwo
* Support both \hspace and \hspace* (still aliasing to \kern)
using new \@ifstar
* \@ifstar is a macro using new \@ifnextchar and \@firstoftwo
(same definition as LaTeX)
* \@firstoftwo and \@ifnextchar use available MacroParser features
to act as they do in LaTeX.
* Also new method pushTokens (which I almost used but didn't end up),
and moved pushToken next to it and popToken.
* Fix flow errors; generalize MacroDefinition
* Add tests for macros