Update `test/screenshotter/test.tex`'s definition of `\KaTeX` macro to match
the metrics of `src/macros.js`'s definition of `\KaTeX`, and thereby fix#1703.
I just changed the `\kern` metrics to match the update from #974, and left
the font selection code to match LaTeX's definition of `\LaTeX`.
* Remove double encoding in MathML via Unicode MathML spaces
We used to have a complex mechanic for escaping strings, marking them as
`needsEscape = false`, and then not escaping those strings (for
combining strings in `\operatorname`). But this doesn't really work
with `render`ing directly to a node, as `document.createTextNode` can't
be stopped from escaping.
I've thus removed this mechanic, which required the following changes:
* Switch MathML "smart space" encoding to use Unicode instead of
`&LongNames;` (which weren't working with `render` for the same reason).
* Hack our HTML/MathML serializer to not use `String.trim`, which wrecks
havoc with emitted Unicode spaces.
Now `toText()` doesn't escape, so strings concatenate in unescaped form,
and `toHTML()` only does the necessary escaping. Thus fix#1782.
* Fix src/utils.js
Co-Authored-By: edemaine <edemaine@mit.edu>
* Fix src/mathMLTree.js documentation
Co-Authored-By: edemaine <edemaine@mit.edu>
* Remove trim hack thanks to diffable-html@4.0.0
* Switch back to jest-serializer-html
* Update mathMLTree.js
* Fix \\ and \newline after operator
Fix#1790. `\\` and `\newline` render as a span with classes
`mspace` and `newline`. We need to check for `newline` when bringing
spaces into the same `base` group.
* Add tests and comment
* Add optional pre-process callback to the auto-renderer.
* Rewrite `preProcess` callback signature.
* Add test.
* Make test future-proof.
* Add root folder to the node module paths.
* Include only necessary fonts for target environment specified by Browserslist
Allow WOFF and WOFF2 to be controlled using environment variables
* Fix links
* Fix merge error
* Update dependencies
* Replace uglifyjs-webpack-plugin with terser-webpack-plugin
* Do not set `targets` if !isESMBuild
* Remove redundant consumeSpaces()
- Spaces after command sequence are ignored in Lexer
- parseExpression consumes spaces in the math mode
* Add catcode to Lexer, move comment parsing back to Lexer
- Fix parsing a comment before a sup/subscript argument
- Fix parsing a comment before an expression
- Fix parsing a comment before or between \hline
- Fix parsing a comment in the macro definition
- Fix parsing a comment including a command sequence
* Update Lexer.js
* Update Parser.js
* catcode -> catcodes
* Create separate entry point of copy-tex for webpack
* Update katex.webpack.js comment
* Generate ECMAScript for contrib
* Update dependencies
* Comment out documentations
* Allow screenshotter on IE, Edge, and Safari
* Set Firefox options only on Firefox
* Add --selenium-capabilities option to support setting capabilities
* Quit web driver after test finishes
* Upgrade to style-loader 0.22.1 for IE compatability
* Add support for `\lparen` and `\rparen` delimiters.
* Add missing math delimiter. Fix alphabetic order.
* Add test.
* Add spaces between parenthesis and square brackets.