* Remove CircleCI and codecov
* Add GitHub Actions workflow
* Add Browserstack credentials
* Skip tests if ci skip or skip ci is in commit messages
* Update and rename test.yml to ci.yml
* Postfix artifacts name with browser
* Disable proxy on chrome
* Update dockers/screenshotter/screenshotter.js
* Add status badge
* Set directory option in codecov action
* Run Browserstack on forked repo via label
* Print Docker logs
* Disable GPU on ChromeDriver
* Add comments
* Add comments
* Add link to Discussions in issue template chooser
* Add link to discussion to website footer
* Add Discussions badge to README
* Add link to discussion to CONTRIBUTING.md
* Wrap `katex.render` examples with try...catch
* Add starter template with defer in README.md
* Update documentation to use `defer` and `onload`
* Add documentation on async and pre loading KaTeX
* Use sha384 for SRI
* Revise wording according to comments
* Minor changes
* Fix article
* Fix KaTeX logo
* Add npm badge
* Change CircleCI badge
* Remove redundant links
* Remove unnecessary details
* Add a link to auto-render extension
* Add a link to the list of supported commands
* Add a section about auto-render extension
* Update README.md
* website/docs: initial commit
* Change secondaryColor
* Fix index.css not being copied and included on global stylesheet
* Fix stylesheet link
[skip ci]
* Change documentation link to API(Usage)
[skip ci]
* Add `Libraries` in usage
[skip ci]
* Remove documentation from `README.md` and add link to the site
[skip ci]
* Use KaTeX in the parent directory to build Markdown
[skip ci]
* Revise function support page. Avoid error msgs.
* General edit to function support page
* Do not compile contrib when running screenshotter
* Add test job to CircleCI
* Update config.yml
* Fail if PR exists but running on the forked repo
* Update Screenshotter README.md
* Store artifact at the root
* Add CircleCI badge
* Add `codecov` to CircleCI
* Change build directory to `dist`
* Nested environments of macro definitions
* Rename environment -> namespace
* \def support
* Clean up \df@tag at beginning
* \global\def support
* Fix \global via new setMacro helper
* Fix caching behavior and build array on top of it
Also avoid double lookup of macros
* Add tests
* Add argument tests
* Remove global pointer
* Note about macros object being modified
* add __defineMacro
* Add \global\def test
* More \global tests
* Constant-time lookup
Rewrite to use an "undo" stack similar to TeX, so get and set are
constant-time operations. get() still has to check two objects: one with all
current settings, and then the built-ins. Local set() sets the current value
and (when appropriate) adds an undo operation to the undo stack. Global set()
still takes time linear in the number of groups, possibly changing the undo
operation at every level.
`Namespace` now refers to a space of things like macros or lengths.
* Add \def to-dos
* Put optional arguments in their own group
* Rename `pushNamespace` -> `beginGroup`
* Wrap each expression in a group namespace
* Add comments
* Tag sketch
* Drop objectAssign; already using Object.assign elsewhere
* Basic \gdef support
* Bug fix
* Finish \tag
* MathML numbers equations with <mlabeledtr>
* Fix flow bugs
* \gdef tests
* Add basic \tag tests
* Screenshot test for \tag
* \tag* test
* Add missing file
* Bug fix screenshot
* Major refactor
* Represent tag at top level of parse tree, requiring less hackery
* No more \@tag function; it was essentially just doing \text
* Wrap tag in group so e.g. ( and ) are formatted the same
* Add `feed` method to MacroExpander for multiple inputs (for tag)
* Bug fixes in buildHTML, makeTextRow, _getBuilt (for display mode)
* Remove excess <mrow> wrapper when unnecessary
* Update screenshot from tag being wrapped in group
* Add maxExpand limit
Change symbol parsing to allow all Unicode symbols when the appropriate strict setting allows it. By default, this allows all symbols, but the user will get (probably two) warnings about them.
* Strict setting controls \newline display-mode behavior
* Bug-fix space handling in macros
Whitespace after a \controlWord is now handled within the lexer, not by the
MacroExpander. This way, \\ expanding to \newline doesn't accidentally
cause spaces to get consumed.
* Rename nonstrict -> reportNonstrict; strictBehavior -> useStrictBehavior
* Second category of errorCodes
* Implement strict mode (replacing unicodeTextInMathMode)
Add new "strict" setting (default value false) that can take a boolean
(whether to throw an error or silently ignore), string ("ignore",
"warn", or "error"), or a function possibly returning such a value.
This enables a variety of ways of handling or ignoring transgressions
from "true" LaTeX behavior, making KaTeX easier to use while still
providing the ability for strict LaTeX adherance.
Resolve#1226, implementing that spec, for two existing
transgressions from regular LaTeX:
* src/functions/kern.js had some errors and warnings about use of
(units in) math vs. text mode commands.
* The former setting unicodeTextInMathMode (not in any released version)
needed to be set to true to enable Unicode text symbols in math mode.
Now these are controlled by the strict setting. By default, KaTeX is now
very permissive, but if desired, the user can request warnings or errors.
* Rewrite strict description
* Add tests for strict functions
* Stricter type for strict
* Switch default strict setting to "warn"
* Fix new flow error
* Fix another flow bug
* Support for top-level \newline and \\ in inline math
This was a little tricky because `\\` was defined as an endOfExpression.
Instead made `\\` a termination specific to an array environment.
Outside an array environment, buildHTML handles the `cr` object,
resulting in a `.newline` class. Currently this turns into a
`display: block` (with appropriate vertical spacing) only in inline math,
matching LaTeX.
* Simplify code
* Fix Jest errors
* NewLine screenshot test
* Bug fix: \\ only works at top level of inline
* Add \newline and \cr to test
* Switch test to pmatrix
* Add vertical space test
* Add \\ vs. \newline tests
* Fix flow errors
* Add \cr test
* Add documentation for \\ at top level
* Comment out newRow
* Fix commenting out
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* More Unicode letters (#1260)
This PR serves as a complement to PR #1232 by supporting some letters that are omitted from the Unicode range 1D400–1D7FF.
* Include Bold-Italic fonts for \boldsymbol (#1257)
* Include Bold-Italic fonts for \boldsymbol
Fix#1228
* Update screenshots
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* Use badgesize.io with https
* 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