All scientific figure guides
Vector Interoperability·4 min read·Updated 2026-11-24

Exporting Vector LaTeX Equations as Pure SVG Paths for Adobe Illustrator, Inkscape & PDF

Why KaTeX <foreignObject> HTML fails inside Illustrator and PDF workflows, and how pure-<path> MathJax SVG equations stay sharp and re-editable.

The <foreignObject> trap in web equation editors

Many browser canvas tools render LaTeX formulas using HTML/CSS spans wrapped inside an SVG <foreignObject> element. While that renders in Chrome or Safari, opening the exported .svg in Adobe Illustrator, Affinity Designer, Inkscape, or passing it to svg2pdf.js strips or blanks out the entire equation because vector desktop editors do not implement an HTML layout engine.

The workaround most researchers fall back to—screenshotting an equation editor as a PNG—introduces fuzzy anti-aliasing and fixed dark text colors that cannot be recolored when moving between poster slides and journal columns.

Pure-<path> MathJax SVG compilation in the browser

DrawFigures pairs two MIT/Apache-2.0 libraries in the client browser: KaTeX provides zero-latency keystroke preview and syntax diagnostics as you type, and MathJax (mathjax-full) compiles the confirmed TeX expression into standalone vector glyph <path> and <use> geometry with explicit viewBox dimensions.

  • —Zero <foreignObject> elements and zero external webfont dependencies required when opening the SVG in Illustrator or Inkscape.
  • —Recoloring works identically to any biological vector icon via internal path color mapping in the Edit ribbon.
  • —Double-clicking any placed equation on the canvas reopens its original LaTeX string without losing position or scale.
Example biophysical rate & thermodynamic expressions supported cleanly
v_0 = \frac{V_{\max}[S]}{K_m + [S]}
\Delta G^\circ = \Delta H^\circ - T\Delta S^\circ
k_{\text{obs}} = k_{\text{on}}[L] + k_{\text{off}}