From f2aba29d94cddcff6d7c188c4aa0b668995d8002 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sun, 31 Jan 2021 15:11:12 +0000 Subject: [PATCH] Update to KaTeX v0.12.0 --- plugins/tiddlywiki/katex/files/README.md | 159 +- .../katex/files/fonts/KaTeX_AMS-Regular.ttf | Bin 70972 -> 70936 bytes .../katex/files/fonts/KaTeX_AMS-Regular.woff | Bin 38868 -> 36912 bytes .../katex/files/fonts/KaTeX_AMS-Regular.woff2 | Bin 32944 -> 31136 bytes .../files/fonts/KaTeX_Caligraphic-Bold.ttf | Bin 19316 -> 15416 bytes .../files/fonts/KaTeX_Caligraphic-Bold.woff | Bin 11696 -> 9376 bytes .../files/fonts/KaTeX_Caligraphic-Bold.woff2 | Bin 10448 -> 8392 bytes .../files/fonts/KaTeX_Caligraphic-Regular.ttf | Bin 18684 -> 14908 bytes .../fonts/KaTeX_Caligraphic-Regular.woff | Bin 11460 -> 9148 bytes .../fonts/KaTeX_Caligraphic-Regular.woff2 | Bin 10240 -> 8248 bytes .../katex/files/fonts/KaTeX_Fraktur-Bold.ttf | Bin 35660 -> 24400 bytes .../katex/files/fonts/KaTeX_Fraktur-Bold.woff | Bin 22632 -> 16208 bytes .../files/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 20360 -> 13912 bytes .../files/fonts/KaTeX_Fraktur-Regular.ttf | Bin 34352 -> 23904 bytes .../files/fonts/KaTeX_Fraktur-Regular.woff | Bin 22088 -> 15880 bytes .../files/fonts/KaTeX_Fraktur-Regular.woff2 | Bin 19784 -> 13668 bytes .../katex/files/fonts/KaTeX_Main-Bold.ttf | Bin 60784 -> 59972 bytes .../katex/files/fonts/KaTeX_Main-Bold.woff | Bin 35464 -> 35056 bytes .../katex/files/fonts/KaTeX_Main-Bold.woff2 | Bin 30244 -> 29932 bytes .../files/fonts/KaTeX_Main-BoldItalic.ttf | Bin 44496 -> 42872 bytes .../files/fonts/KaTeX_Main-BoldItalic.woff | Bin 25352 -> 24500 bytes .../files/fonts/KaTeX_Main-BoldItalic.woff2 | Bin 21944 -> 21244 bytes .../katex/files/fonts/KaTeX_Main-Italic.ttf | Bin 47640 -> 46028 bytes .../katex/files/fonts/KaTeX_Main-Italic.woff | Bin 26228 -> 25352 bytes .../katex/files/fonts/KaTeX_Main-Italic.woff2 | Bin 22748 -> 22076 bytes .../katex/files/fonts/KaTeX_Main-Regular.ttf | Bin 69520 -> 68880 bytes .../katex/files/fonts/KaTeX_Main-Regular.woff | Bin 38112 -> 37856 bytes .../files/fonts/KaTeX_Main-Regular.woff2 | Bin 32464 -> 32312 bytes .../files/fonts/KaTeX_Math-BoldItalic.ttf | Bin 39308 -> 42300 bytes .../files/fonts/KaTeX_Math-BoldItalic.woff | Bin 22324 -> 23980 bytes .../files/fonts/KaTeX_Math-BoldItalic.woff2 | Bin 19720 -> 21192 bytes .../katex/files/fonts/KaTeX_Math-Italic.ttf | Bin 40992 -> 44484 bytes .../katex/files/fonts/KaTeX_Math-Italic.woff | Bin 22844 -> 24668 bytes .../katex/files/fonts/KaTeX_Math-Italic.woff2 | Bin 20096 -> 21668 bytes .../files/fonts/KaTeX_SansSerif-Bold.ttf | Bin 33688 -> 32588 bytes .../files/fonts/KaTeX_SansSerif-Bold.woff | Bin 18516 -> 17988 bytes .../files/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 15732 -> 15296 bytes .../files/fonts/KaTeX_SansSerif-Italic.ttf | Bin 30960 -> 29860 bytes .../files/fonts/KaTeX_SansSerif-Italic.woff | Bin 17572 -> 17044 bytes .../files/fonts/KaTeX_SansSerif-Italic.woff2 | Bin 15024 -> 14484 bytes .../files/fonts/KaTeX_SansSerif-Regular.ttf | Bin 29812 -> 28708 bytes .../files/fonts/KaTeX_SansSerif-Regular.woff | Bin 16228 -> 15712 bytes .../files/fonts/KaTeX_SansSerif-Regular.woff2 | Bin 13708 -> 13300 bytes .../files/fonts/KaTeX_Script-Regular.ttf | Bin 24620 -> 23520 bytes .../files/fonts/KaTeX_Script-Regular.woff | Bin 13428 -> 12992 bytes .../files/fonts/KaTeX_Script-Regular.woff2 | Bin 12064 -> 11792 bytes .../katex/files/fonts/KaTeX_Size1-Regular.ttf | Bin 12916 -> 11932 bytes .../files/fonts/KaTeX_Size1-Regular.woff | Bin 6696 -> 6300 bytes .../files/fonts/KaTeX_Size1-Regular.woff2 | Bin 5592 -> 5332 bytes .../katex/files/fonts/KaTeX_Size2-Regular.ttf | Bin 12172 -> 11080 bytes .../files/fonts/KaTeX_Size2-Regular.woff | Bin 6436 -> 6012 bytes .../files/fonts/KaTeX_Size2-Regular.woff2 | Bin 5392 -> 5080 bytes .../katex/files/fonts/KaTeX_Size3-Regular.ttf | Bin 8120 -> 7028 bytes .../files/fonts/KaTeX_Size3-Regular.woff | Bin 4568 -> 4148 bytes .../files/fonts/KaTeX_Size3-Regular.woff2 | Bin 3728 -> 3400 bytes .../katex/files/fonts/KaTeX_Size4-Regular.ttf | Bin 11016 -> 10008 bytes .../files/fonts/KaTeX_Size4-Regular.woff | Bin 6184 -> 5820 bytes .../files/fonts/KaTeX_Size4-Regular.woff2 | Bin 5028 -> 4720 bytes .../files/fonts/KaTeX_Typewriter-Regular.ttf | Bin 35924 -> 34560 bytes .../files/fonts/KaTeX_Typewriter-Regular.woff | Bin 20260 -> 19700 bytes .../fonts/KaTeX_Typewriter-Regular.woff2 | Bin 17272 -> 16868 bytes plugins/tiddlywiki/katex/files/katex.css | 1035 +++++ plugins/tiddlywiki/katex/files/katex.js | 4101 +++++++++-------- plugins/tiddlywiki/katex/files/katex.min.css | 2 +- plugins/tiddlywiki/katex/files/katex.min.js | 2 +- .../files/katex.without-font-face.min.css | 2 +- plugins/tiddlywiki/katex/files/mhchem.min.js | 1684 +------ .../tiddlywiki/katex/files/tiddlywiki.files | 4 +- plugins/tiddlywiki/katex/plugin.info | 2 +- plugins/tiddlywiki/katex/readme.tid | 2 +- plugins/tiddlywiki/katex/wrapper.js | 12 - 71 files changed, 3399 insertions(+), 3606 deletions(-) create mode 100644 plugins/tiddlywiki/katex/files/katex.css diff --git a/plugins/tiddlywiki/katex/files/README.md b/plugins/tiddlywiki/katex/files/README.md index 27f2bc128..307fdbf94 100644 --- a/plugins/tiddlywiki/katex/files/README.md +++ b/plugins/tiddlywiki/katex/files/README.md @@ -1,135 +1,86 @@ -# [KaTeX](https://khan.github.io/KaTeX/) -[![Build Status](https://travis-ci.org/Khan/KaTeX.svg?branch=master)](https://travis-ci.org/Khan/KaTeX) -[![codecov](https://codecov.io/gh/Khan/KaTeX/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/KaTeX) -[![Join the chat at https://gitter.im/Khan/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# [KaTeX](https://katex.org/) +[![npm](https://img.shields.io/npm/v/katex.svg)](https://www.npmjs.com/package/katex) +[![CircleCI](https://circleci.com/gh/KaTeX/KaTeX.svg?style=shield)](https://circleci.com/gh/KaTeX/KaTeX) +[![codecov](https://codecov.io/gh/KaTeX/KaTeX/branch/master/graph/badge.svg)](https://codecov.io/gh/KaTeX/KaTeX) +[![Join the chat at https://gitter.im/KaTeX/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/KaTeX/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=KaTeX/KaTeX)](https://dependabot.com) +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/katex/badge?style=rounded)](https://www.jsdelivr.com/package/npm/katex) +![](https://img.badgesize.io/KaTeX/KaTeX/v0.12.0/dist/katex.min.js?compression=gzip) KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. * **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://www.intmath.com/cg5/katex-mathjax-comparison.php). - * **Print quality:** KaTeX’s layout is based on Donald Knuth’s TeX, the gold standard for math typesetting. + * **Print quality:** KaTeX's layout is based on Donald Knuth's TeX, the gold standard for math typesetting. * **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources. * **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML. -KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9 - IE 11. More information can be found on the [list of supported commands](https://khan.github.io/KaTeX/function-support.html) and on the [wiki](https://github.com/khan/katex/wiki). +KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11. -## Usage +KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://katex.org/docs/supported.html). -You can [download KaTeX](https://github.com/khan/katex/releases) and host it on your server or include the `katex.min.js` and `katex.min.css` files on your page directly from a CDN: +Try out KaTeX [on the demo page](https://katex.org/#demo)! + +## Getting started + +### Starter template ```html - - + + + + + + + + + + + + + ... + ``` -#### In-browser rendering +You can also [download KaTeX](https://github.com/KaTeX/KaTeX/releases) and host it yourself. -Call `katex.render` with a TeX expression and a DOM element to render into: +For details on how to configure auto-render extension, refer to [the documentation](https://katex.org/docs/autorender.html). -```js -katex.render("c = \\pm\\sqrt{a^2 + b^2}", element); -``` - -If KaTeX can't parse the expression, it throws a `katex.ParseError` error. - -#### Server side rendering or rendering to a string - -To generate HTML on the server or to generate an HTML string of the rendered math, you can use `katex.renderToString`: - -```js -var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}"); -// '...' -``` - -Make sure to include the CSS and font files, but there is no need to include the JavaScript. Like `render`, `renderToString` throws if it can't parse the expression. - -#### Security - -Any HTML generated by KaTeX *should* be safe from `