mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Update to KaTeX v0.5.1
This commit is contained in:
parent
026c84197f
commit
f405a89b28
@ -70,7 +70,7 @@ For more flexibility the KaTeX widget can also be used via the full widget synta
|
||||
|
||||
! Error Handling
|
||||
|
||||
An warning message is displayed if KaTeX detects a problem with the ~LaTeX syntax. For example:
|
||||
Any LaTeX syntax errors are flagged with the problematic syntax highlighted. For example:
|
||||
|
||||
```
|
||||
$$\displaystyle f(x) = \int_{-\infty}^\infinity\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi$$
|
||||
|
@ -59,7 +59,7 @@ See [[Alice in Wonderland]] for an example. Try opening it without a network con
|
||||
|
||||
!! Hackability Improvements
|
||||
|
||||
* Updated to KaTeX v0.5.0, with [[several new features|https://github.com/Khan/KaTeX/releases/tag/v0.5.0]]
|
||||
* Updated to KaTeX v0.5.1, with [[several new features|https://github.com/Khan/KaTeX/releases]]
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/c4397792f5d396288048bcc3bb4ee8e95dbc2c5e]] added [[recent Operator]]
|
||||
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/e0aacc84d5f084ff7a53153c590fbff3d24f2e2c]] `publishFilter` to default save template
|
||||
* [[Allow|https://github.com/Jermolene/TiddlyWiki5/commit/7dddc925ae93725552b98bc348a07572895da96c]] ''delete'' button to be used in the tiddler view-mode toolbar
|
||||
|
@ -44,6 +44,8 @@ Make sure to include the CSS and font files, but there is no need to include the
|
||||
You can provide an object of options as the last argument to `katex.render` and `katex.renderToString`. Available options are:
|
||||
|
||||
- `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`)
|
||||
- `throwOnError`: `boolean`. If `true`, KaTeX will throw a `ParseError` when it encounters an unsupported command. If `false`, KaTeX will render the unsupported command as text in the color given by `errorColor`. (default: `true`)
|
||||
- `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color which unsupported commands are rendered in. (default: `#cc0000`)
|
||||
|
||||
For example:
|
||||
|
||||
|
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.woff
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.woff
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.woff
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.woff2
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Bold.woff2
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Italic.woff
Normal file
Binary file not shown.
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Regular.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Regular.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Regular.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_SansSerif-Regular.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.eot
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.eot
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.ttf
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.ttf
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.woff
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.woff
Normal file
Binary file not shown.
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.woff2
Normal file
BIN
plugins/tiddlywiki/katex/files/fonts/KaTeX_Script-Regular.woff2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
plugins/tiddlywiki/katex/files/katex.min.css
vendored
2
plugins/tiddlywiki/katex/files/katex.min.css
vendored
File diff suppressed because one or more lines are too long
11
plugins/tiddlywiki/katex/files/katex.min.js
vendored
11
plugins/tiddlywiki/katex/files/katex.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -35,12 +35,13 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Get the source text
|
||||
var text = this.getAttribute("text",this.parseTreeNode.text || "");
|
||||
// Render it into a span
|
||||
var span = this.document.createElement("span");
|
||||
var span = this.document.createElement("span"),
|
||||
options = {throwOnError: false};
|
||||
try {
|
||||
if(!this.document.isTiddlyWikiFakeDom) {
|
||||
katex.render(text,span);
|
||||
katex.render(text,span,options);
|
||||
} else {
|
||||
span.innerHTML = katex.renderToString(text);
|
||||
span.innerHTML = katex.renderToString(text,options);
|
||||
}
|
||||
} catch(ex) {
|
||||
span.className = "tc-error";
|
||||
|
Loading…
Reference in New Issue
Block a user