Releases: SharbelMarshi/obsidian-luatikz-plugin
Release list
1.9.7
LuaTikZ 1.9.7 Load-failure fixes
A stability patch. Two separate bugs could stop LuaTikZ from loading at all, showing "LuaTikz failed to load" with a RangeError or Config merge conflict in the console. Both are fixed. No feature or behaviour changes otherwise.
Fixed: failed to load when another plugin provides autocompletion
LuaTikZ configured CodeMirror's autocomplete with the override field. That field has no merge rule, so as soon as any other installed plugin also set it, the editor configuration threw
Config merge conflict for field override
during startup, and Obsidian aborted the whole plugin.
TikZ completions are now registered as language data, which is additive. Two consequences:
- LuaTikZ can no longer conflict with another plugin's autocompletion, whatever it configures.
overridehad also been replacing every completion source in the editor, for all files, so other plugins' completions were being suppressed globally. They now coexist properly.
Fixed: failed to load when notes were already open
The hover-highlight extension used two CodeMirror state fields, one reading the other through the transaction's previous state. Obsidian installs plugin editor extensions into already-open notes by reconfiguring them, and in that transaction the previous state predates the plugin, so the lookup threw
RangeError: Field is not present in this state
again during load. This is why the failure looked intermittent: starting with no notes open worked, while restoring a session with an open note did not.
The two fields are now a single field, which cannot race its own installation.
1.9.6
1.9.5
1.9.4
LuaTikZ 1.9.4
This release turns the visual editor into a much more complete drawing tool: a full circuitikz component palette, real fill styling (shades, gradients, patterns), configurable arrow tips, and a paint-bucket tool, plus several reliability fixes, including one for the "diagram.tex not found" error on cached diagrams.
Circuit components
- New Circuit toolbar menu with 16 circuitikz elements: Resistor (zigzag and rectangular box), Capacitor, Inductor, Voltage source (+ − circle and single-cell plates), Current source, Battery, Diode, LED, Switch, Lamp, Ammeter, Voltmeter, junction Dot, and Ground.
- Click to place: pick a component and a translucent preview of its exact schematic glyph follows your cursor; one click drops it (a 2 cm span, snap-aligned). No dragging needed — and the endpoints stay draggable afterwards to reroute or rotate.
- Components are written as plain circuitikz (
\draw (0,0) to[R] (2,0);,\node[ground] at (…) {};) and stay first-class editable objects. More generally, anyto[...]path — including hand-writtento[bend left]is now visually editable instead of source-only. - The canvas wireframe draws real schematic glyphs (zigzag, plates, coil, ±, diode triangle, …), and once the compiled symbol appears, the approximate wireframe hides so you see only the real component.
- Voltage sources use the American + − style, kept upright at any orientation via an auto-inserted, version-safe
\ctikzsetline.
Color, fills, and arrows
- Shade sliders on the Stroke and Fill palettes mix any color toward white or black as readable xcolor expressions (
red!60,red!60!black). - Stroke "None" well (red slash): removes the outline entirely (
draw=none) distinct from the default well, which restores black. - Fill styles: solid, vertical/horizontal/radial gradients, ball shade, written as native shading options (
top color=,inner color=,ball color=,shading angle=). - Fill patterns: the full TikZ
patternslibrary plus three editor patterns bold diagonal stripes and wider-spaced NE/NW lines (declared automatically per fence). A pattern can sit over a solid fill color;\usetikzlibrary{patterns}is inserted for you. - Arrow tips: choose Arrow (default), Stealth, Latex, Triangle, Circle, Square, Diamond, Bar, or Hooks (
arrows.metaspecs like-{Stealth}); direction and tip combine freely, legacy-latexspecs are recognized.
Paint fill (bucket) tool
- New Paint fill tool (key
K): click inside any visually closed region — a shape, a circle split by a line, overlapping shapes, a closed freehand outline. Simple shapes getfill=…set directly; composite regions are flood-filled on a raster of the actual scene and traced into a\fill … -- cycle;path (holes handled viaeven odd rule), inserted beneath the bounding strokes. Unclosed regions are reported instead of guessed.
Function plot
- LaTeX-style input now works:
0.02\cos(200t),\frac{x}{2},\sqrt[3]{x},2\pi x,e^{-x},\left(…\right). - The variable no longer has to be
x— any single free letter (t,y, …) is plotted. - Expressions with two free variables get a clear explanation naming them, instead of a silent failure.
Fixes
- Cached diagrams no longer break with "…tex not found": the startup temp-folder sweep could delete in-flight compile files when a cache-evicted diagram recompiled at launch, sticking the block in an error until a manual re-render. The sweep is now age-gated, and the compiler additionally self-heals by retrying once if its input file vanishes mid-compile.
- iPad/TikZJax pattern rendering: patterned fills rendered invisible on the mobile engine (its converter drops pattern definitions); the missing tile definitions are now re-injected, so all patterns render on iPad too.
- Toolbar on narrow panes: the toolbar wraps into extra rows instead of becoming an invisible horizontal scroll strip that hid the Shapes (Arc & co.) and Circuit buttons.
- Node text, gradients, arrow tips, circuits, and patterns were all verified end-to-end on both engines (LuaLaTeX and the bundled TikZJax used on mobile).
1.9.3
1.9.2
1.9.2
Visual editor
- Shapes menu: all shape tools now live in one toolbar button, with a new Triangle tool.
- Function plotter: new plot tool: enter
f(x)and a range, get native TikZ output (plot (\x, {…})withdomainandsamples). Plots are fully editable and draggable. - Rotation: drag the grip above any selection to rotate it (Shift = 15° steps).
- Shape snap: draw freehand and hold still at the end: the stroke turns into a clean line, triangle, rectangle, circle, or polygon.
- Objects panel: list every object, hide/show it with a checkbox, or delete it.
- Hebrew support: Hebrew typed into a text node is wrapped in
\he{…}automatically. - Real color syntax: the color picker now writes readable xcolor mixes (
cyan!75!black) instead of raw RGB. - Better selection: click inside filled shapes, and tap the same spot again to cycle through stacked objects.
- Transformed pictures: pictures using
rotate,shift,scale,x=/y=,rotate aroundare now fully editable; only true coordinate-system overrides (cm=) stay source-only, with a clear message naming the option. - Any object can now be deleted, including source-only statements.
Fixes
- iPad: drawn objects no longer appear duplicated beside themselves.
- Settings tab works again on Obsidian 1.13+ (with settings search support).
- Cmd+⌫ deletes the selection; dragging selected objects works reliably.
1.9.1
1.9.0
LuaTikZ 1.9.0
Visual editor
Draw TikZ by hand. The floating preview now has an Edit mode that expands into a full visual editor - sketch with mouse, finger, or Apple Pencil, and every stroke is written into your existing ```tikz fence as clean, native TikZ.
- Press Edit on the floating preview and it animates into a full-pane editor; Done collapses it back. The fence in your note remains the only source of truth, and every operation is a normal, undoable edit.
- 18 tools: Select, Pan, Line, Arrow, Path, Bézier, Freehand, Rectangle, Rounded rectangle, Circle, Ellipse, Arc, Grid, Diamond, Polygon, Star, Text, and Math nodes.
- Draw on the real diagram: the compiled LuaLaTeX/TikZJax output is embedded in the canvas, calibrated to exact TikZ coordinates, so you sketch on top of what your diagram actually looks like.
- Freehand ink that stays editable- strokes are smoothed, simplified, and fitted to Bézier paths with an adjustable smoothing setting; grab the control points afterwards like any other curve.
- Select, move, resize, duplicate, style: drag endpoints and control points, box-select (objects fully inside the box), snap to a configurable grid and to other objects' points — snapping works in TikZ coordinates, so points land on exact values like
(1.5, 0.5).
Touch and stylus
- One finger pans, two fingers pinch-zoom; an explicit Finger draw toggle makes one finger draw.
- A pen always draws, takes priority over touch, and stray palm contacts are ignored while it's near the glass.
- The floating preview (and Edit mode) now works on iPad, Android tablets, and phones, rendering through TikZJax. Near-full-screen layout, 44 px touch targets, safe-area aware.
Lossless two-way source sync
- Visual edits patch only the tokens that changed — comments, indentation, custom styles, and statement order are preserved byte-for-byte.
- Anything the editor can't safely round-trip (
\foreach,to[bend], scopes, named/polar coordinates, transforms…) is never rewritten or deleted: it stays in your source, renders in the compiled output, and appears as a locked ghost on the canvas. - Optional source panel with TikZ syntax highlighting; hover an object on the canvas and its statement lights up in the code. Each completed operation is one undo step.
Notes
- Quiet icon toolbar with tooltips, full light/dark/custom-theme support, LTR-pinned UI in RTL notes, keyboard shortcuts (
V H L A P B F R C E T, Del, Esc, Ctrl/Cmd+Z/D/C/V), and an animated grow/shrink transition between preview and editor.
LuaTikz 1.8.2
minor bug fixes from the last release
LuaTikz 1.8.1
Fixed cross-platform LuaLaTeX rendering on Linux and Windows by adding guarded font fallbacks, loading RTL support only when needed, and improving custom preamble handling, cache invalidation, and LaTeX error-line mapping.