No description
Find a file
Jovi Koikkara eea4d67e3e
feat(tikz): major rendering, layout, and editor enhancements (#1)
Fixes
- WebAssembly & initialization
  - Fix TikZJax WebAssembly initialization issues.

- Fonts & symbol rendering
  - Override DVI parser `machine.putText` to use split character code offsets from `tikzjax.js`.
  - Map codes 0–9 starting at 161 to fix incorrect Γ rendering (was showing as Θ).
  - Map codes 10–19 starting at 173 to resolve Ω and ⊗ collisions with soft hyphen.

- Layout & rendering
  - Fix SVG clipping by switching to `position: relative` with `overflow: visible`.
  - Adjust inline SVG behavior to prevent top-of-page clipping.

- Type compatibility
  - Cast types to `unknown` in `TikzJaxLoader` and worker functions for compatibility.

- Error handling & cleanup
  - Improve error handling across TikZ components.
  - Remove unused dependencies and unnecessary console logs.

Features
- Package loading system
  - Add robust dependency resolution in `loader.ts` for:
    - `tikz-cd`
    - `tikz-feynhand`
    - `pgfcalendar`
  - Ensure required libraries and keys load dynamically on demand.

- Rendering & layout improvements
  - Enhance SVG bounding box calculation.
  - Implement dynamic column width calculation.
  - Improve row and column layout alignment and responsiveness.

- TikZ editor enhancements
  - Add keyboard shortcut tooltips to sidebar buttons.
  - Introduce thickness control slider for elements.
  - Improve snapping system with modes:
    - grid
    - half
    - none
  - Add support for new shapes:
    - circles
    - rectangles
    - triangles
  - Improve TikZ code generation error handling.

Improvements
- Selection & editing UX
  - Add lasso selection for multiple vertices in `CanvasGrid`.
  - Support multi-element editing in `RightSidebar`.
  - Refactor `TikzEditorModal` to handle multiple selected vertices.
  - Enable batch updates for selected elements.

- Layout & styling
  - Compact `.block-language-tikz` layout:
    - margin: `1.5em 0` → `0.3em 0`
    - padding: `1rem 0` → `0`
  - Improve canvas controls and interaction styles.

- Component refactoring
  - Refactor `CanvasGrid` to use template literals.
  - Replace inline styles with `setCssStyles`.
  - Improve `TikzCodec` node naming clarity.
  - Improve `history manager` type safety with `EditorElement`.
  - Use `window.setTimeout` in asset manager for better compatibility.

- Accessibility & UI polish
  - Improve sidebar button titles and tooltips.
  - Standardize live preview overlay button titles.
  - Clean up modal styling and text consistency.

Documentation
- Revamp TeXcore plugin documentation:
  - Clarify PDF export features and settings.
  - Improve quick preview architecture explanation.
  - Enhance equation search and autocomplete docs.
  - Streamline snippets usage and transformations.
  - Expand TikZ diagrams section with graphical editor guide.
  - Improve getting started guide with clearer steps.
  - Add navigation and configuration updates.

- Update plugin manifest descriptions for clarity.
2026-06-06 12:08:11 +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): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
release-artifacts feat(tikz): transition to on-demand lazy asset loading model 2026-06-05 15:27:19 +02:00
src feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +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 feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
eslint.config.mjs feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +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-beta.json feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
manifest.json feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
mkdocs.yml feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +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): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
pnpm-lock.yaml feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +02:00
pnpm-workspace.yaml updating the plugin 2026-06-04 20:12:07 +02:00
README.md feat(tikz): major rendering, layout, and editor enhancements (#1) 2026-06-06 12:08:11 +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, high-performance LaTeX assistant for automatic equation numbering, referencing, and TikZ rendering with basic GUI editing in Obsidian.md to transforms your vault into a rich ecosystem for scientific drafting and study.

Prisma Calendar Preview

📚 Full Documentation & Guides


Key Features

  • Equation Numbering & referencing: Auto-numbers equations with custom IDs and provides search-based fuzzy autocomplete suggestion dropdowns via \eqref.
  • On-Demand TikZ Diagrams: Compiles TikZ code blocks asynchronously in a Web Worker, lazy-downloading and caching assets to remain lightweight and bloat-free.
  • Advanced PDF Export: Highly configurable single-note or batch folder PDF exports featuring customizable headers, footers, page sizes, and style overrides.

Behind the Scenes: The WebAssembly Engine

To render TikZ diagrams without forcing you to install a full local LaTeX distribution, TeXcore runs the compiler directly inside Obsidian using WebAssembly:

  1. TeX in Wasm: The core Pascal source code of TeX is compiled into a WebAssembly binary (tex.wasm) via the web2js compiler.
  2. Background Compilation: Because TeX compilation is CPU-bound, the plugin spawns a background Web Worker to run the Wasm engine. This keeps Obsidian's UI completely smooth and responsive.
  3. On-Demand CDN Fetching: When you first run a TikZ diagram, the plugin downloads the pre-compiled format engine (core.dump.gz) and the font stylesheet (tikzjax.css), caching them locally on your disk.
  4. Lazy Caching: If your diagram includes specific packages (e.g. \usepackage{circuitikz}), the loader resolves the files, downloads them from a CDN, and saves them locally. Subsequent renders of the same packages work fully offline.

License

This plugin is licensed under the MIT License.


Credits & Sourcing

The TikZJax engine and assets are derived from and built upon the incredible work of the following open-source projects:

  1. kisonecat/tikzjax by Jim Fowler — The original browser-based TeX-in-Wasm compiler.
  2. drgrice1/tikzjax by Glenn Rice — Added Web Worker support, along with additional TeX library and package compilations.
  3. artisticat1/obsidian-tikzjax by artisticat1 — Inspiration for Obsidian integration wrapper that packaged these components.

Note: The underlying TeX engine binaries, format dumps, and LaTeX style packages are distributed under their respective open-source licenses (GPL-3.0+ / LPPL v1.3c).