Commit Graph

1144 Commits

Author SHA1 Message Date
Ron Kok
e52f6859ec Improve MathML for \rule (#1912)
* MathML for \rule

* Pick up comments

* Update rule.js
2019-03-29 22:59:21 +09:00
Ron Kok
32b25cd5cf Improve MathML for extensible arrows (#1901)
* Add padding

* Fix lint errors

* Pick up comments

* Pick up comment
2019-03-29 22:52:56 +09:00
Ron Kok
21f7fe85d5 Improve MathML for characters in Unicode private use area (#1908)
* Add macros for private area characters

* Add \nsupseteqq and \nsubseteqq
2019-03-28 09:37:54 -07:00
Ron Kok
27d557bccf Make \smallint small in \displaystyle (#1907) 2019-03-28 09:31:30 -07:00
Ron Kok
79efcc3447 Improve more coloneq (#1902) 2019-03-28 09:21:26 -07:00
Ron Kok
9fcf14dccf Get a tall \middle\vert from MathML (#1911) 2019-03-28 17:49:05 +09:00
Ron Kok
26e1518b7b Fix \middle spacing (#1906) 2019-03-26 08:27:26 +09:00
ylemkimon
adbcb8b74d Add issue templates (#1862)
* Add issue templates

Fixes #1468

* Apply suggestions from code review

* Update bug_report.md

* Update feature_request.md

* Update rendering-bug-report.md

* Update bug_report.md

* Update bug_report.md

* Update rendering-bug-report.md

* Update bug_report.md

* Update rendering-bug-report.md

* Apply suggestions from code review

* Update feature_request.md

* Apply suggestions from code review
2019-03-24 13:47:53 +09:00
Ron Kok
04078aa09d Improve MathML for \brace (#1884)
* Fix \brace

* Fix lint error
2019-03-24 13:43:19 +09:00
Ron Kok
f95160b041 Improve MathML for \coloneqq, \dblcolon, \eqcolon, and \eqqcolon (#1889)
* Improve MathML for colonequals

* Fix lint errors

* Change to macro implementation
2019-03-24 13:22:28 +09:00
Ron Kok
8da1377c08 Improve MathML for \hphantom and \vphantom (#1883)
* Improve MathML for \phantom

* Add mpadded
2019-03-24 13:17:54 +09:00
Ron Kok
cb477ca01a Improve MathML for \limits (#1897)
* Improve MathML for \limits

* Make code parallel
2019-03-24 13:02:12 +09:00
Ron Kok
f8f4809886 Fix ApplyFunction character (#1890) 2019-03-23 10:30:33 +09:00
Ron Kok
a1e341a5c6 Improve MathML for \overset, \stackrel, and \underset (#1886)
* Fix \overset and \stackrel

* Fix indentation
2019-03-22 08:37:05 -07:00
ylemkimon
ff5ebea681 Fix \not (U+E020) RBearing (width) (#1878)
Fixes #1842 on Safari.

Also removed unused extra code (notin and noteq).
2019-03-21 08:21:37 -04:00
Ron Kok
64d1c4e590 Fix nested \dfrac (#1825)
* Fix nested \dfrac

* Update screen shots
2019-03-20 14:20:01 -04:00
Ron Kok
f35c77a544 Improve MathML accents (#1877) 2019-03-21 02:57:53 +09:00
ylemkimon
9f52d0a0f7 Disable @babel/env debug (#1874)
The debug option was accidentally committed.
2019-03-17 03:20:34 +09:00
riteme
6ae095fcd4 Fix \Rho (#1870) 2019-03-07 10:18:20 -05:00
ylemkimon
99892bb4a7 Upgrade minimum development Node version to v8 (#1861)
Node v6 will reach its end-of-life by April 2019.
2019-02-22 16:15:10 -05: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
Kevin Barabash
122c197f51 Fixes #1810: jest problem on windows (#1811)
* Fixes #1810: jest problem on windows

* switch from modulePaths to moduleNameMapper

* Avoid dependency on built dist
2019-02-21 16:15:34 +09:00
Erik Demaine
515411d34f Fix \KaTeX macro definition in tests (#1843)
Update `test/screenshotter/test.tex`'s definition of `\KaTeX` macro to match
the metrics of `src/macros.js`'s definition of `\KaTeX`, and thereby fix #1703.
I just changed the `\kern` metrics to match the update from #974, and left
the font selection code to match LaTeX's definition of `\LaTeX`.
2019-02-21 16:10:46 +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
ee16854612 Fix \not and \neq on Chrome via new Unicode symbol U+E020 (#1852)
* Fix \not and \neq via new Unicode symbol U+E020

Fix #1842

* Fix font metrics

* Update screenshots

* Use lower case letters in code points
2019-02-21 16:06:29 +09:00
ylemkimon
9c05e208ea Upgrade dependencies and remove yarn check (#1851)
* Remove Yarn check

Yarn check is buggy and will be removed in the future

* Upgrade dependencies

* Add --frozen-lockfile to CI
2019-02-20 14:56:06 -05:00
Erik Demaine
23958337a2 \fbox inherits default color (#1847)
Merge `.fbox` and `.fcolorbox` rules to inherit default color, instead
of forcing `black`.  We no longer have any explicit `black` in CSS.
Fix #1772.
2019-02-09 18:10:35 -05:00
Erik Demaine
7f778d1543 leqno and fleqn support (#1814)
* leqno support

* Add fleqn support

* Add tests

* Lint fix

* Add leqno and fleqn to website demo
2019-01-29 18:40:17 +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
Ron Kok
2cd37ae7c3 Fix Unicode bigcup (#1836) 2019-01-20 12:38:14 -05: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
Jake
4847e40ab6 Add vue-katex to 3rd party libraries (#1823) 2019-01-13 10:24:54 -05: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
e85cb97cca Fix \genfrac w/empty delimiter arguments (#1816) 2019-01-02 02:13:54 +09:00
Erik Demaine
647c661db0 Remove double encoding in MathML via Unicode MathML spaces (#1813)
* Remove double encoding in MathML via Unicode MathML spaces

We used to have a complex mechanic for escaping strings, marking them as
`needsEscape = false`, and then not escaping those strings (for
combining strings in `\operatorname`).  But this doesn't really work
with `render`ing directly to a node, as `document.createTextNode` can't
be stopped from escaping.

I've thus removed this mechanic, which required the following changes:

* Switch MathML "smart space" encoding to use Unicode instead of
  `&LongNames;` (which weren't working with `render` for the same reason).
* Hack our HTML/MathML serializer to not use `String.trim`, which wrecks
  havoc with emitted Unicode spaces.

Now `toText()` doesn't escape, so strings concatenate in unescaped form,
and `toHTML()` only does the necessary escaping.  Thus fix #1782.

* Fix src/utils.js

Co-Authored-By: edemaine <edemaine@mit.edu>

* Fix src/mathMLTree.js documentation

Co-Authored-By: edemaine <edemaine@mit.edu>

* Remove trim hack thanks to diffable-html@4.0.0

* Switch back to jest-serializer-html

* Update mathMLTree.js
2019-01-02 01:55:44 +09:00
Ron Kok
f5234a2f01 Fix \hphantom width (#1809)
* Fix \hphantom width

* Spin up phony screenshot test

* Make better choice of smash screenshot test

* Real screenshotter test

* Add strict mode

* Fix lint error

* useStrictBehavior

* Revert to previous strict setting

* useStrictBehavior "phantomSpacing"

* Fix tests via nonstrictSettings

* Fix documentation

* Remove bin|rel
2019-01-02 01:49:23 +09:00
Erik Demaine
8346294bf3 Fix \\ and \newline after operator (#1796)
* Fix \\ and \newline after operator

Fix #1790.  `\\` and `\newline` render as a span with classes
`mspace` and `newline`.  We need to check for `newline` when bringing
spaces into the same `base` group.

* Add tests and comment
2018-12-26 18:17:30 -05:00
Kevin Barabash
1a7ce6cf15 update flow to 0.89 (#1808)
* update flow to 0.89

* only use a single core when running tests on circleci
2018-12-26 17:57:28 -05:00
Ron Kok
d604965c62 Allow \includegraphics to omit the optional argument (#1807)
* Allow \includegraphics to omit the optional argument

* Fix lint error
2018-12-23 18:52:30 -05:00
ylemkimon
45a58f8d30 Update lockfile, fix test reporting, throwOnError on yarn start test page (#1798)
* Update lockfile

* Fix test reporting

* Set throwOnError on `yarn start` test page
2018-12-23 18:46:25 -05:00
AlbertHilb
f10de9617e Add optional pre-process callback to the auto-renderer. (#1784)
* Add optional pre-process callback to the auto-renderer.

* Rewrite `preProcess` callback signature.

* Add test.

* Make test future-proof.

* Add root folder to the node module paths.
2018-12-23 18:29:59 -05:00
ylemkimon
ce3840d4ce Include only necessary fonts for target environment specified by Browserslist (#1674)
* Include only necessary fonts for target environment specified by Browserslist

Allow WOFF and WOFF2 to be controlled using environment variables

* Fix links

* Fix merge error

* Update dependencies

* Replace uglifyjs-webpack-plugin with terser-webpack-plugin

* Do not set `targets` if !isESMBuild
2018-12-02 17:51:13 -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
3dfd17d9b4 Add catcode to Lexer, move comment parsing back to Lexer (#1789)
* Remove redundant consumeSpaces()

- Spaces after command sequence are ignored in Lexer
- parseExpression consumes spaces in the math mode

* Add catcode to Lexer, move comment parsing back to Lexer

- Fix parsing a comment before a sup/subscript argument
- Fix parsing a comment before an expression
- Fix parsing a comment before or between \hline
- Fix parsing a comment in the macro definition
- Fix parsing a comment including a command sequence

* Update Lexer.js

* Update Parser.js

* catcode -> catcodes
2018-11-24 18:42:14 -05:00
ylemkimon
ec6a2b4f36 Remove Supported Functions onPageNav style (#1767)
* Remove Supported Functions onPageNav style

* Remove Supported Functions onPageNav style
2018-11-21 14:16:25 +09: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
f4e24183d6 fix: pin stylelint to 9.6.0 (#1778) 2018-11-07 19:41:23 -05:00
ylemkimon
cda184bea4 Add documentation regarding importing the module (#1768) 2018-11-06 00:37:44 +09: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
f628ca142b Generate ECMAScript module for contrib (#1624)
* Create separate entry point of copy-tex for webpack

* Update katex.webpack.js comment

* Generate ECMAScript for contrib

* Update dependencies

* Comment out documentations
2018-10-31 11:37:54 +09:00