No description
Find a file
JK a460ca5bea feat: implement robust offline-first TikZ diagram rendering support
- Added a modular `TikzRenderer` in `src/features/tikz/renderer.ts` to process `tikz` code blocks.
- Fetches and caches the offline-friendly, self-contained 7MB TikZJax JS engine from artisticat1/obsidian-tikzjax.
- Dynamically patches the engine's initialization to execute immediately (bypassing window.onload and document.readyState race conditions).
- Implements a programmatic `TikzJaxCleanup` function that terminates WebAssembly worker pools and disconnects MutationObservers when the plugin unloads, supporting safe Hot Reloads.
- Simplifies block element styling to render transparently and center-aligned, matching standard notes.
- Added Settings UI controls (`enableTikzjax` and `invertColorsInDarkMode`) to manage diagram color inversion and toggle rendering status.
- Integrated `TikzRenderer` setup and cleanup into the main plugin lifecycle.
2026-06-04 20:12:06 +02:00
.github Added docs 2026-06-04 20:12:04 +02:00
docs feat(snippets): streamline snippet management and introduce text transformation features 2026-06-04 20:12:05 +02:00
src feat: implement robust offline-first TikZ diagram rendering support 2026-06-04 20:12:06 +02:00
.editorconfig initializing 2026-06-04 20:11:56 +02:00
.eslintignore initializing 2026-06-04 20:11:56 +02:00
.eslintrc initializing 2026-06-04 20:11:56 +02:00
.gitignore Reroute Search & Autocomplete to the New System 2026-06-04 20:12:01 +02:00
.npmrc initializing 2026-06-04 20:11:56 +02:00
esbuild.config.mjs fix(callout): Implement custom rendering for equation links and numbers in dynamically rendered callouts. 2026-06-04 20:12:05 +02:00
LICENSE initializing 2026-06-04 20:11:56 +02:00
manifest.json fix: update regex for equation links to correctly handle sub-indices 2026-06-04 20:12:05 +02:00
mkdocs.yml Added docs 2026-06-04 20:12:04 +02:00
package-lock.json fix(callout): Implement custom rendering for equation links and numbers in dynamically rendered callouts. 2026-06-04 20:12:05 +02:00
package.json fix(callout): Implement custom rendering for equation links and numbers in dynamically rendered callouts. 2026-06-04 20:12:05 +02:00
README.md Added docs 2026-06-04 20:12:04 +02:00
tsconfig.json refactor: remove legacy equation and search modules; update imports for new feature structure 2026-06-04 20:12:02 +02:00
version-bump.mjs initializing 2026-06-04 20:11:56 +02:00
versions.json version bump 2026-06-04 20:12:04 +02:00

LaTeX Equation Referencer for Obsidian

LaTeX Equation Referencer is a minimalistic Obsidian.md plugin for automatic equation numbering and referencing. It is a streamlined fork of the original LaTeX-like Theorem & Equation Referencer by Ryota Ushio.

📚 Full Documentation

Key Differences from Original

This fork has been redesigned with a focus on simplicity and performance:

  • Single-note focus — Only parses the current active note, no vault-wide scans
  • Equation-only — No theorem/proof support, just equation referencing
  • Custom ID system — Uses % id: eq-xxx LaTeX comments instead of Obsidian's block references
  • Zero dependencies — Quick Preview and Math Links functionality built-in

Features

🔢 Automatic Equation Numbering

Add a unique ID to any display math block:

$$
E = mc^2
% id: eq-einstein
$$

Reference it with [[#^eq-einstein]] and the equation is automatically numbered with \tag{1}.

Numbering styles: arabic (1, 2, 3), alph (a, b, c), Alph (A, B, C), roman (i, ii, iii), Roman (I, II, III)

🔗 Smart Referencing

  • Type \eqref to trigger autocomplete with all equations in the note
  • Fuzzy or simple search to find equations quickly
  • Rendered math preview in suggestions
  • Hover over links to see equation popups

📄 PDF Export

Full-featured PDF export with:

  • Live preview modal
  • Page size, margins, orientation settings
  • Custom headers and footers
  • CSS snippet support
  • Batch folder export
  • Table of contents generation

✂️ LaTeX Snippets

Create reusable LaTeX code snippets:

  • Accessible via command palette
  • Each snippet becomes its own command
  • Assign hotkeys to frequently used snippets

📦 Callout Support

Math blocks work inside Obsidian callouts with automatic indentation handling:

> [!theorem]
> $$
> x^2 + y^2 = z^2
> % id: eq-pythagoras
> $$

Use the "Fix callout equations" command to repair broken indentation.

Installation

From Community Plugins

  1. Open Obsidian Settings → Community plugins
  2. Click Browse and search for "LaTeX Equation Referencer"
  3. Click Install, then Enable

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create folder: <vault>/.obsidian/plugins/math-booster/
  3. Copy the files into this folder
  4. Restart Obsidian and enable the plugin

Quick Start

  1. Write a display math block with $$...$$
  2. Add % id: eq-yourname on a new line before the closing $$
  3. Type \eqref anywhere to search and insert a reference
  4. The equation is numbered and the link displays as (1)

Commands

Command Description
Insert display math Insert $$...$$ block template
Search equations in active note Open equation search modal
Fix callout equations in active note Repair callout indentation
Export current file to PDF Open PDF export dialog
Insert LaTeX Snippet Insert a saved snippet

Configuration

See the Settings Reference for all configuration options.

Credits

License

MIT License - see LICENSE for details.