mirror of
https://github.com/youfoundjk/TeXcore.git
synced 2026-07-22 07:33:31 +00:00
- 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. |
||
|---|---|---|
| .. | ||
| tex_files | ||
| core.dump.gz | ||
| README.md | ||
| tex.wasm.gz | ||
| tikzjax.css | ||
TikZJax Assets Sourcing
The assets in this directory are the compiled format dumps, WebAssembly binaries, font stylesheets, and LaTeX package dependency files used by the TikZJax rendering engine in the TeXcore plugin.
Asset Origins
- Core TeX Engine (
tex.wasm.gz&core.dump.gz): Extracted from the pre-compiled, offline-capabletikzjax.jsbundle of artisticat1/obsidian-tikzjax. - TeX Files & LaTeX Packages (
tex_files/*.gz): The LaTeX package files (such aschemfig,circuitikz, and TikZ library code blocks) were also extracted from the monolithic bundle ofartisticat1/obsidian-tikzjaxto serve as lazy-loaded dependencies. - Font Stylesheet (
tikzjax.css): Downloaded from the official styling assetstyles.cssin artisticat1/obsidian-tikzjax. It contains@font-facedeclarations with embedded base64 font data for math and glyph symbols.
Lineage of TikZJax
- kisonecat/tikzjax: The original browser-based TeX-in-WASM compiler created by Jim Fowler, which compiles TeX's Pascal source to WebAssembly via
web2js. - drgrice1/tikzjax: Glenn Rice's fork which added Web Worker support and support for additional LaTeX packages and libraries.
- artisticat1/obsidian-tikzjax: The Obsidian plugin wrapper created by
artisticat1which packaged these components for offline usage in Obsidian notes.