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

mergdowntotex

DJONTSO V. dvrchipro@gmail.comDJONTSO V. [email protected]80 downloads

Merge & doc. export everything — embeds, Zotero/Pandoc citations, Mermaid, equations, cross-refs — into a unique .tex file. Compile to PDF, DOCX, or InDesign. WASM engine, zero build step.

Add to Obsidian
mergdowntotex screenshot
  • Overview
  • Scorecard
  • Updates3

mergdown2tex Logo

mergdowntotex

Merge everything. Convert anywhere.
WASM engine runs inside Obsidian. No build step required.


What it does

mergdown2tex takes your Obsidian note and transforms it into a publication-ready LaTeX document. Everything is merged automatically:

Input Output
[[Wikilinks]] \hyperref[...]{} cross-references
![[Embedded notes]] Recursive expansion
![[image.png]] \includegraphics{}
@citation \citep{} + bidirectional arrows (↑↓)
$math$ / $$math$$ LaTeX equations
Mermaid diagrams Auto-rendered to PNG
> [!note] callouts tcolorbox environments
Footnotes, tables, lists Full LaTeX support

Output formats:

  • PDF via TeX Live + Podman
  • DOCX via Pandoc
  • .tex for manual editing
  • InDesign compatible output

How it works

┌─────────────────────────────────────────────────────────┐
│  Obsidian Note                                          │
│  ├── [[Note A]]          ──→  \input{note_a}           │
│  ├── ![[Note B]]         ──→  recursive expansion      │
│  ├── ![[image.png]]      ──→  \includegraphics{}       │
│  ├── @citation           ──→  \citep{} + arrows ↑↓     │
│  ├── $math$              ──→  LaTeX equation            │
│  └── ```mermaid```       ──→  rendered PNG              │
└─────────────────────────────────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────────┐
│  WASM Engine (inside Obsidian)                          │
│  ├── Markdown → LaTeX conversion (pure Rust)            │
│  ├── Embed expansion (filesystem)                       │
│  ├── Citation extraction + navigation                   │
│  └── Mermaid → PNG rendering                            │
└─────────────────────────────────────────────────────────┘
                        │
                        ▼
┌─────────────────────────────────────────────────────────┐
│  Output Files                                           │
│  ├── document.tex    (LaTeX source)                     │
│  ├── document.pdf    (compiled PDF)                     │
│  └── document.docx   (Word document)                    │
└─────────────────────────────────────────────────────────┘

Dependencies

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

For PDF/DOCX compilation

Install the LaTeX environment using the included Dockerfile:

# Build the container (one time)
podman build -t mergdown2tex-env -f Dockerfile .

# Or use Docker
docker build -t mergdown2tex-env -f Dockerfile .

The container includes:

  • TeX Live (full)
  • Pandoc
  • Python3 + Pygments (for minted)
  • All required LaTeX packages

Install

Manual install

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

Folder structure

.obsidian/
└── plugins/
    └── mergdown2tex/
        ├── main.js          ~2.8 MB   ← plugin + WASM embarqué
        └── manifest.json     351 B    ← metadata

Commands

Command Action
mergdown2tex: Convert to LaTeX Generate .tex file
mergdown2tex: Compile to PDF Generate PDF
mergdown2tex: Compile to DOCX Generate Word document

Settings

Setting Default Description
documentclass report LaTeX document class
fontsize 12pt Font size
bibliography "" Path to .bib file
customPreamble "" Custom LaTeX preamble
useMinted true Syntax highlighting with minted
useTcolorbox true Callouts as tcolorbox
mermaidDpi 150 Mermaid diagram resolution

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 ✅

Architecture

Release (2 files — installés par Obsidian) :

main.js          ~2.8 MB   ← plugin + WASM embarqué (Base64)
manifest.json     351 B    ← metadata

Développement (dans le repo) :

main.js             56 KB   ← plugin + WASM bindings
vlatex_bg.wasm     2.1 MB   ← WASM séparé (loaded from disk)
manifest.json       351 B   ← metadata
scripts/
└── bundle-release.js        ← encode WASM → Base64 → injecte dans main.js

Build release automatisé par GitHub Actions :

graph LR
    A[git tag 1.0.x] --> B[GitHub Actions]
    B --> C[bundle-release.js]
    C --> D[main.js + WASM]
    D --> E[Release]
    D --> F[Attestations]

Zero build step. WASM embarqué dans main.js à la release.


Troubleshooting

"WASM module not loaded"

  • Ensure vlatex_bg.wasm is in the same folder as main.js
  • Restart Obsidian

"Podman not found"

  • Install Podman: https://podman.io/getting-started/installation
  • Or use Docker instead

"Compilation failed"

  • Check that the container is built: podman images | grep mergdown2tex-env
  • Rebuild if needed: podman build -t mergdown2tex-env -f Dockerfile .

License

MIT


Support

  • GitHub Issues
  • Documentation
HealthExcellent
ReviewSatisfactory
About
Convert Obsidian notes into publication-ready LaTeX, PDF, DOCX or .tex with automatic expansion of wikilinks, embeds, images, citations zotero inegration and pandoc, math, table and Mermaid diagrams. Run a Rust/WASM engine inside Obsidian for Markdown→LaTeX conversion and compile to PDF (TeX Live + Podman) or DOCX (Pandoc++, citep & biblio).
ExportLaTeXPDF
Details
Current version
1.0.2
Last updated
Last month
Created
Last month
Updates
3 releases
Downloads
80
Compatible with
Obsidian 1.0.1+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
DJONTSO V. dvrchipro@gmail.comDJONTSO V. [email protected]dvrch
GitHubdvrch
  1. Community
  2. Plugins
  3. Export
  4. mergdowntotex

Related plugins

Pandoc Plugin

Commands to export to Pandoc-supported formats like DOCX, ePub and PDF.

Slides Extended

Create markdown-based reveal.js presentations. Fork of Advanced Slides.

qmd as md

Edit, preview, and render Quarto (.qmd) files with executable code cells via Quarto to PDF, DOCX, HTML, or reveal.js.

Marp Slides

Create Marp presentations.

PDF Highlights

Extract highlights, underlines and annotations from your PDFs.

PDF break page

Add shortkey and command to insert a break page formating for pdf exports.

Live PDF Preview

Real-time PDF preview and export plugin.

Text Extractor

A (companion) plugin to facilitate the extraction of text from images (OCR) and PDFs.

Karpathy LLM Wiki

Karpathy's LLM Wiki implementation - multi-page knowledge generation with entity/concept pages and conversational query.

Annotator

Read and annotate PDFs and EPUB files.