mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 04:36:50 +00:00
Update to KaTeX v0.1.1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# [<img src="https://khan.github.io/KaTeX/katex-logo.svg" width="130" alt="KaTeX">](http://khan.github.io/KaTeX/) [](https://travis-ci.org/Khan/KaTeX)
|
||||
# [<img src="https://khan.github.io/KaTeX/katex-logo.svg" width="130" alt="KaTeX">](https://khan.github.io/KaTeX/) [](https://travis-ci.org/Khan/KaTeX)
|
||||
|
||||
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
|
||||
|
||||
@@ -14,8 +14,8 @@ KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, and
|
||||
Download the built files from [the releases page](https://github.com/khan/katex/releases). Include the `katex.min.js` and `katex.min.css` files on your page:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" type="text/css" href="/path/to/katex.min.css">
|
||||
<script src="/path/to/katex.min.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="/path/to/katex.min.css">
|
||||
<script src="/path/to/katex.min.js"></script>
|
||||
```
|
||||
|
||||
Call `katex.render` with a TeX expression and a DOM element to render into:
|
||||
@@ -33,10 +33,18 @@ 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.
|
||||
|
||||
These APIs default to inline math typesetting; for display math you can prepend `\displaystyle` ([#66](https://github.com/Khan/KaTeX/issues/66)):
|
||||
|
||||
```js
|
||||
katex.render("\\displaystyle " + formula, element);
|
||||
// OR
|
||||
var html = katex.renderToString("\\displaystyle " + formula);
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
KaTeX is licenced under the [MIT License](http://opensource.org/licenses/MIT).
|
||||
KaTeX is licensed under the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Reference in New Issue
Block a user