CodeMirror-MathJax
CodeMirror-MathJax copied to clipboard
Experimenting to replace $math$ with formulas inside CodeMirror
Currently I'm only handling [re]newcommand, MathJax does more.
Generate script tags instead of assuming all 4 delimiters were defined in `MathJax.Hub.Config(`. Or somehow DRY mathjax's and our config. Or at least clarify in the README that this config...
I expected empty rendering (suboptimal, #10) or visible "$\newcommand{\foo}{bar}$" but not just the dollars. What happens is my \newcommand visibility special casing sends this to MathJax: ``` $\newcommand{\foo}{bar}$ \($\newcommand{\foo}{bar}$\) ```...
Recognize and render `...`. Bonus points for namespaced use: ``` ... ... ... ``` I don't see any point in verifying the scoped namespace prefix, just assume any prefixed `math`...
[spin off from https://github.com/cben/mathdown/issues/56#issuecomment-108872386] Using heap profiling on my [~100K document](http://mathdown.net/?doc=CS3X9O9FQgI), I see Chrome heap dump usage mainly consists of 50~60MB of DOM and ~40MB of CodeMirror.Lines arranged in a...
Needs changes in CM's markdown mode: 1. Recognize $...$ and don't parse stuff like _ and \* inside it. (a-la backticks `...`) 2. Adopt pandoc-like rule where _ and \*...
used to be very broken? currently seems mostly harmless (but not all math gets re-rendered). At least CM widgets must be re-measured for correctness.
gives `Uncaught TypeError: Cannot read property 'MathJax' of undefined` in console
KaTeX has this clever tweak which IIUC avoids breaks between math & adjacent punctuation: ``` white-space: nowrap; .katex-inner { // Making .katex inline-block allows line breaks before and after, //...
Sometimes all rendering stops, until reload :-( ``` Object render-math.js:46 34.382s typesetting $\ce{$ … render-math.js:46 34.394s done typesetting $\ce{$ render-math.js:53 34.394s CodeMirror.Posch: 28line: 7__proto__: CodeMirror.Posrender-math.js:53 error render-math.js:46 34.395s unrendering math...