This document displays all supported features. Open the document on the side with a text editor to see how things are done.
Levels 1-3 headings comprise one to three # characters followed by the heading text.
# Heading 1
## Heading 2
### Heading 3
An alternative notation 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
---
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, and em-dash: — .
“Smart double-quoting” and ‘smart single-quoting’.
Links:
http://www.google.com
https://www.google.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)
Code block (each line starts with 4 spaces or tabs):
function a()
b="*c*"
}
GFM code block (start and end with 3 backticks):
function a()
b="*c*"
}
GFM code block with syntax tag (append tag name immediately after opening backticks):
export DIALOG=" "
No, 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 table syntax, and displays the table as an unstyled code block. Therefore, if the original table text is aligned, the output table will remain aligned and roughly look like a set of “columns” instead of imploding into a single line of gibberish.
| Subject | Verb | Object |
| ------- | ---- | ------ |
| I | say | potato |
| You | say | potato |
Learn more (test file)
Some words are automatically rendered as code even though they are not surrounded by backticks.
https://www.example.com
/usr/share/mdview/examples
Learn more (test file)
If you use the -x
option, mdview will run shell code embedded in the document:
$LANG is en_US.UTF-8.
(run mdview -x
to see the code above turn into shell code output)
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.