Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 790 Bytes

tex-svg.html.md

File metadata and controls

19 lines (14 loc) · 790 Bytes

This example shows how to use the tex-svg component to process a complete HTML page containing TeX notation into math in SVG format.

The key lines are

  <script>
  MathJax = {
    tex: {inlineMath: [['$', '$'], ['\\(', '\\)']]},
    svg: {fontCache: 'global'}
  };
  </script>
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>

which configures the TeX input jax to include single dollar signs as in-line math delimiters and the SVG output jax to use a global font-path cache, and then loads the tex-svg component. The rest is handled by MathJax automatically.

Run the example