This document displays all supported features. Open the document on the side with a text editor to see how things are done.


Heading

Level 1 through 6 headings comprise one to six leading # characters followed by space then the heading text.

# Heading 1
## Heading 2
### Heading 3
etc.

An alternative notation for levels 1 and 2 is also available. Level 1 headings are specified by underlining the heading with a row of = characters. Level 2 headings are specified by underlining with a row of - characters.

Heading 1
===

Heading 2
---

see all headings and read notes


Ruler

This is a ruler


This one too


Bullets

Only unordered bullets are supported for now.

Inline styles

italic1, italic2, bold1, bold2, inline code, and inline code again, then bold-italic1, bold-italic2, bold-italic3, bold-italic4.

We also have non-standard strikethrough as ---strikethrough---, and strikethrough as ~strikethrough~, and em-dash — as --.

Extension: smart quotes

“Smart double-quoting” and ‘smart single-quoting’.

Links

Autolinks

Images

Local image files can be displayed inline using image link syntax. The image path is resolved first relative to the document directory then to the current file.

Inline image support: This should be a picture of Tux

Paragraphs and line breaks

A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines. A blank line consists of only white-space characters or no characters. To insert a hard line break after a line of text, you end the line with two or more spaces.

This line ends with . This line ends with one space. This line joins the line above.

This line ends with . This line ends with two spaces.
This line does not join the line above.

Learn more (test file)

Code blocks

An indented code block: each line starts with at least 4 spaces or 1 tab. An empty line is required before the indented code block:

function a()
  b="*c*"
}

Extension: fenced code block

A fenced code block starts and ends with 3 backticks on separate lines.

function a()
  b="*c*"
}

Fenced code block with syntax tag (append the syntax tag immediately after the opening backticks:

export DIALOG="<widget></widget>"

Extension: auto-code words

Selected words are automatically rendered as code if they aren't already marked as inline code.

Learn more (test file)

Extension: Table block

Mdview does not support table alignment and formatting. However, considering that many authors neatly pre-align text tables in their markdown documents, mdview can recognize the so-called “pipe” table syntax and display the table as a block of text using a monospace font. Effectively, if the original table text is pre-aligned, the output table remains aligned and roughly looks like a set of “columns”, instead of folding into a single line of text.

| Subject | Verb | Object  |
| ------- | ---- | ------- |
|     You | like | potayto |
|       I | like | potahto |

Learn more (test file)

Translations

mdview can extract a translation template from the current document, and display a translation of the document using the GNU gettext library.

Learn more