Skip to content
![MergDown2TeX Logo](assets/logo-horizontal.png)

MergDown2TeX

Merge everything. Convert anywhere.

The fastest way to go from Obsidian to LaTeX. Zero dependencies inside Obsidian.

Get Started View on GitHub


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

    Learn more

  • Embeds


    ![[Note]] → Recursive expansion with depth limit

    Learn more

  • Citations


    @citation\citep{} with ↑↓ arrows

    Learn more

  • Equations


    $math$ → LaTeX equations with numbering

    Learn more

  • Mermaid Diagrams


    ```mermaid `` → Rendered PNG images

    Learn more

  • PDF Compilation


    One click to PDF via TeX Live + Podman

    Learn more


How it works

sequenceDiagram
    participant U as User
    participant O as Obsidian
    participant W as WASM Engine
    participant T as TeX Live
    participant P as Podman

    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
    O->>P: Launch container
    P->>T: Run pdflatex (3x)
    T->>P: Generate PDF
    P->>O: Return PDF
    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

  1. Download main.js, manifest.json, vlatex_bg.wasm from Releases
  2. Copy to .obsidian/plugins/mergdown2tex/
  3. Enable in Settings → Community Plugins

Requirements

Step What you need
Markdown → LaTeX None (WASM runs in Obsidian)
LaTeX → PDF TeX Live + Podman
LaTeX → DOCX Pandoc

Why MergDown2TeX?

Pandoc Plugin Pandoc CLI MergDown2TeX
Install required Pandoc + TeX Live Pandoc + TeX Live WASM only
Wikilink resolution
Embed expansion
Citation arrows (↑↓)
Mermaid → PNG
Custom preamble Partial Manual
InDesign output
Cross-platform ⚠️ ⚠️

Support


License

Free for personal, academic, community use.
Commercial: contact author.