strangelion3k downloadsVisual LaTeX editing, a searchable formula library, customizable templates, Mermaid diagrams, and parameter-driven function plotting for Obsidian.
中文文档 | English Doc
Core formula conversion requires Formula Library 1.6.0 or later.
Visual LaTeX editing, local formula format conversion, a searchable formula library, customizable templates, Mermaid diagrams, and parameter-driven function plotting for Obsidian.
Formula Library helps you create, find, and reuse mathematical notation in your notes. It combines MathLive-based visual LaTeX editing with 2,216 built-in formulas across 19 categories, smart search, and independently configurable built-in and personal libraries.
Create your own parameterized templates, keep named presets, generate matrices from pasted tables, and explore functions with live parameter controls. The Mermaid editor includes 11 diagram templates, visual editing for flowcharts and state diagrams, live previews, and SVG export.
Favorites, pins, recent items, searchable annotations, full workspace backups, and recoverable drafts help keep your work organized. Responsive layouts, adjustable fonts and density, and English and Chinese interfaces adapt to different screens and workflows.
formulas/ folder is missing; switching a category off only hides it — favorites, pins, and history stay intact```mermaid blocks can be edited in place, the preview supports zoom/pan/fit and SVG export, unsupported syntax is detected before switching to visual editing, and the source is preserved with undo/redo, restore-original, and a draft that survives closing the modal\text{} before insertingy = f(x) from a typed expression - implicit multiplication, functions without parentheses, and the usual function set are supported, every letter other than x becomes a slider, and you can write your own function definitions plus per-curve local constants; curves can be overlaid with an automatic or manual range and a follow/light/dark theme, and the figure can be inserted as SVG, saved as an image embed, copied, or downloaded$...$ or $$...$$ and run command to editformulas/, or point the plugin at your own folder (relative to the vault root) whose categories are managed separatelymain.js, manifest.json, and styles.css from the same release..obsidian/plugins/formula-library/ inside your vault and place those three files in it.The installed plugin does not need Node.js, npm, src/, node_modules/, or a separate formulas/ directory.
strangelion/obsidian-formula-libraryOpen Settings → Formula Library and choose General, Appearance, Tools, Libraries or Backups. Arrow keys and Home/End switch the section tabs; the selected section is retained while the settings page refreshes.
Tools has independent switches for format conversion, parameterized templates, matrix data paste, saving to your library, function plotting and Mermaid diagrams. All are enabled by default. Disabled editor/sidebar buttons disappear immediately, and the related commands are unavailable; existing hotkey assignments and saved formulas, templates, presets, drafts and diagrams are retained. Disabling format conversion also stops its tasks and releases the engine. Re-enable a tool here when needed; ordinary formula editing remains available even with every optional tool switched off.
These switches control availability, not installed bundle size. Personal library management remains under Libraries even if the editor's save button is hidden. Full backups include these preferences; restoring them requires selecting the option to restore interface/category settings.
Ctrl+P → "Open Formula Editor"Shift+Enter) to write the formula to your noteMy templates: choose New template or Duplicate template to customize the name, category, LaTeX, parameter labels and defaults. For example: y = {{a}} \cdot x + {{b}}. Parameter names start with an ASCII letter and contain letters, digits or underscores. Personal templates can be edited, deleted with confirmation and used with presets; they persist in plugin settings. Built-in templates remain read-only.
Unnamed drafts still preview; a name is required only when saving. The preview substitutes defaults. Use \cdot explicitly for multiplication so numeric substitutions stay separate.
Command Palette: Ctrl+P → "Insert Parameterized Formula", or click Templates in the formula editor toolbar to fill the result into the editor
Pick a template and fill in the named parameters: the preview and the generated LaTeX update as you type
Parameter values may be plain numbers or LaTeX (\frac{1}{2}, \sigma, (-3)); leave a field empty to keep the template default
A value starting with - is parenthesized automatically, so -3 stays correct inside powers, products, and after a minus sign
Presets: save, apply, and delete up to 20 parameter combinations per template; presets persist across sessions
algebra exam), and the note can explain variable meanings, when the formula applies, or common rearrangements#algebra or part of a tag to find the entry, and words from the note match as wellmy-formulas/ in the vault root and records it as the custom library path in the settingsCtrl+P → "Paste Matrix Data", or click Paste matrix data in the formula editor toolbarleft & = right\text{} to turn non-ASCII or space-containing cells into \text{...}; numbers, ASCII variables, and existing LaTeX stay as they areCtrl+P → "Plot Function", or click Plot function in the formula editor toolbary = f(x) from an expression: + - * / ^, parentheses, implicit multiplication (2x, 3(x+1), x sin(x)), the usual functions (sin, cos, tan, ln, log10, sqrt, abs, min/max, pow, ...), and the constants pi and e; the parentheses are optional too (sinx means sin(x) and x sinx means x sin(x)), which makes sin2x mean sin(2) · x (write sin(2x) for the other reading), and a name in backticks (`sinx`) stays a plain variablex and the known constants becomes a slider (initial range -10 to 10, step 0.1). Enter exact numeric values or expand Range and step to customize each parameter; invalid bounds, out-of-range values and non-positive steps disable export until corrected.x and y ranges by hand or tick Auto y to derive the vertical range from the sampled quantilesf(x) = x^2 + a in the box at the top of the modal and call them from later definitions and from any curve; free variables of a definition (like a) become sliders, and a parameter name shadows the axis variable x inside that function. Recursion, forward references, repeated parameters, and names that clash with a built-in function are refused with the line numbera=2, b=a+1, so one letter can mean different things in different curves; when a name also has a slider, the local constant wins for that curve and no slider is created for itcurrentColor, so it adapts to light and dark notes), light, or dark; copying, downloading, or saving the figure as an image bakes the current theme into the file (a standalone SVG cannot inherit the note theme, so re-export after switching themes)![[...]] embed), Copy SVG, and Download SVG; the image folder defaults to plotsCtrl+P → "Open Mermaid Diagram Editor"```mermaid block, then run "Edit Mermaid Diagram at Cursor" or use Edit Mermaid Diagram in the editor context menu — the modal opens that block's source and saving replaces it in place instead of appending a new block− / + / percentage / 100% / Fit in the preview header; drag inside the preview to pan and hold Ctrl/⌘ while scrolling to zoomShift+Enter) to insert a native Mermaid code blockfs → 分数), LaTeX commands (frac), English words, and fuzzy matches, and results are sorted by relevanceOpen Settings → Formula Library → Backup and restore → Manage backups, or run Manage Formula Library Backups from the command palette.
my-formulas if none is configured. The preview shows this destination.Restore is additive: unmatched existing entries/categories remain intact. It validates and stages destination reads before writing, and attempts to roll back exact file bytes and settings if a write fails. A rollback failure is reported explicitly. Save a fresh backup before large changes; plugin backups are not a replacement for backing up the vault itself.
The older custom-library JSON/text export remains available in Manage custom formulas. Use the full workspace backup for templates, presets and preferences; the two formats have separate import dialogs.
$...$ or $$...$$| Category | Count | Description |
|---|---|---|
| Greek | 52 | α, β, γ, ... |
| Structures | 43 | Fractions, roots, integrals, sums, matrices |
| Delimiters | 36 | Parentheses, brackets, braces, absolute value |
| Analysis | 210 | Real/complex/functional analysis, measure theory |
| Algebra | 174 | Linear algebra, group/ring/module theory |
| Geometry | 133 | Classical, differential, Riemannian, symplectic |
| Topology | 166 | Point-set, algebraic, differential |
| Number Theory | 166 | Elementary, analytic, algebraic, modular forms |
| Relations | 112 | Equalities, order, subsets, logic |
| Operators | 64 | Arithmetic, set, logic operators |
| Big Ops | 20 | Sums, products, integrals, unions, intersections |
| Arrows | 68 | Various arrow symbols |
| Sets | 40 | Set theory, logic, cardinals |
| Functions | 131 | Elementary, special functions, distributions |
| Probability | 170 | Distributions, theorems, stochastic processes |
| Computing | 95 | Algorithms, graph theory, information theory, ML, graphics, signals, numerical methods |
| Physics | 251 | Mechanics, EM, quantum, relativity, QFT |
| Chemistry | 229 | Reactions, molecules, ions, thermodynamics |
| Misc | 56 | Ellipsis, infinity, special symbols |
There are two libraries: the built-in library (the formulas/ folder inside the plugin directory, or the embedded data when that folder is missing) and the custom library (a folder you choose in the settings, relative to the vault root). They load and switch independently, so the custom library and the formula editor keep working with the built-in library turned off.
Settings → Formula Library → Manage custom formulas lets you:
$ delimiters, unbalanced braces, and duplicates elsewhere in the libraryname<TAB>latex per line (with # / // comments)_index.json entry, and its switch are cleaned up together)Renaming a category only touches its display name: other fields (such as structures) and manual edits inside the file are preserved.
The manual workflow below still works and is useful for bulk maintenance and version control.
Formula data is stored in the formulas/ folder inside the plugin directory, with one JSON file per category.
BRAT / community plugin compatibility: Built-in data and runtime dependencies are bundled in
main.js. Installation needs onlymain.js,manifest.json, andstyles.css;formulas/is optional development data.
formulas/
_index.json # Category ordering (optional, auto-discovered if missing)
_strings.json # UI translation strings
greek.json # Greek letters
structures.json # Structures
analysis.json # Analysis
... # Other categories
Edit the corresponding JSON file and add new formulas to the items array:
{
"id": "greek",
"structures": false,
"items": [
["α", "\\alpha"],
["β", "\\beta"],
["Custom", "\\mycommand{#?}", "Custom Formula"]
]
}
formulas/ directory (e.g., mycategory.json):{
"id": "mycategory",
"structures": false,
"items": [
["Formula Name", "\\latex{code}", "English Name"]
]
}
order array in _index.json:{
"order": ["greek", "structures", "...", "mycategory"]
}
If
_index.jsondoesn't exist or doesn't include the new category ID, the plugin auto-discovers and loads groups alphabetically.
Each formula is an array: [label_zh, LaTeX code, label_en (optional)]
["α", "\\alpha"]["Fraction", "\\frac{#?}{#?}", "Fraction"]{"section": "Section Title", "sectionEn": "Section Title"}["Matrix", "matrix:matrix", "Matrix"] (prefix matrix: triggers template)["Name", "\\latex", "English name", {"tags": ["algebra"], "note": "why it matters"}] (the 4th element is optional and only used by the custom library; tags are shown as #tag in lists)variables, units, conditions, and reference are plain-text strings. They appear in Formula details and are included in search and JSON backups.Formula names, source labels and library controls follow Settings → Appearance → Font size by default, in both the editor's right-hand panel and the sidebar. To choose an independent size, open Settings → Formula Library → Appearance, turn off Follow Obsidian font size, then adjust Formula library font size (14–32 px). Changes apply to open libraries immediately. Preview font size only controls the MathLive editing area.
LaTeX editing/insertion, Mermaid diagram editing and SVG output remain independent of Core. MathLive/Obsidian rendering is not a general TeX compiler or a promise to preserve arbitrary macros.
On Windows only, Copy for Word appears next to the output actions when the output format is OMML or MathML. It converts OMML to standalone MathML text and copies that text by itself, without an HTML clipboard format, so Word's own equation import can create an editable equation. The pasted equation may look different, and the clipboard entry stays text rather than an OLE object.
The original input stays visible. Changing the source/options clears stale output; cancel, close, timeout and failure do not replace it. If initialization is unavailable, Retry engine retries explicitly; ordinary LaTeX editing still works. The conversion engine is bundled—no separate Core download, Node installation, model download or remote conversion service is required. Input is limited to 64 KiB UTF-8, serialized output to 256 KiB, and total queue/execution waiting to 30 seconds.
AsciiMath and UnicodeMath require 1.6.3 or later. They support a bounded linear grammar, not every dialect or Word's full equation syntax. For example, (a+b)/c imports as a fraction. Export uses canonical spelling, grouping and spacing; unsupported syntax/structures can be rejected even when a route is available. Linear output is plain text, not a Word-native clipboard object, and cannot be inserted directly into the LaTeX editor. Convert it to LaTeX fragment and review the preview first. MTEF remains unavailable: the upstream raw-byte inspector is not a semantic converter or an OLE importer.
Best-effort can lose syntax or style. Neither mode guarantees original-source recovery, identical appearance, complete round trips, or that every accepted Core expression renders in MathLive/MathJax. A failed LaTeX preview disables use in the editor but leaves text available to inspect/copy. OMML output is XML text, not a Word-native clipboard object or an editable paste by itself; the Windows-only Copy for Word action adds a best-effort MathML text import that was verified against Windows Word, not PowerPoint, WPS, mobile Office or OLE embedding. No OCR, PDF/DOCX/PPTX generation, TikZ compilation or whole-vault conversion is included.
Windows Obsidian loading, conversion, preview, Core information and controls have been retested for 1.6.3, including 12 linear-input routes and rejection of unsupported syntax. Editable Word equation import for a fraction, superscript and matrix was verified in 1.6.2 with the same Core binary. Android device checks cover the previous 1.6.1 Core build on a Xiaomi phone (2211133C, Android 16, Obsidian 1.14.4, MathJax 4.1.3) and tablet (24018RPACC, Android 16, Obsidian 1.13.8, MathJax 3.2.2), including simple samples across the original 16 best-effort conversions, native controls and matrix previews. The new Core and linear formats have not been retested on Android. These checks do not certify all formulas, devices or iOS. See platform coverage and Android verification.
Formula Library 1.6.3 uses the same Core 3.2.1 binary pinned to d31ae02 in 1.6.2; the source commit distinguishes it from older builds with the same Core version. Expand Core information in the conversion dialog to see the full commit, build date, conversion-only profile and WASM SHA-256. It is collapsed by default and scrolls with the form on small screens.
The new combined distribution is AGPL-3.0-only. Historical MIT releases through 1.5.0 are unchanged; the original MIT and third-party notices are retained. See distribution notices, LICENSE, and the exact Core source archive. Builds use fixed assets, not a moving Core branch. There is no runtime auto-install/update feature.
For editor, layout or insertion defects, include the plugin/Obsidian versions, operating system, theme and a minimal example with expected and actual behavior in a GitHub issue. Remove private formulas, paths and note content before sharing. There is no automatic diagnostic uploader.
For conversion defects, also include the Core information shown in the conversion dialog, input/output formats, strict/best-effort mode and displayed error code/diagnostics. Keep the original until verified and share only a sanitized single-formula reproduction. Report selection, preview, Worker loading and insertion problems here; confirmed parser/conversion defects can be forwarded to Core with a regression example. A success envelope is not proof of renderer fidelity. There is no general third-party provider interface or automatic diagnostic uploader.
Feature source lives in src/; do not edit generated main.js or styles.css directly. See development and UI acceptance rules.
The Core integration reference documents adapter modules, pinned assets, Worker lifecycle and platform compatibility.
npm ci
npm run check
npx playwright install chromium
npm run test:ui
Personal formulas are stored in your chosen vault folder. Settings, templates, presets and drafts use Obsidian's plugin data storage; saved plot images go to the configured image folder. Backup files can contain private formulas, annotations, drafts and folder names—store them securely.
Clipboard access is used for copy/paste features. This is why automated plugin reviews may disclose clipboard access; the new backup and plotting features do not add background clipboard monitoring or an external service. Review results marked unavailable are not security guarantees.
The mathematical editor and diagram features rely on MathLive and Obsidian's rendering environment. A separate account or plotting server is not required, but this is not a guarantee that every host or rendering resource is network-free.
Core conversion runs locally in a dedicated Worker, reading only the text you supply. It does not scan vault files, save conversion input into settings, monitor the clipboard, download OCR models, or upload diagnostics. Copying a result accesses the clipboard only on request. Host and other-plugin network behavior is outside this engine's boundary.
d31ae028c44ad39be44ecb73abe3f2e15b339b6a. The conversion-only binary is embedded as Base64 in main.js to keep the three-file Obsidian installation self-contained. It is decoded locally when conversion is first used, then checked against SHA-256 d6ec2397f0c5ec762f24d109e660527e1375c97ccbd72411dd08eee690429c1a. Base64 is packaging, not encryption or a replacement for source review. See the asset manifest and reproduction instructions. No remote WASM download or user-supplied module URL is used.fetch() for a locally created blob: URL, not a conversion server. The tested Core conversion flows made no external requests. Non-CDN URLs in the binary include MathML/OMML XML namespace identifiers; their presence does not cause an HTTP request. Core also contains a MathJax CDN reference in its HTML-export template, but this plugin does not expose or execute that output. MathLive JavaScript and font CSS assets are bundled; rendering can reuse a host-provided MathLive instance. The plugin does not configure a remote conversion, telemetry or diagnostic-upload service. Host, renderer and other-plugin resource behavior is not covered by the Core-only network test.- is not evidence of zero requests. Malware, obfuscation or network scans marked unavailable have not supplied a completed assessment; they are not passes. Checksums and GitHub build attestations verify integrity and provenance, not absence of vulnerabilities. Published tests and source review complement, but do not replace, an independent security audit.Formula library extracted from LaTeXSnipper Office Plugin Rendering uses Obsidian's built-in MathJax and MathLive