JiangYan38 downloadsA visual LaTeX formula editor: live preview, symbol palette, templates, favorites, and multi-format export.
v3.4.2 — A visual LaTeX formula editor for Obsidian: live preview on top, LaTeX source below, an option bar in between, and a collapsible side pane holding symbols, templates and favorites.
一个显式的上下分栏公式编辑器:上方实时渲染、下方编辑 LaTeX 源码,中间选项栏控制字号 / 字体 / 颜色并提供行内、行间两种插入方式;右侧可展开侧边栏承载常用符号、公式模板与收藏夹。
侧边栏三页(快捷工具 / 公式模板 / 收藏夹)中的公式与符号均由宿主 MathJax 渲染,字体与笔记 正文里的公式完全一致(Computer Modern / TeX)。
图像导出(SVG / PNG)走 MathJax 原生 SVG 输出:字形是内嵌的矢量路径,不依赖任何字体文件, 导出的图在任何查看器里都与预览逐像素一致,且可无限缩放。
| Three entry points | ribbon icon, editor right-click menu (Insert formula with MathBox), command MathBox: Open MathBox formula editor (no default hotkey — bind your own in Settings → Hotkeys) |
| Live preview | rendered through the host MathJax (renderMath), 200 ms debounce, errors reported without blanking the last good render |
| Option bar | font size / font family / color / environment on the left; Insert inline · Insert display on the right |
| Display font size | the preview and the source pane each have their own − value + stepper, left of Favorite / Copy: 1 px steps, or click the number and type a value (Enter or blur applies, Esc cancels, clearing it resets); preview 12–30 px, source 11–30 px, persisted across restarts |
| Source pane | monospace editor with copy / clear; pasting strips $, $$, \(\), \[\] delimiters automatically |
| Symbol palette | 13 groups / 370 items, every button rendered as a real formula (Computer Modern / TeX); lazy-rendered with a per-formula cache so the pane opens instantly |
| Formula templates | 9 groups / 66 items, each entry previewed as a rendered formula instead of raw LaTeX |
| Favorites | search / pin / rename / regroup / delete; stored in the plugin's data.json, JSON import & export |
| Hover hints | two-line tooltip: line 1 the LaTeX source, line 2 a Chinese / English description (all 370 symbols covered) |
| Matrix entries | buttons preview a 2×2 case (a₁₁ … a₂₂) and insert a 2×2 skeleton with & / \\ already in place; arbitrary sizes via the custom matrix dialog |
| Export | LaTeX, MathML, SVG (native vector — glyphs as paths, no font dependency), PNG at 3×; white or transparent background, switchable right in the export menu |
| i18n | 简体中文 / English, auto follows the app language |
| Theme | every color comes from Obsidian CSS variables; icons are Lucide via setIcon |
− / + stepper above to scale the preview (and the one above the
source pane to scale the code), or apply font size / font / color to the formula itself.Ctrl+Z undoes it.If a selection that looks like LaTeX (starts with \, or is wrapped in $…$) is present when the
panel is opened from the menu or the hotkey, it is pre-filled into the source pane.
Side-pane symbol order: Common → Greek → Relations → Arrows → Sets & Logic → Fractions → Radicals → Limits → Trigonometry → Integrals → Large operators → Brackets → Arrays & matrices.
−/+ steppers inside the
panel write back to these two values; a ↺ button in front of each field restores that row only
to the software default (preview 18 px, source 13 px — the measured v3.4.0 baseline)\vb{}, \abs{},
\dv{}{}, …) as standard LaTeX so the formula stays portable outside Obsidian$$x$$ on one line vs. a fenced block on its own lines| Version | Highlights |
|---|---|
| 3.4.2 | Plugin id renamed to math-box — rename the plugin folder to math-box when upgrading (settings/favorites are preserved with the folder, then re-enable the plugin); settings searchable via declarative getSettingDefinitions() (Obsidian 1.13+); no default hotkey anymore (bind your own in Settings → Hotkeys); host requestUrl instead of fetch; removed deprecated execCommand fallback; CSS lint cleanup (zero !important, dropped partially-supported CSS); release assets now ship build-provenance attestations |
| 3.4.1 | Display font size for the preview and the source pane: − value + steppers left of Favorite / Copy, buttons sized like the neighbouring icon buttons, click the value to type (Enter/blur applies, Esc cancels without closing the panel, clearing resets), 1 px steps, preview 12–30 px / source 11–30 px, persisted; the two sizes are exposed as default sizes in settings with a per-row ↺ reset |
| 3.4.0 | Image export switched to native MathJax SVG output (glyphs as <path>, no font dependency, ~7 KB vs ~288 KB); white / transparent background switchable in the export menu; size gate raised to 2000 KB |
| 3.3.0 | Side pane fully rendered through host MathJax (symbols, templates, favorites); two-line hover hints; matrix previews + 2×2 insertion skeletons; group re-ordering; 370 bilingual remarks |
| 3.2.x | Favorites groups, adaptive option bar, panel/tab/popout entry points |
| 3.0.0 | Renamed to MathBox; three-column layout with collapsible side pane; multi-format export |
| 2.0.0 | Right-click invoked three-pane editor (render / source / templates) |
| 1.0.0 | Inline palette on inserting a formula block |
This plugin follows the official Obsidian sample plugin structure (TypeScript + esbuild).