www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit b2fbd08871512eb11a268ebc20fa7604aaf616ab
parent dbc658f748cbfc8dc194adabfd867d0a93da105a
Author: Ben Alpert <ben@benalpert.com>
Date:   Fri,  3 Apr 2015 20:48:51 -0700

Update README.md
Diffstat:
MREADME.md | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -26,6 +26,8 @@ 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`: @@ -35,7 +37,7 @@ 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. +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