* Support {equation}, {equation*}, and {split}
* Update screenshots
* Allow {split} at top level
* Move equation column number check to to ParseArray
* Add token to ParseError
* Sharpen parameters passed to parseArray
* Add token information
* Update an {array} spec in screenshotter
* Adjust {array} screenshotter spec
* Make a non-strict error call when {array} argument specifies too few columns.
* Move context checks to a helper function.
* Add detail about colorbox third text parameter
As stated in issue #1766
* Change colorbox example to use math
* Upgrade remarkable-katex to 1.1.5
Co-authored-by: Erik Demaine <edemaine@mit.edu>
* Add support for \expandafter
* Add support for \noexpand
* Add support for \edef
* Update comments
* Allow \long before macro definition
* Update documentation
* Update comments
* Fix defPrefix
* Add support for \let
* Update documentation
* Print error token
* Update documentation
* Check whether command is expandable
* Add tests
* Fix token order
* Make noexpand a Token property
* Throw error if control sequence is undefined when expanding
* Rename expandableOnly to expandOnly
* Make unexpandable macro property
* Move \expandafter to macros.js
* Add TODO
* Fix merge conflict
* Update a test case
* Remove unused functions in MacroContextInterface
* Update comments
* Refactor code
* Move \noexpand to macros
* Update MacroExpander.js
* Add a test case
* Separate control sequence check to a function
* Add support for \futurelet
* Separate RHS getter to a function
* Update documentation
* Move expandOnly logic to expandOnce
* Refactor code and update comments
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
* Add bra-ket notation
* Fix typo
* Remove ketbra
* Remove ketbra, add Bra and Ket
* Add Bra/Ket and fix a typo in bra's source
* Fix bra-ket typo in docs
* Fix bra-ket escape typo in docs
* Replace bra-ket pipe with \vert in docs
* Unicode characters in math render in text mode
Improve #2031 by rendering all supported Unicode text characters (via
supportedCodepoints) in text mode, mimicking wrapping them in `\text`,
thereby using metrics of letter M as usual.
* Add tests
* Improve documentation
* Implement review comments
* Re-enable \includegraphics now that we have trust setting
This reverts commit 5806b240b3.
* Include Khan Academy test logo in repo and use in test (fix#1892)
* Update screenshots
* Update documentation
* Add tests, cleanup existing tests
* Update snapshots
* Enable trust testing (trust=true by default)
* trust option to indicate whether input text is trusted
* Revamp into trust contexts beyond just command
* Document new trust function style
* Fix screenshot testing
* Use trust setting in \url and \href
* Check `isTrusted` in `\url` and `\href` (so now disabled by default)
* Automatically compute `protocol` from `url` in `isTrusted`, so it
doesn't need to be passed into every context.
* Document untrusted features in support list/table
* Existing tests trust by default
* remove allowedProtocols and fix flow errors
* remove 'allowedProtocols' from documentation
* add a comment about a flow error, rename urlToProtocol to protocolFromUrl
* add tests test that use function version of trust option
* default trust to false in MathML tests
* fix test title, remove 'trust: false' from test settings since it's the default
* Support \textup and \textmd
This PR adds support for `\textup` and `\textmd`, which are the inverses of
`\textit` and `\textbf`. Unlike bare `\text`, they result in `textup` and
`textmd` classes being applied, but those have no CSS rules, so they act the
same as bare `\text`.
Fixes#1909.
* Add documentation
* Add unsupported font commands
* Add support for `\lparen` and `\rparen` delimiters.
* Add missing math delimiter. Fix alphabetic order.
* Add test.
* Add spaces between parenthesis and square brackets.
* Change `npm run` to `yarn`
* Export `commander` program if required as module
* Move `prestart` (cli.md generation) to build.js
* Normalize script names
* Change `yarn prestart` to `node lib/build.js`
* Use local built CSS and fonts
* Move stylesheet after the first paragraph
* Remove prestart script
* Sync support pages
* Use KaTeX logo for \href example
* mobile support
* Unit block sizes
* Add texvc to supported.md
* Fix CSS lint errors
* Added suggested braces to demo page
* Pick up review comments
* Move \allowbreak
* Comments without terminating newlines in nonstrict mode
Fix#1506 by allowing single-line comments (`%` without terminating newline)
in nonstrict mode. `Lexer` and `MacroExpander` now store the `Settings`
object, so the `Lexer` can complain about missing newline according to the
`strict` setting. I filtered this out from the snapshot tests with a slightly
different `replacer`.
* Reimplement \href like \verb, add \url
Major restructuring to lex URL arguments differently, e.g. to support
`\href%{hello}` and `\href{http://foo.com/#test%}{hello}`. The new URL
parsing code is simpler, but involves a special case in `parseSymbol`
like `\verb`.
Also add support for `\url` while we're here.
* Cleanup
* Fix flow errors and improve error messages
* Add \url to documentation
* Improve doc formatting
* 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