{:.no_toc}
Examples shows explicit examples for different syntaxes. Other Syntaxes show the syntaxes that can’t be shown explicitly.
@markdown
: supported by original markdown, hence understood to be supported by all variants of markdown@ghpages
: GitHub-Favored Markdown, built by kramdown with GFM option. i.e. GitHub Pages’ GitHub-Favored Markdown@mmd
: MultiMarkdown @pandoc
: pandoc-favored markdown@phpextra
: PHP Markdown Extra (inspired some syntax in pandoc and mmd and gfm, not exhaustively tested here)@...(partial)
: partial supports only@...(+...)
: when the extension is used@pandoc(--...)
: when the command line argument is used@pandoc(parsed)
: not verbatim, but parsedNote:
<!-- \begin{comment} -->...<!-- \end{comment} -->
. This is for mmd to tex to pdf use only. Ignore this.@markdown
See Emphasis and Other Syntaxes to see alternative Setext-style header styles @markdown
@markdown
@pandoc @phpextra
@pandoc
@pandoc
*testing* @markdown
Visually it looks like emphasis. Functionally it is much more, and called Critic Markup @mmd
See more at CriticMarkup—MultiMarkdown Documentation.
@markdown
3 or more hyphens or asterisks
@markdown
No break like this
Soft break
like this
Hard break
like this
@markdown(+smartypants) @pandoc(–smart) @ghpages
@mmd
@mmd @phpextra @pandoc(+abbreviations)
Testing abbreviations: HTML, W3C (mouseover it to see)
@markdown
@markdown
@markdown
Note about LaTeX output in mmd/pandoc:
@markdown
{ my code block }
@markdown
First paragraph.
Continued.
Second paragraph. With a code block, which must be indented eight spaces:
{ code }
@pandoc
9) Ninth
10) Tenth
11) Eleventh
i. i
ii. ii
iii. iii
(2) Two
(5) Three
1. Four
* Five
@mmd @phpextra @pandoc @ghpages
@ghpages @pandoc @mmd
Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
@pandoc
(@) My first example will be numbered (1). (@) My second example will be numbered (2).
Explanation of examples.
(@) My third example will be numbered (3).
(@good) This is a good example.
As (@good) illustrates, …
testing
@markdown\[\ket{a}\]
{.latex} @pandoc@markdown
test
test
test
# test
@markdown(partial:language-not-supported) @ghpages @pandoc @mmd
\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}
@pandoc
~~~markdown test test test # test ~~~
~~~ {#mycode .markdown .numberLines startFrom=“100”} test test test # test ~~~
@markdown
Test
test
test
test
test
test
@markdown
\newcommand...
@ghpages(partial) @pandoc
| The limerick packs laughs anatomical | In space that is quite economical. | But the good ones I’ve seen | So seldom are clean | And the clean ones so seldom are comical
| 200 Main St. | Berkeley, CA 94718
@ghpages @pandoc @mmd
@mmd
Grouping | ||
---|---|---|
Left align | Right align | Center align |
This | This | This |
column | column | column |
will | will | will |
be | be | be |
left | right | center |
aligned | aligned | aligned |
And a big grouping is like this |
@pandoc
Right Left Center Default ——- —— ———- ——- 12 12 12 12 123 123 123 123 1 1 1 1
Table: Demonstration of simple table syntax.
@pandoc
Centered Default Right Left Header Aligned Aligned Aligned ———– ——- ————— ————————- First row 12.0 Example of a row that spans multiple lines.
Second row 5.0 Here’s another one. Note the blank line between
rows.
Table: Here’s the caption. It, too, may span multiple lines.
+—————+—————+——————–+ | Fruit | Price | Advantages | +===============+===============+====================+ | Bananas | $1.34 | - built-in wrapper | | | | - bright color | +—————+—————+——————–+ | Oranges | $2.10 | - cures scurvy | | | | - tasty | +—————+—————+——————–+
@ghpages
—————–+————+—————–+—————- | |||
---|---|---|---|
Default aligned | Left aligned | Center aligned | Right aligned |
First body part | Second cell | Third cell | fourth cell |
Second line | foo | strong | blah |
Third line | blah | blah | bar |
—————–+————+—————–+—————- | |||
Second body | |||
2 line | |||
=================+============+=================+================ | |||
Footer row | |||
—————–+————+—————–+—————- |
This paragraph won’t be part of the note, because it isn’t indented.
A special kind of footnote [4]. @mmd
See more at Glossary—MultiMarkdown Documentation.
It can looks like footnotes in HTML output.
@mmd
See more at Citations—MultiMarkdown Documentation.
@pandoc
Very powerful but complicated. See more at Citations—Pandoc Documentation.
[ref]: image.png “optional title” {#id .class key=val key2=“val 2”}
figure
element in MultiMarkdown @mmd @pandoc
See more at Raw—MultiMarkdown Documentation. See test in [Babelmark 2 - Compare markdown implementations](http://johnmacfarlane.net/babelmark2/?normalize=1&text=%3Cdiv%3EThis+should+not+be+markdown+(or+is+it%3F%29+%3C%2Fdiv%3E%0A%3Cdiv+markdown%3D1%3EThis+is+markdown%3C%2Fdiv%3E).
Note: mmd accepts capitalized metadata keys but others do not. For maximum compatibility, author(s)
, title
, etc. should be in lower cases.
@mmd @pandoc(+mmd_title_block)
title: A Sample MultiMarkdown Document
author: Fletcher T. Penney
date: February 9, 2011
comment: This is a comment intended to demonstrate
metadata that spans multiple lines, yet
is treated as a single value.
CSS: http://example.com/standard.css
See more at Metadata—MultiMarkdown Documentation.
@pandoc
% title
% author(s) (separated by semicolons)
% date
@Mmd(partial)
@pandoc @ghpages
---
title: A Sample MultiMarkdown Document
author: Fletcher T. Penney
date: February 9, 2011
tags: [nothing, nothingness]
abstract: |
This is the abstract.
It consists of two paragraphs.
---
@pandoc
Use --toc
as a command argument.
@mmd
{{TOC}}
, see beginning. It preprocess the headings and generate a ToC on its own, and doesn’t give instruction for LaTeX to generate one. A hack is like this:
---
...
LaTeX Input: mmd-load-toc-setcounter
LaTeX Input: mmd-load-toc
...
---
<!-- \begin{comment} -->
{{TOC}}
<!-- \end{comment} -->
...
See more at ickc/peg-multimarkdown-latex-support: Default support files for generating LaTeX documents with MMD 3 through MMD 5.
@ghpages
# Contents
{:.no_toc}
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
MathJax is assumed. MathJax has many configurable options. See MathJax TeX and LaTeX Support — MathJax 2.6 documentation.
@markdown
Add the following at the beginning of the document:
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full">
</script>
MathJax.js is used and any codes within math delimiters are treated as raw HTML and to be processed by MathJax.
MathJax delimiter are $$...$$
, \\(...\\)
and \\[...\\]
(because an extra \
can be used to escape from MarkDown).
Depending on the markdown parser, extra tricks might be needed to make sure nothing within the math delimiter is treated as markdown (see TeX and LaTeX in HTML documents — MathJax 2.6 documentation). $...$
can be used with MathJax configuration (see TeX and LaTeX math delimiters — MathJax 2.6 documentation).
There are subtleties how math should be used in HTML+MathJax and LaTeX output from single markdown source. See more in Testing LaTeX Environments Usage in MathJax From Markdown Conversion (including mmd and pandoc).
@mmd
Add the following metadata at the beginning of the document:
HTML header: <script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full">
</script>
MultiMarkdown math delimiter are $...$
, $$...$$
, \\(...\\)
and \\[...\\]
.
@pandoc(–mathjax)
For pandoc, add --mathjax
in the command-line argument.
Default math delimiter for pandoc is $...$
, $$...$$
. Other options are configurable. See more in Pandoc - Pandoc User’s Guide.
@mmd
See more at File Transclusion—MultiMarkdown Documentation.
Some examples are directly or indirectly copied from the following documentations:
This is a mmd inline footnote ↩
This is a footnote ↩
Here’s one with multiple blocks.
Subsequent paragraphs are indented to show that they belong to the previous footnote.
{ some.code }
The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items. ↩
The actual definition belongs on a new line, and can continue on just as other footnotes. Note how it fallbacks gracefully in Markdown. ↩
John Doe. Some Big Fancy Book. Vanity Press, 2006.
John Doe. Another Big Fancy Book. Vanity Press, 2016.