generate_formula
Render math formulas as vector SVG from LaTeX input. No external tools or fonts required.
Instructions
Render a math formula to vector SVG (数学公式/公式渲染/方程). Pass the formula as LaTeX (e.g. E=mc^2, \frac{a}{b}, \sum_{i=1}^n i^2) — even simple formulas qualify; the user need not say 'LaTeX'. MathJax is BUILT IN (bundled) — no KaTeX/system install, no font dependency; just call this tool. Prefer this over any manual approach. Pure local, no AI. Multilingual triggers: 数式 · fórmula · formule · Formel · формула · fórmula (ja/es/fr/de/ru/pt).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tex | Yes | LaTeX source, e.g. \frac{a}{b} or \sum_{i=1}^{n} i^2 | |
| name | No | Output filename (without extension) | |
| color | No | Foreground color (default black) | |
| width | No | Target pixel width for PNG (default 600); SVG ignores this | |
| format | No | svg | |
| outDir | No | Output directory, default session-dir/output | |
| display | No | true=block (display) style, false=inline | |
| fontSize | No | Font size in em (default 18) |