Commit Graph

1287 Commits

Author SHA1 Message Date
ylemkimon
fa8fbc0c18 Remove checkNodeType and assert/checkAtomFamily (#2137)
We used functions with $FlowFixMe as Flow couldn't refine ParseNode 
using its type. It seems the issue has been fixed and complicated 
function calls can be removed.
2019-11-29 15:08:22 -05:00
dependabot-preview[bot]
981a9ea3a0 [Security] Bump https-proxy-agent from 2.2.1 to 2.2.4 (#2158)
Bumps [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) from 2.2.1 to 2.2.4. **This update includes security fixes.**
- [Release notes](https://github.com/TooTallNate/node-https-proxy-agent/releases)
- [Commits](https://github.com/TooTallNate/node-https-proxy-agent/compare/2.2.1...2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-19 14:37:52 +09:00
Aleksey Nagovitsyn
1e3471b290 auto-render: do not touch text nodes w/o formulas (#2154) 2019-11-18 13:18:02 +09: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
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
ylemkimon
b14197d9c9 Update LICENSE and website to acknowledge individual copyrights as well (#2106)
* Update LICENSE to acknowledge individual copyrights as well

* Update copyright year

* Update website to acknowledge individual copyrights as well

* Update LICENSE

* Update siteConfig.js
2019-11-01 12:25:41 -04:00
Ron Kok
194b0064bc Improve MathML for corners (#1922) 2019-11-01 12:19:06 -04:00
Ron Kok
a92e39d810 Fix laps
* Fix lap with flex

* Fix lint error

* Fix more lint errors

* Fix indentation in test spec

* Update screenshots

* remove .glue class
2019-11-01 02:23:28 +09:00
Ron Kok
d10f375eed Fix \boxed inherited color (#2130) 2019-10-19 14:22:42 +09:00
kzvi
0843e9556e add spacing on left of fleqn display math (#2127)
* add spacing on left of fleqn display math

* update description of fleqn in docs/options.md

to include new spacing
2019-10-18 12:22:52 -04:00
Erik Demaine
0cdb28b256 \@ifnextchar consumes spaces (#2118)
* \@ifnextchar consumes spaces

Fix #2117 by fixing our implementation of \@ifnextchar to match LaTeX's:
consuming spaces before checking the next character.  See #2117 for details.

* Update MacroContextInterface
2019-10-13 00:33:30 +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
ylemkimon
634b4e2ae4 Add 'trust' setting to demo (#2107)
Ask if enabling 'trust' from the permalink
2019-10-02 21:06:53 -04:00
ylemkimon
be0c79b375 Disable eslint jest environment in non-test files (#2104) 2019-10-02 21:00:05 -04:00
ylemkimon
df4a580c94 Set border-collapse: collapse in vlist (#2103)
Fixes #2100 (any vertical layouts within <table>).
2019-10-02 20:51:58 -04:00
ylemkimon
5acd8143d7 Remove greenkeeper.json (#2105) 2019-10-02 20:39:37 -04:00
Fabio Spampinato
7093b0ce39 Notable: update (#2108)
* Added “Notable” to the list of users

* Added missing trailing comma

* alphabetize the new entry

* Notable: updated icon and website url
2019-09-29 13:07:47 +09:00
Evan Widloski
166f1f6798 mathtex-script: Use html 'defer' attribute (#2069)
* Use html 'defer' attribute

Instead of putting the extension script tag at the bottom, we can use the `defer` attribute to execute the script after all other content is loaded.  It has [very good](https://caniuse.com/#feat=script-defer) browser support.

* fix checksums

* use sha384 hashes

* update to Katex 0.11.1
2019-09-28 00:58:04 +09:00
Fabio Spampinato
ad4a8778ae Added “Notable” to the list of users (#2086)
* Added “Notable” to the list of users

* Added missing trailing comma

* alphabetize the new entry
2019-09-22 15:11:19 -04:00
Ciro Santilli,Opinions and content are my own, not my employer's,2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱scriptalert(1)/script
36595343b7 Create globalGroup option to place definitions in global scope (#2091)
If true, this allows \newcommand definitions to persist across calls to
renderToString.

Fix https://github.com/KaTeX/KaTeX/issues/2070
2019-09-22 15:03:44 -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
dependabot-preview[bot]
a790a69bd2 [Security] Bump mixin-deep from 1.3.1 to 1.3.2 (#2090) 2019-09-03 14:33:08 +00:00
dependabot-preview[bot]
ef6f52f5cd [Security] Bump eslint-utils from 1.3.1 to 1.4.2 (#2089)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2. **This update includes a security fix.**
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-27 11:11:30 -04:00
Erik Demaine
2a3013d72a Fix parse timing by separating consume() into fetch() and consume() (#2054)
* Fix parse timing by separating consume() into fetch() and consume()

Fix #1989, and generally cleanup parse timing (many fewer hoops to jump
through) by defining two methods on parser:

1. `consume()` marks the current token (`nextToken`) as "done", but
   doesn't yet fetch the next token (setting `nextToken` to `null`).
2. `fetch()` fetches the next token if we don't already have one
   (e.g., if last token was `consume()`d).

Before this change, `consume()` did both actions.  By separating them,
and allowing the parser to live in a state for a while where `nextToken`
is `null`, it is far easier to change settings (in particular, math/text
mode and catcodes) before reading the next token, in a way that depends
on what we're parsing.  For example, if an argument should be treated in
text mode, we can just set the mode in the argument parser, instead of
when the previous token was consumed.  Similarly, if an argument should
be treated as a URL, we can just set the catcode of `%` in the URL
argument parser, and reset it after.  We no longer have to take care to
reset things before calling `consume()`.

This change mostly involves changing `this.nextToken` to `this.fetch()`.
In a perfect world, we could use slightly fewer calls to `this.fetch()`,
but Flow doesn't realize that `this.nextToken` will be non-null after a
call to `this.fetch()`, so we need to use a few more calls to
`this.nextToken()` or a few more local `nextToken` variables.

* Remove now-unnecessary consumeMath

* Update Parser.js
2019-08-21 16:14:42 +09:00
Erik Demaine
081b44ab57 Use current font for accents (#2066)
* Use current font for accents

Fix #353 using `buildCommon.makeSymbol` to automatically determine font
for the accent symbol.

* Fix screenshots

* Fix flow error

* Fix file permissions
2019-08-20 22:40:40 +09:00
Erik Demaine
96e1156764 Fix \gray's macro definition (#2075)
Fix #2074 by fixing a typo in the macro definition of \gray.
This seems to be the only color incorrectly defined.
2019-08-20 22:19:17 +09: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
Erik Demaine
3b6ed48f5b Unicode characters in math render in text mode (#2040)
* 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
2019-08-08 20:33:09 -04:00
Ron Kok
3b80e0123b Remove keyVals ParseNode type (#2067)
* Remove keyVals ParseNode type

* Fix render-a11y-string-spec.js
2019-08-03 17:20:47 -04:00
Kevin Barabash
151376e8aa Port katex-a11y.js to KaTeX (#2062)
* copy katex-a11y.js from webapp to contrib/to-a11y-string.js

* first pass of updating to-a11y-string to use flow

* Set up test harness and write some tests
- add flow types for jest
- create wallaby config file
- add prettier as a dep and set up .prettierrc so that we use .toMatchInlineSnapshot() and have jest insert the snapshot for us
- add lots of TODOs (I'll create tickets for these later)

* Add some  to get the tests passing for now

* remove commented out parts of wallaby.js config file

* remove some stale strings, fix flow issue, add more coverage

* add , add few more tests, handle middle

* fix minor nits in tests

* rename to-a11y-string to render-a11y-string, updatte webpack config to build extension

* add test for \boxed

* remove commented out code
2019-08-02 11:24:51 -04:00
Erik Demaine
d82d09bebd Suggest <!DOCTYPE html> in documentation (#2052)
* Suggest <!DOCTYPE html> in documentation

Inspired by #2047

* Add starter template

* Mention <iframe>s

* Set default docs page to Browser
2019-07-24 23:17:41 +09: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
navsgh
223b9c3f24 Add Katex Expression (#2049)
A web component, built with Stencil, to render KaTeX expressions. Stencil uses a dynamic loader to load the custom elements polyfill only on browsers that need it.
2019-07-18 14:25:45 -04:00
Erik Demaine
9c7f26b479 Fix argument font sizing in \fbox and \raisebox, fix font sizing in \TeX, \LaTeX, \KaTeX (#1787)
* Remove forced \normalsize in \raisebox

Fix #1786 (incorrect size of "E" in `\TeX`) by fixing `\raisebox` to
keep the current font size.  Previously, `\raisebox` was rendering its
second argument as if it were in `\normalsize\textrm{...}`; now,
the argument is just as if it were in `\textrm{...}`.

* Fix screenshots

* New "hbox" argument type to convert box-like arguments

* Review comments

* Fix \fbox to use hbox argument

* Render A in \LaTeX and \KaTeX in \scriptstyle (not \scriptsize)

* Add screenshot test

* Revert .sizing { width: min-content} thanks to #2044
2019-07-18 11:24:00 -04: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
08df67b7cd Fix font choice in operators like \log (e.g. \boldsymbol{\log}) (#2041)
* Fix font choice in operators like \log (e.g. \boldsymbol{\log})

Fix #1971 by correctly passing arguments into the font choice for
the HTML handler for operators like \log.

* Extend BoldSymbol screenshot test

* Require options argument in mathsym to avoid this type of bug in the future

* Update screenshot
2019-07-16 15:08:17 -07:00
Ron Kok
3d9a094b67 Add Unicode digamma to documentation (#2045) 2019-07-16 17:16:07 -04:00
Erik Demaine
403126e56d Do not force sizing groups to display inline-block (#2044)
Fix #1788 by removing `display:inline-block` rule from `.sizing`.
I don't see why a sizing change cares about the display mode, and it
fixes the interaction between `makeVList` and sizing commands.
It should also allow me to remove a `.sizing { width:min-content }` rule
that I had to add in #1787.
2019-07-16 17:00:24 -04:00
dependabot[bot]
45539c2e9c Bump handlebars from 4.1.0 to 4.1.2 (#2036)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.0 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.0...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 22:01:53 -04:00
dependabot[bot]
e055ca8a33 Bump webpack-bundle-analyzer from 3.0.4 to 3.3.2 (#2037)
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 3.0.4 to 3.3.2.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v3.0.4...v3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-13 21:56:31 -04:00
dependabot-preview[bot]
95d2690322 Bump flow-bin from 0.93.0 to 0.102.0 (#2013)
* Bump flow-bin from 0.93.0 to 0.102.0

Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.93.0 to 0.102.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/compare/v0.93.0...v0.102.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump flow-bin from 0.93.0 to 0.102.0

Bumps [flow-bin](https://github.com/flowtype/flow-bin) from 0.93.0 to 0.102.0.
- [Release notes](https://github.com/flowtype/flow-bin/releases)
- [Commits](https://github.com/flowtype/flow-bin/compare/v0.93.0...v0.102.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* fix issue with flow after upgrading
2019-07-13 20:17:19 -04:00
dependabot-preview[bot]
0a55eb8a64 Bump commander from 2.19.0 to 2.20.0 (#2020)
Bumps [commander](https://github.com/tj/commander.js) from 2.19.0 to 2.20.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v2.19.0...v2.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 19:56:53 -04:00
dependabot-preview[bot]
9182b8aae4 Bump eslint-plugin-flowtype from 3.4.2 to 3.10.4 (#2023)
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 3.4.2 to 3.10.4.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v3.4.2...v3.10.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 19:45:06 -04:00
dependabot-preview[bot]
89042d80e3 Bump css-loader from 2.1.0 to 3.0.0 (#2021)
Bumps [css-loader](https://github.com/webpack-contrib/css-loader) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases)
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v2.1.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 19:36:24 -04:00
dependabot-preview[bot]
d98164dd42 [Security] Bump lodash from 4.17.11 to 4.17.14 (#2030)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-13 19:27:43 -04:00
Kevin Barabash
2fd0bd94de Replace greenkeeper badge with dependabot badge (#2022) 2019-07-13 19:19:22 -04:00
dependabot-preview[bot]
403a728df5 Bump istanbul-lib-coverage from 2.0.3 to 2.0.5 (#2017)
Bumps [istanbul-lib-coverage](https://github.com/istanbuljs/istanbuljs) from 2.0.3 to 2.0.5.
- [Release notes](https://github.com/istanbuljs/istanbuljs/releases)
- [Commits](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-coverage@2.0.3...istanbul-lib-coverage@2.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 23:28:38 -04:00
dependabot-preview[bot]
572fa9cc32 Bump babel-plugin-istanbul from 5.1.1 to 5.1.4 (#2012)
Bumps [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul) from 5.1.1 to 5.1.4.
- [Release notes](https://github.com/istanbuljs/babel-plugin-istanbul/releases)
- [Changelog](https://github.com/istanbuljs/babel-plugin-istanbul/blob/master/CHANGELOG.md)
- [Commits](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.1...v5.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 23:16:15 -04:00
dependabot-preview[bot]
a1b6d4d655 Bump eslint from 5.14.1 to 5.16.0 (#2016)
Bumps [eslint](https://github.com/eslint/eslint) from 5.14.1 to 5.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v5.14.1...v5.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-08 22:51:43 -04:00