Skip to content

MDLeaf

Markdown on real pages. Running headers and footers, a table of contents with page numbers, keep-together rules and PDF export — in an offline web app.

MDLeaf is an installable web app for writing Markdown that is laid out like a word-processor document. You type Markdown in a source editor; next to it a live preview shows either a continuous draft view or real pages. What you see in page view is what you get in the PDF.

Real pages

Page size, orientation and margins come from a profile. Page breaks, running headers and footers, and page numbering are written in the document with a few short directives.

Works offline

After the first visit everything runs without a network: editing, pagination, PDF export, image re-encoding and the built-in fonts.

Keyboard first

Every command has a shortcut, shown on its button. The command palette finds everything, and every shortcut can be changed.

Portable files

Documents, images and their page setup travel together in a single .mdl file. In Chromium you can also keep a document in a normal folder on disk.

running-headers/document.md
::header[*Field guide*||Chapter 1]
::footer[|Page {page} of {pages}|]
# Chapter 1
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
::pagebreak
::header[*Field guide*||Chapter 2]
# Chapter 2
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
MDLeaf lays Markdown out on real pages. Paragraphs flow from page to page, and the page view shows exactly what the PDF will contain.
Headers and footers have left, centre and right slots, take {page} and {pages}, and change from the page that defines them.
Download sample (.mdl)

Open it in MDLeaf with Library → Import .mdl. If MDLeaf is installed, you can also open the file directly.

Continue with installing MDLeaf or jump to the syntax cheat sheet.