Commit Graph

56 Commits

Author SHA1 Message Date
KaTeX bot
9a4b662ff3 chore(release): 0.13.5 [ci skip]
## [0.13.5](https://github.com/KaTeX/KaTeX/compare/v0.13.4...v0.13.5) (2021-05-02)

### Bug Fixes

* Support \S and \P in math mode ([#2977](https://github.com/KaTeX/KaTeX/issues/2977)) ([3f7163d](3f7163daf5))
2021-05-02 20:00:14 +00:00
KaTeX bot
243451a1b9 chore(release): 0.13.4 [ci skip]
## [0.13.4](https://github.com/KaTeX/KaTeX/compare/v0.13.3...v0.13.4) (2021-05-02)

### Bug Fixes

* Avoid crash when \operatorname has \limits ([#2979](https://github.com/KaTeX/KaTeX/issues/2979)) ([fbda0b1](fbda0b1136))
2021-05-02 19:49:57 +00:00
KaTeX bot
b9959815ef chore(release): 0.13.3 [ci skip]
## [0.13.3](https://github.com/KaTeX/KaTeX/compare/v0.13.2...v0.13.3) (2021-04-24)

### Bug Fixes

* Respect catcode in macro expansion and set ~'s catcode correctly ([#2949](https://github.com/KaTeX/KaTeX/issues/2949)) ([01ae7f8](01ae7f8eef)), closes [#2924](https://github.com/KaTeX/KaTeX/issues/2924)
* **array:** Keep single empty row in AMS environments ([#2947](https://github.com/KaTeX/KaTeX/issues/2947)) ([24332e0](24332e053c)), closes [#2944](https://github.com/KaTeX/KaTeX/issues/2944)
2021-04-24 19:35:15 +00:00
semantic-release-bot
384ba3caca chore(release): 0.13.2 [ci skip]
## [0.13.2](https://github.com/KaTeX/KaTeX/compare/v0.13.1...v0.13.2) (2021-04-06)

### Bug Fixes

* update version and SRI in dist/README.md ([#2905](https://github.com/KaTeX/KaTeX/issues/2905)) ([319c52d](319c52db64))
2021-04-06 23:05:10 +00:00
semantic-release-bot
0ced751a03 chore(release): 0.13.1 [ci skip]
## [0.13.1](https://github.com/KaTeX/KaTeX/compare/v0.13.0...v0.13.1) (2021-04-05)

### Bug Fixes

* Protect fraction bars from CSS border-color ([#2870](https://github.com/KaTeX/KaTeX/issues/2870)) ([2f62c0d](2f62c0d8ee))
2021-04-05 18:40:52 +00:00
Rui Okada
6cae6245ad docs: fix braket rows in support table (#2854)
Use braket macros for rendering examples and fix escaping of pipes (|) to properly display table

Co-authored-by: ylemkimon <y@ylem.kim>
2021-03-23 17:58:11 +00:00
ylemkimon
3568cb9c99 build: use semantic-release to automate release (#2830)
* Link to previous deploys of releases instead of versioned docs

* Use semantic-release to automate release

* Use an environment for release job

* Run release only on push event
2021-03-22 15:30:57 +09:00
Ron Kok
1f509a3b75 feat: Support \underbar (#2713)
* feat: Support \underbar

* Update screenshots
2020-12-30 10:15:17 -05:00
Ron Kok
75a3af9725 feat: Support {CD} (#2396)
* Support {CD}

* Edit screenshotter test to fit on one page

* Update screenshots

* Remove bogus Safari screenshot

* Edit documentation to avoid tag conflicts and explain delimiters

* Add type annotations

* Add bogus safari screenshot

* Update with real Safari screenshot

* Set label vertical alignment

* Revise call to parseExpression() per PR 2085 changes to macro parsing

* Update Firefox screenshot

* Pick up review comments

* Add unit tests and snapshot.

* Tighten up label collection.

* Better loop index

* remove extra space

* Picked up comments. Added a parse check. Added a test.

Co-authored-by: ylemkimon <y@ylem.kim>
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
Co-authored-by: Kevin Barabash <kevinb7@gmail.com>
2020-12-27 13:45:31 -05:00
Ron Kok
b69da81093 docs: Add colonequals functions to docs (#2651)
* docs: Add colonequals functions to docs

* Delete empty row from supported.md

Co-authored-by: ylemkimon <y@ylem.kim>
Co-authored-by: Erik Demaine <edemaine@mit.edu>
2020-12-13 13:00:10 -05:00
Ron Kok
60aecbdfe2 feat: Support \vcenter and \hbox (#2452)
* Support \vcenter, \raise, \lower, and \hbox

* Update screenshots

* Edit docs for strict and hbox to

* Fix typo for \hbox to

* Update Safari screenshot

* Augment docs for \vcentcolon

* Edit vcenter MathML comment.

* Remove pointless class from vcenter MathML

* Withdraw \raise and \lower

* Updatae Chrome and Firefox screenshots

* Update Safari screenshot

* Delete allowedInArgument setting

Co-authored-by: ylemkimon <y@ylem.kim>

* Update Chrome and Firefox screenshots

* Update Chrome and Firefox screenshots take 2

* Update screenshot

Co-authored-by: ylemkimon <y@ylem.kim>
2020-11-14 18:45:14 +09:00
Ron Kok
b21341560f docs: Add \char to support_table. (#2620) 2020-11-02 11:46:06 -05:00
Ron Kok
d3ed854a74 docs: Fix documentation typo in operatorname* (#2570)
* docs: Fix documentation typo in operatorname*

* Add backticks to docs of \operatorname
2020-10-08 15:07:11 -07:00
Ron Kok
37990cc5b3 feat: Support matrix*, pmatrix*, bmatrix*, Bmatrix*, vmatrix*, and Vmatrix*. (#2488)
* Support matrix*, pmatrix*, bmatrix*, Bmatrix*, vmatrix*, and Vmatrix*

* Add tests and docs

* Delete screeshotter tests

* Fix column alignment and add bogus screenshot files

* Update real Chrome and Firefox screenshots.

* Update Safari screenshot

* Dedupe code in array.js

* Edit payload in array.js

* Edit again, correctly this time.
2020-09-06 09:56:09 -07:00
Ron Kok
b22b69c3a8 fix: \injlim typo (#2459)
* Fix typo in \injlim

* Just to satisfy Semantic Pull Request
2020-08-26 09:14:18 -07:00
Ron Kok
987a84ee04 docs: add comment re: \arrowvert (#2449) 2020-08-22 01:59:37 +09:00
Ron Kok
794dc7a213 feat: support AMS log-like symbols (#2429)
* Support AMS log-like symbols

* Update documentation

* Update \limits info in documentation
2020-08-18 05:28:42 +09:00
Ron Kok
42cc5e507e feat: Support \phase (#2406)
* Support \phase

* Update screenshots

* Update documentation

* Add a11y test

* Edit MathML notation to phasorangle

* Move code to enclose.js

Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
2020-08-13 00:08:36 -04:00
Ron Kok
26e0a05221 feat: Support \mathstrut (#2416)
* feat: Support \mathstrut

* Update screenshots
2020-08-12 23:45:33 -04:00
Ron Kok
ab5936a6e7 feat: support {equation}, {equation*}, and {split} (#2369)
* 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.
2020-08-04 01:35:41 +09:00
Ron Kok
2f37dc9104 feat: support {align}, {align*}, {alignat}, and {alignat*} (#2341)
* Support {align}, {align*}, {alignat}, and {alignat*}

* Specify display mode for screenshots

* Add bogus screenshots

* Some screenshotter progress

* Update screenshots
2020-07-29 00:02:08 +09:00
Ron Kok
80b0e3dc20 Support {gather} and {gather*} (#2183)
* Support `gather` and `gather*`

* Add bogus screenshots

* Add correct screenshots

* Fix typo

* Update screenshots

* Improve error handling

* Scope styles inside .katex{}

* Revert console.log to console.error
2020-07-27 06:56:39 -07:00
Ron Kok
e76857ec03 feat: support \angl and \angln (#2334)
* Support \angl and \angln

* Update screenshots

* Update documentation
2020-07-25 22:53:11 +09:00
Ron Kok
611fe6b698 Support \origof and \imageof (#2283)
* Support \origof and \imageof

* Fix documentation table

Co-authored-by: ylemkimon <mail@ylem.kim>
2020-07-17 17:20:23 +09:00
Ron Kok
1764d25048 Support \minuso (#2213)
* Support \minuso

* Update screenshots

* Add MathML version

* Add BIN spacing

* Update screenshots

* Add Unicode character

* Delete duplicate macro

Co-authored-by: Erik Demaine <edemaine@mit.edu>
2020-07-08 19:28:43 -04:00
ylemkimon
9917d1ce84 Add support for \expandafter, \noexpand, \edef, \let, and \long (#2122)
* 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>
2020-03-11 12:14:34 +09:00
Rui Okada
4b905064ab Add bra-ket notation (#2162)
* 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
2019-12-11 22:02:19 -05:00
ylemkimon
e5333ad04d Add HTML extension (#2082)
* Add html extension

* Fix flow error

* Update documentation

* Add tests

* Call buildA11yStrings for "html" node

* Throw ParseError when parsing \htmlData fails

* Improve documentation

* Add a screenshotter test

* Add dummy screenshot

* Update screenshots
2019-12-01 17:49:28 -05:00
Ron Kok
d1cee3cf3d Support {rcases} and {drcases} (#2149)
* Support {rcases} and {drcases}

* Fix lint error

* Update screenshots
2019-11-10 18:36:02 +09:00
Peder B. Sundt
0772ac0e45 Minor formatting changes (#2143) 2019-11-06 15:50:48 +09:00
Erik Demaine
1eda0e86a0 Add support for \cal (#2116)
Fix #2115 by adding \cal to list of old-style font commands.
(Surprisingly tiny change!)
Add tests for all old-style font commands.
2019-10-10 20:46:10 -04:00
Erik Demaine
285c9fe0b6 Re includegraphics (#2053)
* 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)
2019-07-22 00:15:29 +09:00
Ron Kok
2dc8f8121a Support \operatorname* (#1899)
* Support \operatorname*

* Fix lint errors

* Fix YAML

* Update screenshots

* Break out a function to avoid code duplication

* Fix lint errors

* Restore wrapper span

* Update docs

* Reinstall color macros lost in merge

* Update screenshots

* Add type annotations, Move to utils file, add \limits to screenshots

* Fix lint errors

* Rearrange screen shot to fit onto page

* Update screenshots

* tweak location of utils.js and assembleSupSup.js
2019-07-17 21:38:44 -04:00
Erik Demaine
3800dc49c1 [breaking] trust setting to indicate whether input text is trusted (#1794)
* 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
2019-07-08 21:57:23 -04:00
Erik Demaine
f63733a35e Document mhchem \cf not supported (use \ce instead) (#2008)
* Document mhchem \cf not supported (use \ce instead)

* Mention \cf -> \ce in support table
2019-07-05 02:02:09 -04:00
elbaro
88d9a8a4df Add \plim (#1952)
* Add \plim

* tweak position of argmin and plim in support table
2019-06-01 20:20:26 -04:00
Ron Kok
3b60aee16c Support {smallmatrix}, {subarray}, and \substack (#1969)
* Support {smallmatrix}, {subarray}, and \substack

* Fix lint errors

* Update docs. Screenshots step 1.

* Screenshots step 2

* Screenshots step 3

* Pick up review comments

* Fixed arraycolsep for {smallmatrix}

* Fixed lint error

* Updated screenshots
2019-05-20 23:34:49 -04:00
Kevin Barabash
5806b240b3 disable \includegraphics until trust settings is merged (#1951)
* disable \includegraphics until trust settings is merged

* disable one more test
2019-04-28 17:52:27 -04:00
Tesla_Ice_Zhang
6bb312f687 Support double-square curly braces (#1953)
* Support double-square curly braces

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>

* Rename `llbrace` to `lBrace`

* Address comments: add mathml

* Fix code style

* Fix doc

* Add to docs/support_table
2019-04-25 07:23:00 -07:00
Ben Dyer
d01a972f5c Add symbol double square brackets (#1947)
* Add symbol double square brackets

* Update name for double square brackets, add macros and documentation
2019-04-23 18:49:50 -07:00
Erik Demaine
070883532a Support \textup and \textmd (#1921)
* 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
2019-04-06 02:51:11 +09:00
Erik Demaine
1c2d9d4a48 Fix link between support pages (#1854)
Fix #1853 by removing `./` in URLs which Docusaurus doesn't translate.
2019-02-21 16:08:22 +09:00
Erik Demaine
58c36c6fdf Add \textbackslash and \textasciicircum (#1839)
* Add \textbackslash and \textasciicircum

Fix #1838

* lint fix

* Add documentation
2019-01-27 12:02:47 -08:00
René Filip
9ddc24c9f1 add \argmax and \argmin (#1820)
* add \argmax and \argmin

* add reference to argmin and argmax
2019-01-12 18:36:36 -05:00
Ron Kok
64745b5c8a Add mhchem extension (#1436)
* A proposal for support of mhchem

* Create extension

* Add index

* Remove arrow function

* Fix lint errors in macros.js

* Remove mhchem from build

* Move code from macros.js to mhchem.js

* Add minified mhchem

* Remove arrow head mods. Disable eslint.

* Fix space handling

* Update code to mhchem v3.3.0

* Tweak arrows to reduce diff

* Raise \tripledash

* Edit docs and webpack

* Update package.json

* Remove wrap. Remove manual.

* Correct second brush stroke in \xrightleftarrows

* Added patch file

* Add import line

* Add mhchem to eslint ignore
2018-11-24 18:52:25 -05:00
ylemkimon
112582daa5 Replace Khan/KaTeX with KaTeX/KaTeX (#1781)
* Replace Khan/KaTeX with KaTeX/KaTeX

* Remove RawGit links

* Remove old files
2018-11-19 21:24:33 -05:00
Ron Kok
f713f324bd Support \includegraphics (#1620)
* Support \includegraphics

* Update screenshots

* Fix lint errors

* Fix more lint errors

* Fix lint errors take 3

* Add documentation, error messages

* Improve CSS

* Update domTree to coordinate with PR #1633

* Update screenshots

* fix flow errors

* Use same RegEx as href

* Fix lint error

* Accept raw ArgType

* Fix lint error

* fix flow error

* Add test
2018-11-01 18:43:41 -04:00
ylemkimon
4dd0e2cdca Add \> (#1752)
* Add \>

* Update snapshot
2018-10-24 22:04:00 -04:00
AlbertHilb
89bb371152 Add support for \lparen and \rparen delimiters. (#1741)
* Add support for `\lparen` and `\rparen` delimiters.

* Add missing math delimiter. Fix alphabetic order.

* Add test.

* Add spaces between parenthesis and square brackets.
2018-10-15 21:05:10 -04:00
ylemkimon
ba8e224b8d Fix \mathit font and italic correction and add \mathnormal (#1700)
* Fix \mathit font (Math-Italic -> Main-Italic) and italic correction

* Rename mathit to mathdefault and mainit to mathit

* Add \mathnormal
2018-10-10 17:18:07 +09:00