Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

LaTeX and TikZ Renderer

Agostino CesaranoAgostino Cesarano19 downloads

Render LaTeX and TikZ diagrams locally using your system TeX installation with support for any package.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates5

Render any LaTeX and TikZ diagram directly inside your Obsidian notes using your local LaTeX installation (latex, dvisvgm).

Unlike WebAssembly-based solutions with limited package support, this plugin invokes your system's native TeX distribution. This means you can use any package installed on your computer — including pgfplots, circuitikz, chemfig, tikz-cd, forest, quantikz, and more!

LaTeX & TikZ Renderer in Obsidian


✨ Features

  • ⚡ Zero-boilerplate Snippets: Directly write \begin{tikzpicture} ... \end{tikzpicture}. The plugin automatically wraps it with a customizable standalone preamble.
  • 📜 Full Document Support: Write full standalone documents with custom \documentclass, packages, and macros.
  • 📦 Unlimited Package Ecosystem: Use any package installed on your local TeX distribution (MiKTeX, TeX Live, MacTeX).
  • 🌓 Smart Dark Mode Theming: Automatically adapts black/white lines, text, and axes to your active Obsidian theme.
  • 💾 Fast Persistent Cache: Diagrams are compiled to vector SVG and cached via IndexedDB. Re-opening notes is instant.
  • 🛠️ Built-in Diagnostics: One-click "Test Toolchain" button in settings to verify your compiler and dvisvgm setup.
  • ⏱️ Process Timeout & Clear Error Logs: Prevents infinite macro loops from freezing Obsidian and displays highlighted LaTeX error messages with expandable full logs.

📋 Prerequisites

Because this plugin executes your local compiler, you must have the following tools installed and accessible in your system's PATH:

  1. A LaTeX distribution:
    • Windows: MiKTeX or TeX Live
    • macOS: MacTeX or BasicTeX
    • Linux: TeX Live (sudo apt install texlive-full or texlive-base texlive-pstricks dvisvgm)
  2. dvisvgm (included by default in MiKTeX, TeX Live, and MacTeX).

Tip: You can check if they are available in your terminal by running:

latex --version
dvisvgm --version

🚀 Installation

From Obsidian Community Plugins (Recommended)

  1. In Obsidian, open Settings → Community plugins.
  2. Turn off Restricted mode if prompted.
  3. Click Browse and search for "LaTeX and TikZ Renderer" (or latex-tikz-renderer).
  4. Click Install, then Enable.

Via BRAT (for beta releases)

  1. Install the Obsidian BRAT plugin.
  2. In BRAT settings, click Add Beta plugin.
  3. Enter agostino-code/obsidian-tikz.

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest Release.
  2. Inside your vault, navigate to .obsidian/plugins/ and create a folder named latex-tikz-renderer.
  3. Copy the downloaded files into .obsidian/plugins/latex-tikz-renderer/.
  4. In Obsidian, reload plugins and enable LaTeX and TikZ Renderer.

⚙️ Configuration

In Obsidian Settings → LaTeX and TikZ Renderer:

Setting Default Description
LaTeX Compiler Path latex Executable name or absolute path to your compiler (e.g., latex, pdflatex, xelatex, or C:\...\latex.exe).
dvisvgm Path dvisvgm Executable name or absolute path to dvisvgm.
Test Toolchain Button Tests and displays version info for both the compiler and dvisvgm.
Auto-wrap Snippets true When enabled, code without \documentclass is automatically wrapped with the Default Preamble.
Default Preamble \documentclass[tikz, border=2pt]{standalone}... Preamble prepended to snippets. Add custom \usepackage{...} or macros here.
Compilation Timeout 25 Maximum seconds to wait before aborting a compile job.
Invert dark colors in dark mode true Automatically recolors black/white diagram lines to match light/dark themes.
Clear cached SVGs Button Empties the IndexedDB SVG cache to force re-rendering all diagrams.

💡 Usage & Examples

Create a code block with language identifier tikz or latex.

1. Minimal TikZ Diagram (Snippet Mode)

No document boilerplate needed!

```tikz
\begin{tikzpicture}[domain=0:4]
  \draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
  \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
  \draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
  \draw[color=red]    plot (\x,\x)             node[right] {$f(x) =x$};
  \draw[color=blue]   plot (\x,{sin(\x r)})    node[right] {$f(x) = \sin x$};
  \draw[color=orange] plot (\x,{0.05*exp(\x)}) node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
\end{tikzpicture}
```

2. Electronic Circuits (circuitikz)

```tikz
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}[american, voltage shift=0.5]
  \draw (0,0)
  to[isource, l=$I_0$, v=$V_0$] (0,3)
  to[short, -*, i=$I_0$] (2,3)
  to[R=$R_1$, i>_=$i_1$] (2,0) -- (0,0);
  \draw (2,3) -- (4,3)
  to[R=$R_2$, i>_=$i_2$] (4,0)
  to[short, -*] (2,0);
\end{circuitikz}
\end{document}
```

3. 3D Function Plots (pgfplots)

```tikz
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[colormap/viridis]
    \addplot3[surf, samples=18, domain=-3:3] {exp(-x^2-y^2)*x};
  \end{axis}
\end{tikzpicture}
\end{document}
```

4. Commutative Diagrams (tikz-cd)

```tikz
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
  T \arrow[drr, bend left, "x"] \arrow[ddr, bend right, "y"] \arrow[dr, dotted, "{(x,y)}" description] & & \\
  K & X \times_Z Y \arrow[r, "p"] \arrow[d, "q"] & X \arrow[d, "f"] \\
    & Y \arrow[r, "g"]                           & Z
\end{tikzcd}
\end{document}
```

5. Chemical Structures (chemfig)

```tikz
\usepackage{chemfig}
\begin{document}
\chemfig{[:-90]HN(-[::-45](-[::-45]R)=[::+45]O)>[::+45]*4(-(=O)-N*5(-(<:(=[::-60]O)-[::+60]OH)-(<[::+0])(<:[::-108])-S>)--)}
\end{document}
```

🔧 Troubleshooting

Windows: "MiKTeX session could not be initialized"

If you encounter a MiKTeX session initialization error on Windows, register the MiKTeX DLLs manually in an Administrator Command Prompt (adjust version if different):

cd %LOCALAPPDATA%\Programs\MiKTeX\miktex\bin\x64
regsvr32 MiKTeX240400-core-PS.dll
regsvr32 MiKTeX240400-core.dll
regsvr32 MiKTeX240400-packagemanager.dll
regsvr32 MiKTeX240400-packagemanager-PS.dll

Executable not found in PATH

If the "Test Toolchain" button reports that latex or dvisvgm cannot be found:

  • Provide the full absolute path in the plugin settings (e.g. C:\Program Files\MiKTeX\miktex\bin\x64\latex.exe or /Library/TeX/texbin/latex).
  • Ensure the directory containing your TeX executables is in your system's environment PATH.

🔒 Security & Desktop Architecture

This plugin is configured as desktop-only ("isDesktopOnly": true) because it relies on your local TeX distribution:

  • Process Execution (child_process.execFile): The plugin executes your locally installed LaTeX compiler and dvisvgm. Commands are invoked strictly via execFile with segregated argument arrays (no shell interpolation), protecting against shell injection.
  • Filesystem Access (fs/promises): Temporary .tex, .dvi/.xdv/.pdf, and .svg files are created exclusively inside an isolated temporary directory within your system's tmpdir() (e.g. tmpdir()/tikz-XXXXXX). This directory is deleted in a finally block immediately after conversion.
  • Offline & Private: The plugin performs zero external network calls and executes no dynamic script tags. Diagram source code is rendered locally on your machine and cached within local browser IndexedDB.

📄 License & Acknowledgements

  • Licensed under the MIT License.
  • Forked from the Obsidian TikZJax plugin by @artisticat1.
  • Inspired by the TikZJax project by @kisonecat.
HealthExcellent
ReviewSatisfactory
About
Render LaTeX and TikZ diagrams directly in notes using your local TeX distribution and dvisvgm, supporting any installed packages (pgfplots, circuitikz, chemfig, tikz-cd, forest, etc.). Compile to cached SVG for instant reopen, auto-adjust visuals for dark mode, and surface highlighted LaTeX error logs.
LaTeXDrawingImages
Details
Current version
1.0.4
Last updated
2 days ago
Created
5 months ago
Updates
5 releases
Downloads
19
Compatible with
Obsidian 1.0.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
Agostino CesaranoAgostino Cesaranoagostino-code
github.com/agostino-code
GitHubagostino-code
  1. Community
  2. Plugins
  3. LaTeX
  4. LaTeX and TikZ Renderer

Related plugins

Ink

Handwriting and drawing directly between paragraphs using a digital pen, stylus, or Apple pencil.

TTRPG Tools - Maps

A toolbox for interactive fantasy maps.

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Latex Suite

Make typesetting LaTeX math as fast as handwriting through snippets, text expansion, and editor enhancements.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Image Captions

Add captions to images with inline Markdown and link support. The caption format is compatible with the Commonmark spec and other Markdown applications.

Featured Image

Automatically set a featured image property in your notes based on the first image.

Imagine

A comprehensive image management plugin for managing, inserting, resizing, viewing, and batch processing images.

Pretty Properties

Makes note properties look more fun: adds side image, banners, list property colors and allows to hide specific properties.

Local Images Plus

A reincarnation of Local Images to download images in Markdown notes to local storage.