Integration of MathJax, KaTeX and Asymptote with scribble, to typeset math in Racket documentation
Go to file
Ben Eater 62af02bd4e Empty the output element before parsing the input
If there's an exception while parsing (because it's something katex doesn't support), the output doesn't get cleared. Typically when this happens, we'll fall back to MathJax and render that in a different element, leaving the previous KaTex-formatted math plus the new MathJax-formatted math next to each other in the page, which is never what you'd want.

Test Plan: Using the fallback mechanism in khan-exercises utils/tex.js, render something katex can deal with, like "3", then using the same element, reprocess with something katex can't deal with, like "\approx 3". Previously the result would be "3 \approx 3" (with the first 3 being left over from the original katex rendering. With this change, only the "\approx 3" remains on the page.

Auditors: alex, alpert
2013-11-12 14:09:13 -08:00
build Add a setup rule to Makefile 2013-07-30 13:54:43 -07:00
static Fix sizing 2013-08-22 17:14:55 -07:00
test Make supsub work with empty nucleus 2013-08-17 16:14:06 -07:00
.arcconfig Rename everything to KaTeX 2013-07-10 14:08:50 -07:00
.gitignore Rewrite the parser 2013-07-12 23:16:30 -07:00
buildTree.js Add percent sign 2013-09-13 16:10:34 -07:00
domTree.js Add ability to calculate heights/depths 2013-08-13 18:16:43 -07:00
fontMetrics.js Add some AMS characters 2013-08-14 17:39:24 -07:00
katex.js Empty the output element before parsing the input 2013-11-12 14:09:13 -08:00
Lexer.js Always throw real ParseErrors 2013-07-28 17:54:41 -07:00
Makefile Add ability to calculate heights/depths 2013-08-13 18:16:43 -07:00
metric_parse.rb Add some AMS characters 2013-08-14 17:39:24 -07:00
Options.js Add sizing functions (like \small) 2013-08-21 20:22:24 -07:00
package.json Update browserify 2013-09-13 16:23:19 -07:00
ParseError.js Make ParseErrors differentiable from other Errors 2013-07-22 14:46:13 -07:00
Parser.js Add percent sign 2013-09-13 16:10:34 -07:00
parseTree.js Remove Parser options usage 2013-07-13 18:15:17 -07:00
server.js Add ability to calculate heights/depths 2013-08-13 18:16:43 -07:00
Style.js Add ability to calculate heights/depths 2013-08-13 18:16:43 -07:00
utils.js Add ability to calculate heights/depths 2013-08-13 18:16:43 -07:00