
MergDown2TeX¶
Merge everything. Convert anywhere.¶
The fastest way to go from Obsidian to LaTeX. Zero dependencies inside Obsidian.
What is MergDown2TeX?¶
MergDown2TeX is an Obsidian plugin that transforms your notes into publication-ready LaTeX documents. It merges everything — embeds, citations, Mermaid diagrams, equations, cross-references — into a single .tex file.
graph LR
A[Obsidian Note] --> B[WASM Engine]
B --> C[.tex File]
C --> D[PDF]
C --> E[DOCX]
C --> F[InDesign]
Features¶
-
Wikilinks
[[Note]]→\hyperref[...]{}with bidirectional navigation -
Embeds
![[Note]]→ Recursive expansion with depth limit -
Citations
@citation→\citep{}with ↑↓ arrows -
Equations
$math$→ LaTeX equations with numbering -
Mermaid Diagrams
```mermaid`` → Rendered PNG images -
PDF Compilation
One click to PDF — Pandoc WASM + Typst (default, mobile OK) or TeX Live + Podman
How it works¶
sequenceDiagram
participant U as User
participant O as Obsidian
participant W as WASM Engine (embedded)
participant T as Typst WASM
participant L as TeX Live (Podman, PC)
U->>O: Click "Compile to PDF"
O->>W: Send markdown content
W->>W: Expand embeds
W->>W: Resolve wikilinks
W->>W: Convert to LaTeX
W->>O: Return .tex file
alt Typst pipeline (default / mobile)
O->>T: pandoc.wasm + typst.wasm
T->>O: Generate PDF
else native LaTeX (PC, optional)
O->>L: Launch container (vlatex-env)
L->>L: pdflatex x3
L->>O: Generate PDF
end
O->>U: Open PDF
Quick Example¶
Input:
---
title: "My Paper"
---
# Introduction
This paper discusses [[Related Work]] and cites @smith2020.
![[Figure 1.png]]
## Methods
We use the formula $E = mc^2$.
Output:
\documentclass[12pt]{report}
\usepackage{hyperref}
\usepackage{cite}
\title{My Paper}
\begin{document}
\section{Introduction}
This paper discusses \hyperref[related-work]{Related Work} and cites \citep{smith2020}.
\includegraphics{figures/figure_1.png}
\section{Methods}
We use the formula $E = mc^2$.
\end{document}
Install in 3 steps¶
- Download
main.js,manifest.jsonfrom Releases - Copy to
.obsidian/plugins/mergdowntotex/(the WASM engine is embedded inmain.js;pandoc.wasm/typst.wasmauto-download at first export) - Enable in Settings → Community Plugins
Requirements¶
| Step | What you need |
|---|---|
| Markdown → LaTeX | None (WASM embedded in main.js) |
| LaTeX → PDF (default) | None (Pandoc WASM + Typst, auto-downloaded) |
| LaTeX → PDF (native) | TeX Live + Podman/Docker (optional, PC) |
| LaTeX → DOCX | None (Pandoc WASM, auto-downloaded) |
Why MergDown2TeX?¶
| Pandoc Plugin | Pandoc CLI | MergDown2TeX | |
|---|---|---|---|
| Install required | Pandoc + TeX Live | Pandoc + TeX Live | WASM only (Pandoc via WASM) |
| Wikilink resolution | ❌ | ❌ | ✅ |
| Embed expansion | ❌ | ❌ | ✅ |
| Citation arrows (↑↓) | ❌ | ❌ | ✅ |
| Mermaid → PNG | ❌ | ❌ | ✅ |
| Custom preamble | Partial | Manual | ✅ |
| InDesign output | ❌ | ❌ | ✅ |
| Cross-platform | ⚠️ | ⚠️ | ✅ |
Support¶
- GitHub Issues
- Documentation
- Discord (coming soon)
License¶
Free for personal, academic, community use.
Commercial: contact author.