git.iko.soy/typeable/pandoc
on master help sign in
Started documenting individual syntax extensions in README.
commit6e548b8a8f00fcb347e5aa5b3b7148b32e50e058 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 27 Jul 2012, 15:45 (14 years ago) parentfc738c6
1 file changed+38−19
README+38−19
README+38−19
@@ -163,6 +163,14 @@ General options
163163 will be rendered as literate Haskell source: see [Literate Haskell
164164 support](#literate-haskell-support), below.
165165
166+`-e` *EXTENSION*, `--enable=`*EXTENSION*
167+: Enable the specified markdown syntax extension. For a list of extensions,
168+ see [Pandoc's markdown](#pandocs-markdown), below.
169+
170+`-d` *EXTENSION*, `--disable=`*EXTENSION*
171+: Disable the specified markdown syntax extension. For a list of extensions,
172+ see [Pandoc's markdown](#pandocs-markdown), below.
173+
166174`-o` *FILE*, `--output=`*FILE*
167175: Write output to *FILE* instead of *stdout*. If *FILE* is
168176 `-`, output will go to *stdout*. (Exception: if the output
@@ -760,7 +768,9 @@ Pandoc understands an extended and slightly revised version of
760768John Gruber's [markdown] syntax. This document explains the syntax,
761769noting differences from standard markdown. Except where noted, these
762770differences can be suppressed by specifying the `--strict` command-line
763−option.
771+option. They can also be disabled piecemeal using the `--disable`
772+(or `-d`) option. If `--strict` is used, `--enable` (or `-e`) can be
773+used to turn on specific extensions.
764774
765775Philosophy
766776----------
@@ -789,8 +799,11 @@ Paragraphs
789799
790800A paragraph is one or more lines of text followed by one or more blank line.
791801Newlines are treated as spaces, so you can reflow your paragraphs as you like.
792−If you need a hard line break, put two or more spaces at the end of a line,
793−or type a backslash followed by a newline.
802+If you need a hard line break, put two or more spaces at the end of a line.
803+
804+**Extension: `escaped_line_breaks`**
805+
806+A backslash followed by a newline is also a hard line break.
794807
795808Headers
796809-------
@@ -826,6 +839,8 @@ As with setext-style headers, the header text can contain formatting:
826839
827840 # A level-one header with a [link](/url) and *emphasis*
828841
842+**Extension: `blank_before_header`**
843+
829844Standard markdown syntax does not require a blank line before a header.
830845Pandoc does require this (except, of course, at the beginning of the
831846document). The reason for the requirement is that it is all too easy for a
@@ -838,7 +853,7 @@ wrapping). Consider, for example:
838853
839854### Header identifiers in HTML, LaTeX, and ConTeXt ###
840855
841−*Pandoc extension*.
856+**Extension**
842857
843858Each header element in pandoc's HTML and ConTeXt output is given a
844859unique identifier. This identifier is based on the text of the header.
@@ -918,6 +933,8 @@ other block quotes. That is, block quotes can be nested:
918933 >
919934 > > A block quote within a block quote.
920935
936+**Extension: `blank_line_before_blockquote`**
937+
921938Standard markdown syntax does not require a blank line before a block
922939quote. Pandoc does require this (except, of course, at the beginning of the
923940document). The reason for the requirement is that it is all too easy for a
@@ -950,7 +967,7 @@ Note: blank lines in the verbatim text need not begin with four spaces.
950967
951968### Delimited code blocks ###
952969
953−*Pandoc extension*.
970+**Extension: `delimited_code_blocks`**
954971
955972In addition to standard indented code blocks, Pandoc supports
956973*delimited* code blocks. These begin with a row of three or more
@@ -1131,7 +1148,7 @@ and this one:
11311148 7. two
11321149 1. three
11331150
1134−*Pandoc extension*.
1151+**Extension: `fancy_lists`**
11351152
11361153Unlike standard markdown, Pandoc allows ordered list items to be marked
11371154with uppercase and lowercase letters and roman numerals, in addition to
@@ -1156,6 +1173,8 @@ capital letter with a period, by at least two spaces.[^2]
11561173
11571174 (C\) 2007 Joe Smith
11581175
1176+**Extension: `startnum`**
1177+
11591178Pandoc also pays attention to the type of list marker used, and to the
11601179starting number, and both of these are preserved where possible in the
11611180output format. Thus, the following yields a list with numbers followed
@@ -1186,7 +1205,7 @@ If default list markers are desired, use `#.`:
11861205
11871206### Definition lists ###
11881207
1189−*Pandoc extension*.
1208+*Extension*.
11901209
11911210Pandoc supports definition lists, using a syntax inspired by
11921211[PHP Markdown Extra] and [reStructuredText]:[^3]
@@ -1231,7 +1250,7 @@ definition and the next term:
12311250
12321251### Numbered example lists ###
12331252
1234−*Pandoc extension*.
1253+*Extension*.
12351254
12361255The special list marker `@` can be used for sequentially numbered
12371256examples. The first list item with a `@` marker will be numbered '1',
@@ -1333,7 +1352,7 @@ A line containing a row of three or more `*`, `-`, or `_` characters
13331352Tables
13341353------
13351354
1336−*Pandoc extension*.
1355+*Extension*.
13371356
13381357Four kinds of tables may be used. The first three kinds presuppose the use of
13391358a fixed-width font, such as Courier. The fourth kind can be used with
@@ -1496,7 +1515,7 @@ and lists, and cannot span multiple lines.
14961515Title block
14971516-----------
14981517
1499−*Pandoc extension*.
1518+*Extension*.
15001519
15011520If the file begins with a title block
15021521
@@ -1613,7 +1632,7 @@ Backslash escapes do not work in verbatim contexts.
16131632Smart punctuation
16141633-----------------
16151634
1616−*Pandoc extension*.
1635+*Extension*.
16171636
16181637If the `--smart` option is specified, pandoc will produce typographically
16191638correct output, converting straight quotes to curly quotes, `---` to
@@ -1652,7 +1671,7 @@ just part of a word, use `*`:
16521671
16531672### Strikeout ###
16541673
1655−*Pandoc extension*.
1674+*Extension*.
16561675
16571676To strikeout a section of text with a horizontal line, begin and end it
16581677with `~~`. Thus, for example,
@@ -1662,7 +1681,7 @@ with `~~`. Thus, for example,
16621681
16631682### Superscripts and subscripts ###
16641683
1665−*Pandoc extension*.
1684+*Extension*.
16661685
16671686Superscripts may be written by surrounding the superscripted text by `^`
16681687characters; subscripts may be written by surrounding the subscripted
@@ -1708,7 +1727,7 @@ Attributes can be attached to verbatim text, just as with
17081727Math
17091728----
17101729
1711−*Pandoc extension*.
1730+*Extension*.
17121731
17131732Anything between two `$` characters will be treated as TeX math. The
17141733opening `$` must have a character immediately to its right, while the
@@ -1818,7 +1837,7 @@ The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
18181837DZSlides, EPUB,
18191838Markdown, and Textile output, and suppressed in other formats.
18201839
1821−*Pandoc extension*.
1840+*Extension*.
18221841
18231842Standard markdown allows you to include HTML "blocks": blocks
18241843of HTML between balanced tags that are separated from the surrounding text
@@ -1859,7 +1878,7 @@ from being interpreted as markdown.
18591878Raw TeX
18601879-------
18611880
1862−*Pandoc extension*.
1881+*Extension*.
18631882
18641883In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
18651884included in a document. Inline TeX commands will be preserved and passed
@@ -1999,7 +2018,7 @@ The link text will be used as the image's alt text:
19992018
20002019### Pictures with captions ###
20012020
2002−*Pandoc extension*.
2021+*Extension*.
20032022
20042023An image occurring by itself in a paragraph will be rendered as
20052024a figure with a caption.[^5] (In LaTeX, a figure environment will be
@@ -2023,7 +2042,7 @@ nonbreaking space after the image:
20232042Footnotes
20242043---------
20252044
2026−*Pandoc extension*.
2045+*Extension*.
20272046
20282047Pandoc's markdown allows footnotes, using the following syntax:
20292048
@@ -2067,7 +2086,7 @@ Inline and regular footnotes may be mixed freely.
20672086Citations
20682087---------
20692088
2070−*Pandoc extension*.
2089+*Extension*.
20712090
20722091Pandoc can automatically generate citations and a bibliography in a number of
20732092styles (using Andrea Rossato's `hs-citeproc`). In order to use this feature,