youfoundjk_TeXcore/docs/index.md
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

3.3 KiB

TeXcore: LaTeX-Grade Referencing in Obsidian

Welcome to TeXcore (:material-sigma:), the ultimate Obsidian plugin designed to bridge the gap between markdown notes and publication-ready LaTeX documents. By introducing automated equation numbering, smart referencing, and advanced styling modules, TeXcore transforms your vault into a rich ecosystem for scientific drafting and study.

Getting Started Guide :octicons-arrow-right-24:{: .md-button .md-button--primary } Settings Reference :octicons-gear-24:{: .md-button }


Capabilities Overview

Our core features are organized into logical modules designed to enhance your equation workflows:

  • :material-numeric: Equation Numbering

    LaTeX-like automatic tag insertion with multi-style options (arabic, roman, alph) and multi-line sub-equation tracking.

  • :material-link-variant: Smart Referencing

    Autocompleted backlinks utilizing [[#^eq-id]] linking. Supports hover popups, click-navigation, and live synchronizations.

  • :material-file-pdf-box: PDF Export

    Interactive PDF compiling with side-by-side preview widgets, customizable page headers/footers, margins, and custom CSS snippet injection.

  • :material-code-braces: LaTeX Snippets

    Quick-insertion presets mapped to keyboard triggers, allowing faster math notation drafting without repetitive typing.

  • :material-magnify: Equation Search

    Note-wide lookup indexing that simplifies equation retrieval and reference updates through an intuitive, keyboard-first modal.

  • :material-card-text-outline: Callout Support

    Seamless integration with native callouts, preserving Markdown formatting rules while automatically indexing equations.

  • :material-vector-square: TikZ Diagrams

    Real-time rendering of vector graphical TikZ scripts directly inside your notes, backed by an isolated component library.


Quick Start Demonstration

Writing and referencing equations in TeXcore is extremely straightforward.

=== "1. Writing the Equation" To set up a trackable equation, use standard display math delimiters $$ and insert a LaTeX comment stating the identifier:

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

=== "2. Referencing the Equation" Simply type your trigger (default: \eqref) to select the equation via autocompletion, inserting an Obsidian reference link:

```markdown
As demonstrated by Einstein in [[#^eq-einstein]], mass and energy are equivalent.
```

=== "3. Rendered Output" The equation will be automatically indexed, adding a right-aligned numbering tag. The reference link resolves to a neat hyperlink:

$$
E = mc^2 \tag{1}
$$

As demonstrated by Einstein in [(1)](#), mass and energy are equivalent.

!!! note "Smart Numbering" By default, TeXcore employs lazy numbering. Equations are only assigned a tag when they are actively referenced elsewhere in your note. This ensures clean note margins and prevents cluttered layouts. Read more in the Settings Reference.