How artisticat1/obsidian-tikzjax works
Obsidian TikZJax turns tikz code blocks in notes into rendered diagrams. The plugin registers a Markdown processor, cleans the block source, and inserts it for the TikZJax runtime; completed SVGs are then optionally recolored for dark mode and optimized. Settings control recoloring and expose SVG-cache clearing. The README documents supported diagram packages and cached renders. TikZJax internals were not sampled, so runtime-to-cache behavior is shown only as documented, not as inspected implementation.
Main entry points: tikzjax.js TikZJax runtime · main.ts SVG post-processing · settings.ts Plugin settings · svgo.browser.js SVG optimization
Components 14
Obsidian integration
- Obsidian host
- TikZ block processor
main.ts - Source cleanup
main.ts - Window lifecycle
main.ts
Diagram rendering
- TikZJax runtime
tikzjax.js - TikZ packages
- Rendered SVG
tikzjax.js - SVG post-processing
main.ts - Dark-mode colors
main.ts - SVG optimization
svgo.browser.js
Settings and cache
- Plugin settings
settings.ts - Saved settings
main.ts - SVG cache
settings.ts
Other components
- Note author
Connections 15
- Note author → TikZ block processor: writes block
README.md - Obsidian host → TikZ block processor: dispatches block
main.ts - TikZ block processor → Source cleanup: cleans source
main.ts - Source cleanup → TikZJax runtime: inserts script
main.ts - Obsidian host → Window lifecycle: opens windows
main.ts - Window lifecycle → TikZJax runtime: loads runtime
main.ts - TikZJax runtime → TikZ packages: supports packages
README.md - TikZJax runtime → Rendered SVG: renders diagrams
README.md - TikZJax runtime → SVG post-processing: signals completion
- SVG post-processing → Dark-mode colors: optionally recolors
main.ts - SVG post-processing → SVG optimization: optimizes with
main.ts - Plugin settings → Saved settings: saves settings
main.ts - SVG post-processing → Saved settings: reads preference
main.ts - Plugin settings → SVG cache: clears cache
settings.ts - TikZJax runtime → SVG cache: stores renders
README.md