* unicodeTextInMathMode setting
* When `unicodeTextInMathMode` is `true`, accented letters from
`unicodeSymbols.js`, and CJK and other supported languages,
get added support in math mode (as requested in #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.
* Fix handling of Unicode characters ð, Å, å
* Fix double handling of ð (math maps to \eth, not special Unicode character)
* Remove Åå special math handling, thanks to #1125
* Forbid extraLatin when unicodeTextInMathMode is false
* 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
* 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
This PR implements `\mathchoice` function.
I once created PR on the wrong branch. Sorry for the mess.
This is particularly useful when one defines custom macro for "big operators".
For example:
```latex
\newcommand{\infdisj}{%
\mathop{%
\mathchoice{% display
\bigvee\hspace{-2ex}\bigvee%
}{ % inline
\bigvee\hspace{-1.75ex}\bigvee%
}{ % script
\bigvee\hspace{-1.4ex}\bigvee%
}{ % scriptscript
\bigvee\hspace{-1ex}\bigvee%
}}}
```
* Support \colorbox and \\fcolorbox
These are functions from the `color` package. They accept text, not math. They also have padding similar to `\fbox`.
Because of the padding, the code in `buildHTML` is intermixed with the `\fbox` code. I have not (yet) created a new file in the functions folder. This way, the reviewer gets a cleaner diff.
* Fix lint error
* colorbox screenshots
* Pick up review comments
* To @flow: fontMetrics, fontMetricsData, Options, Settings, Style
* Don't overuse $Shape, improve type checking for fontMetrics*, make maxSize required in OptionsData and update callers.
* Remove eslintrc globals change, since eslint-plugin-flowtype makes it redundant.
* Remove extra ?s in Options and Settings
* Undo removal of width in fontMetrics and switch to `T | void` for nullable types in Options
* fix typing of FontMetrics
Summary: (@kevinbarabash)
This diff extracts MathML builder tests out into a separate file and
updates them to use jest snapshot testing. It updates the output of
prime ' from using identifier nodes <mi> to operator nodes <mo>. It
also updates large operators with limits to use munderover instead
of msupsub. I added an option to remove unnecessary mrows to buildGroup.
Right now it's only used for by groupTypes.supsub. I'll see if it can be used
elsewhere (everywhere?) in a follow up PR.
Test Plan:
- make test w/o errors
- verify mathml snapshots contain the desired markup