Omd2Typst

approvedunreviewed

by A.W. Alberts

Export your notes to professional looking PDFs via Typst. Auto-adding a cover page, revision page, TOC and optional figure list.

★ 5 stars↓ 2,131 downloadsUpdated 7d agoAGPL-3.0

Omd2Typst logo

Omd2Typst

Export your Obsidian notes to professionally typeset PDFs — with a structured cover page, auto-numbered table of contents, callout blocks, tables, images, and support for five languages — using Typst, a modern document compiler.

Desktop only — macOS, Windows, Linux. Not available on mobile.


Screenshots

Command palette

Command palette showing the four Omd2Typst commands:

Command palette showing the four Omd2Typst commands

Settings

Default settings

Default settings, without Typst installed. No export to PDF, only export to .typ.

Default Omd2Typst settings

Configured settings

Configured settings with, sample template, installed Typst version and template for the frontmatter.

Configured Omd2Typst settings — template, Typst compiler status, and output options

Context menu

The right-click context menu with the two options "Export as PDF" and "Export as Typst".

Right-click context menu with Export as PDF and Export as Typst source

Frontmatter

Frontmatter from the sample input file. with the Sample input file with frontmatter Sample input file — cover page and table of contents

PDF output

The sample PDF output, shows the Typst generated output from the input file. Download the example input files and templates to get started.

This partial PDF output shows the added front page, the added revision and approval page and the table-of-contents. The optional figure-list is not shown here.

Sample PDF output — cover page and table of contents


Requirements

  • Obsidian 1.4.0 or later
  • Typst — required for PDF export
    • Install: brew install typst (macOS) · winget install --id Typst.Typst (Windows) · or download from typst.app
    • The plugin searches common locations automatically; no path configuration needed in most cases
    • Without Typst, .typ source export still works — PDF export shows an install notice

Installation

Via the Community Plugin browser (recommended)

  1. In Obsidian: Settings → Community plugins → Browse
  2. Search for Omd2Typst
  3. Click Install, then Enable

Manual install

  1. Download main.js and manifest.json from the latest release
  2. Create a folder .obsidian/plugins/obsidian-omd2typst/ inside your vault
  3. Copy both files into that folder
  4. In Obsidian: Settings → Community plugins → enable Omd2Typst

Features

  • Export the active note as PDF or Typst source (.typ) from the command palette or the right-click file menu
  • Cover page — populated from YAML frontmatter (title, subtitle, author, date, version, status, summary)
  • Table of contents with numbered headings
  • Revision and approval tables — extracted from named sections and placed before the TOC
  • 13 callout types with Lucide SVG icons (note, tip, warning, danger, bug, quote, …)
  • 10 checkbox variants (- [ ] to - [*])
  • Custom templates — register any .typ file in your vault; .typ files are visible in the vault navigator and file pickers without enabling Show all file types; supported languages are detected automatically
  • Five languages — nl · en · de · es · fr; the default language dropdown updates automatically when you switch templates
  • Frontmatter insertion — insert a configurable YAML frontmatter block; existing keys are never overwritten
  • Output location — same folder as note, fixed folder (with vault autocomplete), or ask every time
  • Bundles for pipelines — export a note with all its images (including rendered Mermaid diagrams and Excalidraw drawings) as a folder, and convert it later with the command line tool, for example in a CI/CD pipeline, without Obsidian

Commands

CommandPaletteRight-click menu
Export as PDF✓✓
Export as Typst source (.typ)✓✓
Export as bundle (folder with images)✓✓
Export as bundle to a chosen folder…✓✓
Insert omd2typst frontmatter✓—
Export built-in template✓—

Export as bundle

Export as bundle writes a folder outside your vault that you can convert anywhere with the command line tool, without Obsidian:

<bundle folder>/My note/
  My note.md          the note as plain Markdown
  assets/             every image the note uses
  .omd2typst-bundle   marker: only folders with it are replaced
  • Everything Obsidian renders is included as an image: normal images (all link styles), Mermaid diagrams, Excalidraw drawings (see the Excalidraw drawings setting) and Bases tables (as Markdown tables). Image references are relative (assets/…), and images that share a file name get a unique name.
  • Convert it from inside the folder: cd "My note" && omd2typst "My note.md" "My note.pdf". Add --template, --wikilinks and the other options as you like; they are not baked into the bundle.
  • Made for CI/CD. Everything Obsidian has to render is already in the bundle, so a pipeline only needs the command line tool (one binary, Typst built in): no Obsidian, no vault, no Node. Export the notes with the plugin into a folder that is part of a repository, and let the pipeline convert every bundle. See Bundles and CI/CD in the command line tool's README.
  • The bundle is a snapshot. Export again after changing the note: the folder is replaced, but only if it carries the marker file, so another folder with the same name is never touched.
  • Not included: PDF, note and audio/video embeds (they stay placeholders), the template and the settings. Images that cannot be found are reported and left as they were.
  • Choosing the folder. Set it in the settings (type a path or press Choose folder…), or just run the command: the first time, with no folder set, a folder dialog opens and your choice is remembered. Export as bundle to a chosen folder… opens the dialog every time and saves nothing, to put one bundle somewhere else.
  • The bundle folder must be outside the vault, so exported files never end up among your notes. Enable Open folder after exporting a bundle to show the result in your file manager.
  • If a future Obsidian version removes the folder dialog, type the path in the settings instead.

Settings

Typst templates

SettingDescription
Template listEach registered template shows its name, vault-relative path, and the languages detected from its _lang_strings dictionary.
Add templateSelect a .typ file from the vault using the autocomplete picker. The name is auto-filled from the filename and can be edited before adding.
Default templateUsed for right-click exports and as the pre-selected option in palette exports. Changing this also updates the available Default language options.

Export

The top of the Export section shows the detected Typst version and path, or "Typst not found" with an install hint. This is a status indicator — not a configurable option.

SettingDescription
Default output formatPDF or Typst source (.typ).
Output locationSame folder as note / Fixed folder (vault folder autocomplete) / Ask every time.
WikilinksDisplay text (default) / Bold display text / Links / Keep as typed. Links: [[#Heading]] becomes a link to that heading in the PDF, and links to other notes become obsidian:// links that open the note in Obsidian — the vault name is stored in the PDF. Links to headings that don't exist, or to other notes in non-link modes, show as plain text.
Math syntaxLaTeX (default, as Obsidian renders formulas) or Typst. LaTeX formulas are converted to Typst math; a formula that cannot be converted is passed through as typed. The choice applies to every note you export.
Excalidraw drawingsPNG image (default, looks exactly like Obsidian), SVG image (sharp when zoomed, but text uses a normal font because Typst cannot use Excalidraw's hand-drawn web font) or Do not render (placeholder). Drawings always use the light theme.
Use file name as captionOff by default. When on, an image without alt text gets its file name as caption (also Excalidraw drawings). Alt text, as in ![[image.png|200|alt text]], always wins.
Bundle folderWhere Export as bundle saves its folders. Type a path or press Choose folder… to pick one in the system dialog. Must be outside your vault; a short message appears if it is not. If empty, you are asked the first time you export a bundle.
Open folder after exporting a bundleOff by default. When on, the exported bundle folder opens in your file manager.
Image width reference (px)Default 700. Image sizes such as ![[image.png|400]] are pixels in Obsidian, where they take a share of the note width. In the PDF the number is converted to the same share of the text width: size ÷ this value, at most 100%. With 700 (Obsidian's default Readable line length), |400 becomes 57% and |350 50%. Enter your own line width if you changed it or use a wider editor. 0 reads the sizes as points (the behaviour before 0.12.0).

Document defaults

SettingDescription
Default languageApplied when the note has no language: frontmatter key. Options are limited to the languages supported by the selected default template.
Frontmatter template sourceControls how the Insert omd2typst frontmatter command works — see below.

Frontmatter template source modes

ModeBehaviour
Inline editorEdit key: value lines directly in settings. Running the command inserts any missing keys (with their default values) into the active note's frontmatter. Existing keys are never overwritten.
Template fileSelect a .md file in the vault: search for it in the field, or press Choose file… to pick it in the system file dialog (the file must be inside the vault). The command reads that file's frontmatter and inserts missing keys (with their values) into the active note. A message appears if the file is not found.
User definedThe built-in insert command is disabled. Use Templater, the Templates core plugin, or any other frontmatter tool of your choice.

Supported Markdown features

Full coverage of standard Markdown plus the most-used Obsidian extensions:

FeatureNotes
Headings # H1 … ###### H6Level offset applied automatically when document has a title
Bold, italic, strikethrough**, *, ~~
Highlight==text==; a coloured dot right after == picks the colour: ==🔴text== (🔴 red, 🟠 orange, 🟡 yellow, 🟢 green, 🔵 blue, 🟣 purple)
Inline and display math$…$ and $$…$$; LaTeX by default (converted to Typst), Typst syntax via the Math syntax setting
Code blocks with language tagLanguage label preserved
TablesLeft / center / right alignment
Images — standard ![alt|width](path) and double bracket ![[path|width|alt text]]Width in Obsidian pixels, converted to a share of the text width (see the Image width reference setting); width and alt text can be given in any order; the alt text becomes the figure caption
Callouts > [!type] Title13 built-in types with Lucide SVG icons
Block quotes > textLeft accent bar
Checkbox lists10 variants: [ ] [x] [/] [-] [>] [!] [?] [i] [I] [*]
Footnotes [^1]Rendered at page bottom
Superscript <sup> / subscript <sub>HTML inline tags
Obsidian wikilink images ![[…]]Converted automatically
Wikilinks [[Note]], [[Note|alias]], [[#Heading]]Rendered per the Wikilinks setting (display text by default)
Thematic breaks ---Full-width rule
Mermaid diagramsRendered via Obsidian's Mermaid; embedded as SVG. Multi-line labels are preserved: explicit <br> in the source becomes a hard break, and long labels are auto-wrapped at word boundaries to fit the node — the wrap point matches Obsidian's preview ± ~1 word. Emoji codepoints in labels are stripped — resvg (Typst's SVG renderer) can't render color-emoji glyphs cleanly, so the plugin removes them and keeps the surrounding text (e.g. Foo 📊 Bar → Foo Bar).
Excalidraw drawings ![[Drawing.excalidraw]]Rendered with the Excalidraw plugin (light theme, white background) to a PNG (default) or SVG image; |width is respected. Falls back to an image the Excalidraw plugin auto-exported next to the drawing. Frame embeds (#^frame=…) are not rendered.
Obsidian Bases embeds ![[file.base]]Rendered via Obsidian's embed registry as a Markdown table

For the complete feature reference including YAML frontmatter keys, callout icon colours, and checkbox meanings, see the omd2typst README.


Template authoring

Templates are standard Typst files that export a template function (document wrapper) and a callout function.

Declare supported languages by defining a _lang_strings dictionary:

#let _lang_strings = (
  "nl": ( toc: "Inhoudsopgave", ... ),
  "en": ( toc: "Table of Contents", ... ),
)

The plugin detects language support automatically — no annotation needed. Language codes appear as badges in the template list and limit the Default language dropdown.

To start from the built-in template, run Export built-in template — it writes omd2typst-template.typ to the vault root.


Privacy

The plugin makes no network requests and collects no data. All processing is local:

  • Markdown-to-Typst conversion runs inside a WASM module bundled inside main.js
  • PDF compilation runs the locally installed typst binary via child_process
  • No analytics, no telemetry, no external services

Contributing

Project structure and build instructions

Project structure

src/
  main.ts           — plugin lifecycle, commands, context menus
  settings.ts       — settings types, defaults, and settings tab UI
  exporter.ts       — export pipeline: read note → WASM → write output / compile PDF
  frontmatter.ts    — frontmatter parse, merge, and insert logic
  template.ts       — template language detection and resolution
  output.ts         — output path resolution for all three output modes
  typst-cli.ts      — findTypstBinary, detectSystemTypst, compileToPdfViaCli
  wasm/
    omd2typst.ts    — lazy-init wrapper around omd2typst WASM
    omd2typst-pkg/  — generated by wasm-pack (gitignored; WASM bundled into main.js at build)
libs/
  omd2typst/        — git submodule: omd2typst Rust repo (pinned commit)
scripts/
  build-wasm.sh     — runs wasm-pack inside the submodule

Build

git submodule update --init       # pull omd2typst Rust source
./scripts/build-wasm.sh           # wasm-pack build → src/wasm/omd2typst-pkg/
npm install                        # dev dependencies
npm run build                      # esbuild → main.js (omd2typst WASM bundled in)
npm test                           # Jest unit tests

Install into a vault (development)

VAULT=~/path/to/your/vault
mkdir -p "$VAULT/.obsidian/plugins/obsidian-omd2typst"
cp main.js manifest.json "$VAULT/.obsidian/plugins/obsidian-omd2typst/"

Then enable the plugin in Obsidian → Settings → Community Plugins.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.