Markdown text and structure in PDF

Each everyday part of a document has its own sample here, with its rendered pages and its PDF. Open one in the editor to change it and convert again.

Headings, inline formatting, lists, tables, footnotes, embedded HTML and the document furniture around them.

In the Markdown reference

Headings & table of contents, first page

Headings & table of contents

# through ###### plus setext, a [TOC] with page numbers and leader dots, and a PDF outline bookmark for every heading.

Inline formatting, first page

Inline formatting

Bold, italic, code and strikethrough nest freely, plus ==highlight==, <kbd> keys, ^superscript^ and ~subscript~ for units and formulas in prose.

Smart typography & hard breaks, first page

Smart typography & hard breaks

"Straight quotes" turn curly, -- and --- become dashes, ... becomes an ellipsis, and code is never touched. Toggle: smart_typography.

Lists, first page

Lists

Bullets nest with two-space indentation, numbered lists renumber themselves and can start anywhere, and Term/: definition lists set a glossary.

Task lists, clickable checkboxes, first page

Task lists, clickable checkboxes

- [ ] becomes a real form checkbox you can tick in the PDF viewer, nested or not. Toggle: tasks (off: printed markers).

Tables, first page

Tables

Column alignment via |:---:| separators, rich cells with math and links, numeric columns, and a header that repeats when a long table breaks across pages.

Links & internal anchors, first page

Links & internal anchors

Inline, reference-style and automatic links, bare URLs and email addresses that become links on their own, and jumps to headings inside the document.

Footnotes, first page

Footnotes

[^name] references collect as numbered footnotes at the end of the document, with formatting and links inside them.

Blockquotes, alerts & rules, first page

Blockquotes, alerts & rules

Quoted blocks that nest and hold lists, horizontal rules, and the five alert kinds > [!NOTE] through > [!CAUTION] with their colors.

Embedded HTML & CSS, first page

Embedded HTML & CSS

HTML blocks render with their own styles: a table with rowspan and colspan, a styled box with a <style> block, inline SVG. Each block's CSS is scoped to it. Toggle: html_blocks.

The sample documents describe invented organizations in several countries. All names and figures are illustrative.