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 Compiler

moshe kalman weinstockmoshe kalman weinstock109 downloads

Compile LaTeX directly within code blocks to PDF or SVG, and include vault files. No separate LaTeX installation required.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates7

This Obsidian plugin lets you use a full LaTeX compiler right inside Obsidian code blocks. You can write complete documents, use files and images from your vault, and export your work as a PDF or SVG. It works just like a regular LaTeX setup, but everything happens in Obsidian. All you need to do is install the plugin; no extra steps required. Despite what it can do, it’s small, uses memory carefully, and works on Android too.

The plugin includes two LaTeX engines, pdfTeX and XeTeX. It downloads TeX Live packages as needed and caches them for future use. You can reference files in your vault as you would in a regular LaTeX project, and the plugin makes them available during compilation. It then displays the result as a PDF or converts it to SVG using poppler-pdf2svg, caching the result for later use. You can also view a formatted compilation log at any time.

LaTeX rendered as PDF
latex -> PDF
LaTeX rendered as SVG
latexsvg -> SVG

Disclosures

Network use: The plugin connects to texlive.texlyre.org, a third-party TeX Live mirror maintained by Texlyre, to download TeX files needed for compilation that are not already cached. Downloaded files are cached locally for future offline use. Internet access is required for uncached downloads.

Features

Write complete LaTeX documents.

The plugin is designed to behave like a normal LaTeX compiler, rather than a limited renderer for equations or TikZ. It supports complete and complex LaTeX documents, including document classes, sections, environments, macros, and multi-page output.

Render as PDF or SVG

You can render the same LaTeX as either a PDF or SVG. To render the code block as a PDF, use the latex language in the header; for SVG, use the latexsvg language. You can switch between them anytime by changing the code block language.

Demo

You can control the SVG background and sizing behavior from the plugin settings, and exported notes are handled correctly whether the code block renders as PDF or SVG.

TikZ code blocks

If you already use tikz code blocks, you can keep them as-is. The plugin supports the same block type for compatibility, so you don’t need to rewrite existing notes.

Use files from your vault, even code blocks

Your LaTeX code doesn’t have to be in just one code block. You can reuse code and include images by referencing them just like you would in a regular LaTeX project.

For example, suppose your vault looks like this:

Vault/
├── MathNotes/
│   ├── references.bib
│   ├── shared/
│   │   └── mathmacros.sty
│   └── chapters/
│       ├── introduction.tex
│       └── math.md
└── attachments/
    └── diagram.png

If your LaTeX block is inside MathNotes/chapters/math.md, paths are resolved relative to that note.

% You can reference a file in the same folder:
\input{introduction.tex}

% go up one folder:
\addbibresource{../references.bib}

% go up one folder and into another:
\usepackage{../shared/mathmacros}

% or start from the vault root:
\includegraphics{/attachments/diagram.png}

You can also use ./ explicitly for the current directory, so ./introduction.tex and introduction.tex both refer to the same file here.

This works with most other files, like. .png, .cls, and .pk, basically any files that LaTeX can use.

Code-block dependencies

You can reference another code block as a dependency. If a block is only meant to be included elsewhere and doesn't need to render on its own, use the latex-file code block type and give it a name:

```latex-file name: my-super-amazing-codeblock
Some incredible LaTeX...
```

To reference it, add:: before the name you gave the code block:

\input{::my-super-amazing-codeblock}

And if the code block is in another note, put the note path before::

\input{some note.md::my-super-amazing-codeblock}

The same name: syntax also works with latex, latexsvg, and tikz code blocks. You can also reference those blocks as dependencies, just unlike latex-file, they will still compile and render normally.

Dependencies demo

Use TeX packages

The compiler can use TeX Live packages just like a normal LaTeX installation. If a required package is not already available, the plugin downloads it automatically and caches it for future compilations.

You do not need a constant internet connection to use the plugin. You only need internet access the first time a package is downloaded; after that, you can reuse the cached copy offline.

This means you can use packages such as TikZ, amsmath, bibliography tools, and many others without installing or configuring TeX separately.

Work with your rendered output.

Every render has a menu with actions for working with the generated result. You can save the output to your vault, inspect the compilation log, recompile the code block, and access additional actions specific to PDF or SVG output. To open the menu for an SVG render, right click the SVG. For a PDF render, click the three-dot menu in the top-right corner of the PDF toolbar.

LaTeX SVG demo

### See what TeX actually did

The plugin lets you avoid guessing what went wrong with your LaTeX or digging through the console. Compilation errors appear directly on the rendered block with the error message and, when possible, the relevant source line.

LaTeX missing file error

At any time, if you want to see the full LaTeX log, just open the menu and choose the log option. You'll get a structured view of the full log (which you can view and copy), a list of all warnings and errors, and a display showing the logged dependencies used and how they connect.

Log model demo

Runs on desktop and Android

The compiler runs inside Obsidian and doesn't need a system LaTeX installation or any other external program. This means the plugin also works on Android, where setting up a traditional TeX environment is usually much harder.

The bundled compiler and conversion runtimes have been heavily optimized for download size and memory usage, making a full LaTeX environment practical even on mobile devices.

iOS: Compilation is currently disabled on iOS, but cached renders can still be displayed. If you keep the cache in your vault, you can view synced renders from another device on iOS.


Development

The generated compiler worker files are included in the repository, so you do not need to build SwiftLaTeX or the PDF-to-SVG runtime from source just to build the plugin.

If you only want to build the plugin from the generated files already included in the repository, skip to Build the plugin.

Build everything from source

To rebuild the compiler and rendering components as well as the plugin itself:

  1. Clone this repository and enter it.
  2. Install the dependencies:
    npm install
    
  3. Clone the SwiftLaTeX fork.
  4. Install the Emscripten SDK and Git Bash.
  5. Create the local build configuration:
    Copy-Item scripts\local-config.example.ps1 scripts\local-config.ps1
    
    Then edit scripts/local-config.ps1 and fill in the required paths for your SwiftLaTeX checkout, Emscripten SDK, and Git Bash installation.
  6. From the plugin repository, build SwiftLaTeX:
    npm run build:swiftlatex
    
    This builds the pdfTeX, XeTeX, and DVIPDFM workers, copies them into the plugin source tree, and generates their compressed payloads.
  7. Build the poppler-pdf2svg fork, then replace:
    src/latexRender/pdfConversion/pdfToSvgWasm.js
    
    with the newly generated pdfToSvgWasm.js.
  8. Build and bundle the plugin:
    npm run build
    
    The final plugin bundle is written to main.js.

Build the plugin

If you do not need to rebuild SwiftLaTeX or the PDF-to-SVG runtime from source:

  1. Clone this repository and enter it.
  2. Install the dependencies:
    npm install
    
  3. Build and bundle the plugin:
    npm run build
    
    The final plugin bundle is written to main.js.

Acknowledgements

This plugin is based on obsidian-latex-render by fenjalien. Thank you for providing the starting point for this project.

Thanks also to SwiftLaTeX for making it possible to run LaTeX engines in the browser (this plugin uses a modified fork), and to Texlyre for maintaining the TeX Live mirror used to download packages on demand.

HealthExcellent
ReviewSatisfactory
About
Write and compile complete LaTeX documents directly in Obsidian using pdfTeX or XeTeX. Display results as PDF or SVG, export your output, and view detailed compilation logs. Include images, bibliography files, custom packages, and other files from your vault. Reuse content from other code blocks to keep your documents organized. Required TeX Live packages download automatically and are cached for offline reuse. Works on desktop and Android, with no separate LaTeX installation required.
LaTeXExportFiles
Details
Current version
1.0.6
Last updated
5 days ago
Created
2 years ago
Updates
7 releases
Downloads
109
Compatible with
Obsidian 1.8.7+
Platforms
Desktop, Mobile
License
AGPL-3.0
Report bugRequest featureReport plugin
Author
moshe kalman weinstockmoshe kalman weinstockkalmanmoshe
GitHubkalmanmoshe
  1. Community
  2. Plugins
  3. LaTeX
  4. Latex Compiler

Related plugins

Print

Print notes and documents directly from your workspace.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Latex Suite

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

Advanced URI

Control everything with URI.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

Quick Explorer

Perform file explorer operations (and see your current file path) from the title bar, using the mouse or keyboard.