/ stream.nieuweinstituut.nl / node_modules / katex /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]dist/2 years ago -  
[DIR]src/2 years ago -  
[TXT]LICENSE.txt10 years ago1.3K 
[TXT]README.md9 years ago3.6Kd768d73 docs [كارل مبارك]
[   ]cli.js9 years ago927  
[   ]katex.js9 years ago2.2K 
[   ]package.json2 years ago1.6K3e510ca test new git [كارل مبارك]
README.md

KaTeX Build Status

Join the chat at https://gitter.im/Khan/KaTeX

KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.

KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, and IE 8 - IE 11. A list of supported commands can be on the wiki.

Usage

You can download KaTeX and host it on your server or include the katex.min.js and katex.min.css files on your page directly from a CDN:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.js"></script>

In-browser rendering

Call katex.render with a TeX expression and a DOM element to render into:

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:

var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}");
// '<span class="katex">...</span>'

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.

Rendering options

You can provide an object of options as the last argument to katex.render and katex.renderToString. Available options are:

For example:

katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, { displayMode: true });

Automatic rendering of math on a page

Math on the page can be automatically rendered using the auto-render extension. See the Auto-render README for more information.

Contributing

See CONTRIBUTING.md

License

KaTeX is licensed under the MIT License.

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80