Commit Graph

105 Commits

Author SHA1 Message Date
Kevin Barabash
c80017ba08 Release v0.13.0 (#2824) 2021-03-08 21:58:35 -05:00
renovate[bot]
9a78924e56 Configure Renovate (#2493)
* Add renovate.json

* Update renovate.json

* Update renovate.json

* Enable git-submodules

* Remove Dependabot

* Update renovate.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: ylemkimon <y@ylem.kim>
2020-09-12 09:22:32 +09:00
ylemkimon
221042be86 ci: migrate to GitHub Actions from CircleCI, allow running Browserstack on forked repo via label (#2417)
* 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
2020-08-18 04:58:08 +09:00
ylemkimon
981e3ee0eb docs: add link to Discussions (#2405)
* 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
2020-08-12 12:17:40 +09:00
ylemkimon
057b02feac chore: don't include dist in the release commit (#2385) 2020-08-10 08:52:34 +09:00
ylemkimon
1263681563 chore: enable Gitpod (#2335)
Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
2020-08-03 09:18:18 -04:00
ylemkimon
c387b9c747 v0.12.0 release (#2302)
* Release v0.12.0

Bump master to v0.12.1-pre

* Update CHANGELOG

* Uncomment ES module documentation

* Update CHANGELOG.md

Co-authored-by: Erik Demaine <edemaine@mit.edu>

* Update CHANGELOG.md

Co-authored-by: Erik Demaine <edemaine@mit.edu>
2020-07-13 05:46:01 +09:00
ylemkimon
4ec2806b3e Drop IE 9/10 support (#2136)
* Drop IE 9/10 support

* Remove IE-related comments

They no longer apply.

* Update browserslist

* Exclude old Safari (5.1)
2019-11-01 18:43:47 -04:00
Michael Polyak
f03671ce61 Release v0.11.1 (#2098)
* Release v0.11.1

Bump master to v0.12.0-pre

* Update CHANGELOG.md for v0.11.1-release

* Update CHANGELOG.md with Changes section for v0.11.1-release
2019-09-18 08:40:01 -04:00
Kevin Barabash
1da7ef2210 Release v0.11.0 (#2071)
* Release v0.11.0

Bump master to v0.12.0-pre

* update CHANGELOG.md

* minor editors to CHANGELOG.md
2019-08-12 21:51:13 -04:00
Kevin Barabash
2fd0bd94de Replace greenkeeper badge with dependabot badge (#2022) 2019-07-13 19:19:22 -04:00
Kevin Barabash
f659544d62 Release v0.10.2 (take 4) (#1961)
* Release v0.10.2

Bump master to v0.10.3-pre

* update CHANGELOG

* add integrity hash to mhchem script in README

* tweaked CHANGELOG
2019-05-12 22:08:30 -04:00
ylemkimon
e016f4b940 Release v0.10.1 (#1856)
* Release v0.10.1

Bump v0.10.1 to v0.10.2-pre

* Update CHANGELOG.md
2019-02-22 13:34:15 +09:00
varkor
062a28f35a Fix invalid UTF-8 in mhchem/README.md (#1833)
* Fix invalid UTF-8 in mhchem/README.md

* Fix apostrophes in README.md
2019-01-13 11:21:50 -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
ylemkimon
49f84f76e7 v0.10.0 release (#1751)
* Remove RC-versioned docs

* Release v0.10.0

Bump master to v0.10.1-pre

* Fix multiple occuring hash replacement

* Update SRI hashes

* Update CHANGELOG.md

* Fix tags not shown

* Update docusaurus

* Wrap escaping backslashes with backticks

* Update SRI hashes

* Update CHANGELOG.md
2018-10-29 13:14:24 +09:00
ylemkimon
89daa02fd8 Move to katex.org (#1680)
* Change links to katex.org

* Change http to https

* Remove baseUrl hacks

* Fix OpenGraph image link

* Fix KaTeX path update script
2018-08-31 04:08:02 -04:00
ylemkimon
7ca6f51b9a Release v0.10.0-rc.1 (#1654)
Bump master to v0.10.0-pre
2018-08-23 02:42:24 +09:00
ylemkimon
e790a416d5 Update SRI hashes for v0.10.0-rc (#1638) 2018-08-19 11:50:31 -04:00
ylemkimon
293af2936d Release v0.10.0-rc (#1634)
* Release v0.10.0-rc

Bump master to v0.10.0-pre

* Update CHANGELOG.md

* Update SRI hashes

* Update SRI hashes
2018-08-20 00:25:11 +09:00
ylemkimon
b542c79fc3 Add jsDelivr badge (#1614) 2018-08-14 10:20:09 +02:00
ylemkimon
ea1a226e20 Improve examples, add defer, async, and pre- loading KaTeX (#1580)
* 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
2018-08-11 09:21:36 +09:00
ylemkimon
5ce03c45cf Add link to the demo in navigation bar and README (#1564)
* Add link to the demo in navigation bar

* Add link to the demo in README
2018-08-08 09:32:57 -04:00
Erik Demaine
c88fa70a62 Small tweaks to documentation (#1527) 2018-07-30 12:25:38 +09:00
ylemkimon
2136c9670c Remove .travis.yml and related (#1523) 2018-07-29 13:07:40 -04:00
ylemkimon
c1b6668cf0 Improve README.md (#1515)
* 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
2018-07-29 12:26:41 -04:00
ylemkimon
8a38035855 KaTeX website & documentation (#1484)
* 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
2018-07-26 20:19:40 -07:00
ylemkimon
83e8eac0a5 Add test job to CircleCI (#1235)
* 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`
2018-07-26 18:50:51 -07:00
Erik Demaine
33ef4bdc63 AsciiMath: link to asciimath2tex (#1474) 2018-07-13 14:19:59 +09:00
ylemkimon
a8015d0feb Allow only allowed protocols in \href (#1440)
* Allow only allowed protocols in \href

Added `allowedProtocols` settings

* Fix a typo

* Allow boolean argument

* Allow wildcard(*) argument

Revert 'Allow boolean argument'
2018-06-27 19:51:12 -04:00
Erik Demaine
a7682e6220 Update READMEs to v0.10.0-beta (#1423)
8624d4ccff
2018-06-14 22:43:05 -04:00
Erik Demaine
788aa420be Change maxExpand limit to 1000 (#1383) 2018-05-31 09:45:36 +09:00
Erik Demaine
acccce801d \def support (and \gdef and \global\def) (#1348)
* 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
2018-05-28 21:58:57 +02:00
greenkeeper[bot]
659b4e30c8 Update dependencies to enable Greenkeeper 🌴 (#1368)
* chore: add Greenkeeper config file

* chore(package): update dependencies

* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* Exclude "dockers/texcmp/package.json",

* Revert "dockers/texcmp/package.json"

Reverts ddc6aa9e05d9e3a7e1e960c7c62f15b8dbff70a9
2018-05-28 05:37:36 +02:00
ylemkimon
41ac2456f0 Add missing v prefix to the size badge URL (#1342)
* Add missing `v` prefix to the size badge URL

* Add missing `v` prefix to badge URL update script
2018-05-23 09:05:32 -04:00
Kevin Barabash
5aad11eff3 Bump master to v0.11.0-pre 2018-05-19 20:49:11 -04:00
Erik Demaine
a0ddad338e Support \tag, \tag*, and \gdef (#1309)
* 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
2018-05-19 22:19:21 +02:00
Erik Demaine
369b5a8276 Allow all Unicode symbols in nonstrict mode (#1217)
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.
2018-05-17 11:33:01 -04:00
Ryan Randall
7eed150c48 Documenting String.raw (#1198)
* Documenting String.raw

* Typo

* Rewrite String.raw doc
2018-05-17 22:27:56 +09:00
Erik Demaine
1ed99d9ff3 Strict setting controls \newline display-mode behavior; fix MacroExpander space handling (#1314)
* 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
2018-05-16 09:37:41 -04:00
Erik Demaine
7ab4f76e16 Implement strict mode (replacing unicodeTextInMathMode) (#1278)
* 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
2018-05-13 14:27:30 -04:00
Erik Demaine
4801ab875a Support for top-level \newline and \\ in inline math (#1298)
* 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
2018-05-13 09:58:24 -04:00
Erik Demaine
bb1dc0c431 throwOnError documentation bug fix (#1308)
3613885da1 (r28950405)
2018-05-12 22:31:21 -04:00
Erik Demaine
3613885da1 Document new error handling behavior (renderOnError) (#1302)
PR #1169 forgot to document itself.  This fixes the README accordingly.
2018-05-09 23:11:33 +09:00
Daniel Lim Wee Soong
fe2dc1bedf README: Add size badge (#1253)
* 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
2018-04-21 19:22:14 -04:00
Lukas Drgon
0f17ac5080 Change CDN links (#1243) 2018-04-04 21:54:00 +09:00
dudko
f35c41883c List react-katex in Libraries (#1236)
* List react-katex in Libraries

* Added react-latex

* Fix capitalization

* Move React libraries above Ruby library
2018-03-31 09:33:01 -04:00
Erik Demaine
aed1c1e564 unicodeTextInMathMode setting (#1117)
* 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
2018-02-19 21:25:20 -05:00
Kevin Barabash
298b482c18 Bump master to v0.10.0-pre 2018-02-18 16:55:16 -05:00
Erik Demaine
0854bb9f15 Add a paragraph about injection safety (#1161)
* Add a paragraph about injection safety

* Rewrite into Security and Handling errors

* minor edits to the suggested whitelist
2018-02-17 14:48:33 -05:00