Commit Graph

1287 Commits

Author SHA1 Message Date
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
Ron Kok
fc79f79c78 Support Unicode \digamma (#2010)
* Support Unicode \digamma

* Update screenshotter images
2019-07-05 20:01:51 -04:00
Ron Kok
3c075faa1b Fix \sqrt SVG path (#2009) 2019-07-05 13:13:56 -04:00
Ron Kok
2139adffdb Prevent gaps in tall delimiters (#1986)
* Prevent gaps in tall delimiters

* Improve lap vertical alignment

* Fix lint errors

* Remove outdated comment

* Move a declaration out of makeStackedDelim()

* Update screenshots
2019-07-05 10:16:24 -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
Ron Kok
2b83935064 Improve MathML for classes (#1929)
* Improve MathML for classes

* Fix lint errors

* Fix another lint error

* Simplify MathML resulting from single character box

* Fix lint errors

* make some of the arrays in our html/mathml helper functions readonly
2019-07-05 01:14:05 -04:00
Erik Demaine
19d9d83ad3 \color affects following \right, put array cells in their own groups (#1845)
* \color affects following \right

Fix #1844 by giving `leftright` nodes a `rightColor` attribute for how
to color the right bracket.  Now `\color` sets the macro
`\current@color` in the current environment (in particular, resetting
after `\right`), just like `color.sty` does in LaTeX.  This is used to
specially pass the current color into any following `\right` and then
into the `leftright` parse node.

* Add test

* Put each array cell in its own group/namespace

* Improve cell group isolation, add test and TODO

* Improve comments
2019-07-05 00:27:55 -04:00
Tonton Pixel
39da3f5119 Add "Tutti Quanti Shelf" app (#1997)
* Add "Tutti Quanti Shelf" app

Utilities making use of the KaTeX library have been split between the original app "Vade Mecum Shelf" ("Trigonometric Formulas" utility) and the new app "Tutti Quanti Shelf" ("LaTeX Math Renderer" utility)...

* Link to new app icon

* Update siteConfig.js

* Update siteConfig.js

Fixed image path
2019-06-16 18:08:37 -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
Daniel Hollas
d1dfd88166 DOC: Fix path to built file (#1976) 2019-05-27 16:38:41 -04:00
Ron Kok
f9dafea6a6 Enable minRuleThickness in rendering options (#1964)
* Enable minRuleThickness in rendering options

* fix typo

* Fix lint errors

* Fix default

* Remove border from \colorbox

* Fix lint error

* Update array screenshot

* Add border to \fcolorbox

* Edit comment

* Add comment

* Pick up review comments

* Fix lint errors

* Edit \sqrt screenshot test

* Update screenshots

* Screenshot update take 2

* Improve \sqrt SVG paths

* Fix lint error
2019-05-25 18:39:16 -04:00
Ron Kok
17e89efdfc Fix \pmb (#1924)
* Fix \pmb

* Update screenshots

* Use \mathbf for MathML
2019-05-25 11:03:03 +09: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
Ron Kok
6b0f06df21 Improve MathML fonts (#1965) 2019-05-19 19:24:34 -04:00
Ron Kok
c8f2783ca8 Remove unclosed TODO comment (#1979) 2019-05-18 18:32:44 -04:00
Ron Kok
9822414733 Render MathML directly (#1966)
* Render MathML

* Fix lint error

* Change from main api to rendering options
2019-05-13 19:31:04 -04:00
Ben Dyer
4f2da04e5d Add test for double square brackets to katex-spec (#1956) 2019-05-12 23:25:25 -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
mbarkhau
17bfb247b8 Fix broken link (#1962) 2019-04-30 11:01:04 -04:00
Thomas Mathew
fb103bb147 Include extensions mhchem & copy-tex in home-page (#1932)
* Include extensions mhchem & copy-tex in website home-page

* Use relative link to mhchem and copy-tex

- Included relative links extensions mhchem & copy-tex in website/pages/index.html
- Included copy commands in website/lib/build.js. Will be used in 'yarn build'
- Included 2 more files in .gitignore

* Correct CDN path of extensions

* tweak grammar and alignment of a comment
2019-04-28 20:29:49 -04:00
Erik Demaine
5aad8f9f32 Test for duplicate symbols/macros (#1955)
* Test for duplicate symbols/macros

We've had a few cases where we accidentally include the same symbol or macro
definition in both macros.js and symbols.js.  This new test automatically
detects these scenarios during Jest testing.

* Fix lint errors
2019-04-28 19:52:39 -04:00
ylemkimon
664dc6ab74 Add more documentation on font loading & prefetch fonts on the website (#1895)
* Add more documentation on font loading

* Prefetch fonts on the website
2019-04-28 18:44:34 -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
Erik Demaine
2d066097ad Remove redundant symbols from #1947 (#1954)
https://github.com/KaTeX/KaTeX/pull/1947#pullrequestreview-230534608
2019-04-25 09:46:22 -04: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
Ron Kok
0461e17c8e Prevent inadvertent tall delims (#1948) 2019-04-24 00:59:32 +09:00
ylemkimon
f948947736 Add KaTeX version to stylesheet and troubleshooting guide (#1893)
* Add KaTeX version to stylesheet

* Add troubleshooting guide

* Update katex.less

[skip ci]
2019-04-18 22:10:19 +09:00
Daniel Hollas
e7193227f6 Move custom colors used by Khan into macros.js (#1933) 2019-04-17 22:22:02 -04:00
Jude Fernandes
41dd71c241 Added Android library (#1943)
* Added Android library 

Added a link to the android library for katex rendering.

* Update the name to include correct capitalization
2019-04-17 22:08:09 -04:00
Ron Kok
f1a83dd3bf Improve MathML for \Bbbk (#1930)
* Improve MathML for \Bbbk

* Use a simpler macro
2019-04-17 08:02:23 -07:00
ylemkimon
6323702874 Add Browserstack logo (#1879)
To apply for their open-source program.
2019-04-17 10:35:54 -04:00
ylemkimon
b9deec098f Load fonts before running screenshotter (#1891) 2019-04-07 18:15:05 +09:00
ylemkimon
7d7c55c4c7 Approximate font metrics only when metrics don't exist (#1898)
Fix non-existent metrics error for \eth
2019-04-06 18:24:32 -04:00
ylemkimon
a3c95d8c13 Fix Users' logo and url (#1896)
* Fix 404 on stackedit_logo.svg

* Fix 404 on Observable logo and url
2019-04-06 18:13:01 -04:00
Ron Kok
eeb403fc5c Improve MathML for \not (#1923)
* Improve MathML for \not

* Move into previous loop

* Update buildMathML.js
2019-04-06 10:40:00 +09: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
Ron Kok
ac4c6271d4 Improve MathML for \genfrac barline (#1925) 2019-04-05 14:36:30 +09:00
Ron Kok
ec777b8f34 Improve MathML for environments (#1910)
* Improve MathML for environments

* Fix lint error

* Adjust column spacing

* Fix lint error

* Add comment

* Shorten one line of code

* Fix error in previous commit

* Fix lint error

* Improved column spacing

* Revise types
2019-04-05 01:08:24 +09:00
Ron Kok
ab7b7826ff \Improve MathML for \colorbox and \fcolorbox (#1914)
* Add border color

* Fix lint errors

* Edit to persuade flow its okay.

* Add \colorbox
2019-04-04 18:19:19 +09:00
Ron Kok
5d29a28c14 Improve MathML for \tag (#1915)
* Improve MathML for \tag

* Make a duplicate pad

* Add TODO

* Add semi-colon
2019-04-02 09:39:31 -07:00
georges-gomes
31c02f2976 Added 'katex-element' (#1905)
* Added 'katex-element'

* Update docs/libs.md

Co-Authored-By: georges-gomes <georges.gomes@gmail.com>

* Added colon between name and description

Like others
2019-04-01 09:59:55 -04:00
Ron Kok
01a94d5f07 Improve MathML for fractions (#1882)
* Improve MathML for fractions

* Fix lint errors

* Revise arguments

* Reverting to previous arguments

* Revise arguments

* Pick up comment

* Change > to >=
2019-03-29 07:17:22 -07:00
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