No description
Find a file
JK bea33c7cac feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering
- Extracted 214 TeX libraries, packages, core formats, and WebAssembly binaries from monolithic `tikzjax.js` into local `tikzjax-assets/` folder.
- Replaced monolithic 7MB runtime JS asset download from GitHub with a lightweight loader and Web Worker compilation engine.
- Implemented `tikzjax.worker.ts` to execute the TeX engine in a background Web Worker thread using modern Web standard APIs, preventing main-thread UI locks.
- Implemented `TikzJaxLoader` to parse code block preambles, lazily load/decompress assets synchronously via native `zlib`, cache core buffers in memory, and compile diagrams via the worker.
- Refactored `renderer.ts` and `live-preview-overlay.ts` to utilize the async loader, removing DOM-polluting `<script>` tags, global mutation observers, and custom window hooks.
- Swapped unsafe `.innerHTML` DOM writes with secure browser `DOMParser` APIs for SVG parsing.
- Configured `esbuild` and `package.json` to recursively copy `tikzjax-assets/` to both development and production release locations.
- Removed temporary extraction scripts to keep runtime codebase clean.
- Added asset origin citations to module README, project root README, and MkDocs features documentation.
- Fixed all 111 ESLint type check and style errors, ensuring clean linter execution.
2026-06-05 15:19:32 +02:00
.github Updated Naming Convention 2026-06-05 14:50:35 +02:00
__mocks__ lin fix I 2026-06-04 21:01:36 +02:00
docs feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
src feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
test_helpers feat(settings): redesign settings tab with categories, search, i18n, and what's new modal 2026-06-05 14:29:35 +02:00
tikzjax-assets feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
.editorconfig initializing 2026-06-04 20:11:56 +02:00
.gitignore updating the plugin 2026-06-04 20:12:07 +02:00
.npmrc initializing 2026-06-04 20:11:56 +02:00
.prettierignore updating the plugin 2026-06-04 20:12:07 +02:00
.prettierrc.json updating the plugin 2026-06-04 20:12:07 +02:00
CONTRIBUTING.md Updated Naming Convention 2026-06-05 14:50:35 +02:00
esbuild.config.mjs Updated Naming Convention 2026-06-05 14:50:35 +02:00
eslint.config.mjs refactor: reorganize src into modular structure and increase test coverage 2026-06-04 20:50:07 +02:00
eslint.css.config.mjs setting up prod release 2026-06-04 20:26:28 +02:00
jest.config.js refactor: reorganize src into modular structure and increase test coverage 2026-06-04 20:50:07 +02:00
LICENSE refactor: reorganize src into modular structure and increase test coverage 2026-06-04 20:50:07 +02:00
manifest.json Updated Naming Convention 2026-06-05 14:50:35 +02:00
mkdocs.yml feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
package-lock.json refactor: reorganize src into modular structure and increase test coverage 2026-06-04 20:50:07 +02:00
package.json feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
pnpm-lock.yaml feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
pnpm-workspace.yaml updating the plugin 2026-06-04 20:12:07 +02:00
README.md feat(tikz): decouple TikZJax loader and assets for fully offline, worker-based rendering 2026-06-05 15:19:32 +02:00
requirements.txt updating the plugin 2026-06-04 20:12:07 +02:00
tsconfig.eslint.json updating the plugin 2026-06-04 20:12:07 +02:00
tsconfig.json feat(settings): redesign settings tab with categories, search, i18n, and what's new modal 2026-06-05 14:29:35 +02:00
version-bump.mjs updating the plugin 2026-06-04 20:12:07 +02:00
versions.json feat: redesign settings UI, add Integrations tab, and support dynamic Zotero cleanup command 2026-06-05 14:43:16 +02:00

Downloads Version

TeXcore for Obsidian

A minimalistic Obsidian.md plugin for automatic equation numbering and referencing.

📚 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
  • Offline TikZ Diagrams — Decoupled, lazy-loaded LaTeX/TikZ rendering via background Web Workers with zero network dependencies

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

🎨 TikZ Diagrams

Render TikZ code blocks (```tikz) fully offline and on-demand:

  • Fully Offline — Requires no active internet connection. All TeX format files and packages are cached locally in the plugin directory.
  • Lazy Loading — Core assets (tex.wasm and core.dump) are cached in memory on first compile. Supplementary packages (like tikz-cd, circuitikz, or pgfplots) are read and decompressed from disk only when requested.
  • Background Compiler — Compiles TeX within a Web Worker to ensure Obsidian's interface remains smooth and responsive.

Assets are derived from Glenn Rice's (drgrice1) and Jim Fowler's (kisonecat) TikZJax compiler project, packaged offline by artisticat1.

📄 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 "TeXcore"
  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/TeXcore/
  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.

License

MIT License - see LICENSE for details.