This document displays all supported features. Open the document on the side with a text editor to see how things are done.
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
This is a ruler
This one too
Only unordered bullets are supported for now.
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 --
.
“Smart double-quoting” and ‘smart single-quoting’.
http://www.google.com
https://www.google.com
<http://example.com>
becomes http://example.com.<user@example.com>
becomes user@example.com.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:
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)
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*"
}
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>"
Selected words are automatically rendered as code if they aren't already marked as inline code.
https://www.example.com
/usr/share/mdview/examples
Learn more (test file)
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)
mdview can extract a translation template from the current document, and display a translation of the document using the GNU gettext library.