TensorNetwork / tensornetwork.org

Source for The Tensor Network open-source review article
https://tensornetwork.org
Apache License 2.0
150 stars 52 forks source link

MathJax: Disable preview, use SVG output #7

Closed claudius-hubig closed 4 years ago

claudius-hubig commented 4 years ago

Hi,

this commit disables the "fast preview" MathJax feature and switches from HTML-CSS to SVG output.

The former is not very useful: if there are few inline equations, rendering them is relatively fast, if there are many multi-line equations, the fast preview mode is unbelievable ugly and nearly completely useless; as such, it is necessary to wait for the full rendering anways.

The latter is motivated by much better rendering with SVG in equations with many indices (such as tensors), see the two pictures below:

With HTML-CSS:

With HTML-CSS

With SVG:

With SVG

Notice that the commas between m_{j-1} and m_j are nearly completely hidden in the HTML-CSS output but very visible in the SVG output. As a side effect, at least for me the SVG also renders much faster than the HTML-CSS.

emstoudenmire commented 4 years ago

Good idea - thanks for the improvement!