cben / CodeMirror-MathJax

Experimenting to replace $math$ with formulas inside CodeMirror
http://cben.github.io/CodeMirror-MathJax/demo.html
Other
20 stars 3 forks source link

support user switching mathjax renderer (e.g. SVG) #29

Open cben opened 10 years ago

cben commented 10 years ago

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.

cben commented 9 years ago

HTML-CSS <-> SVG switching seems to work mostly fine (Chrome and FF on linux). Although cursor positioning is somewhat off (should call .changed() on the CM widgets).

But MathML in FF works immediately but any further rendering (or reload) results in the math disappearing (empty widget in the DOM). This also makes it tricky to go back to a working renderer; the only remaining math you can right-click is the Mathdown logo on top :-)

cben commented 9 years ago

Related: in SVG and MathML modes, the math is always black, instead of adapting the surrounding color of lists, quotations etc.

For SVG, https://groups.google.com/forum/#!topic/mathjax-users/--UzmyRg0Zw suggests \color or CSS targetting svg { stroke: ... fill: ... }.