git.iko.soy/typeable/pandoc
on master help sign in
Documented new system for enabling/disabling extensions.
5a2e601John MacFarlane
README+46−26
@@ -137,32 +137,45 @@ General options
137
137
138`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
138`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
139: Specify input format. *FORMAT* can be `native` (native Haskell),
139: Specify input format. *FORMAT* can be `native` (native Haskell),
140− `json` (JSON version of native AST), `markdown` (markdown),
140+ `json` (JSON version of native AST), `markdown` (pandoc's
141+ extended markdown), `markdown_strict` (original unextended markdown),
141 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
142 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
142 `docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is
143 `docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is
143 appended to `markdown`, `rst`, `latex`, the input will be
144 appended to `markdown`, `rst`, `latex`, the input will be
144 treated as literate Haskell source: see [Literate Haskell
145 treated as literate Haskell source: see [Literate Haskell
145− support](#literate-haskell-support), below.
146+ support](#literate-haskell-support), below. Markdown syntax
147+ extensions can be individually enabled or disabled by appending
148+ `+EXTENSION` or `-EXTENSION` to the format name. So, for example,
149+ `markdown_strict+footnotes+definition_lists` is strict markdown
150+ with footnotes and definition lists enabled, and
151+ `markdown-pipe_tables+hard_line_breaks` is pandoc's markdown
152+ without pipe tables and with hard line breaks. See
153+ [Pandoc's markdown](#pandocs-markdown), below, for a list of
154+ extensions and their names.
146
155
147`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
156`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
148: Specify output format. *FORMAT* can be `native` (native Haskell),
157: Specify output format. *FORMAT* can be `native` (native Haskell),
149 `json` (JSON version of native AST), `plain` (plain text),
158 `json` (JSON version of native AST), `plain` (plain text),
159+ `markdown` (pandoc's extended markdown), `markdown_strict` (original
150− `markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1),
160+ unextended markdown), `rst` (reStructuredText), `html` (XHTML
151− `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
161+ 1), `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer
152− `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
162+ slide show), `context` (ConTeXt), `man` (groff man), `mediawiki`
153− `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
163+ (MediaWiki markup), `textile` (Textile), `org` (Emacs Org-Mode),
154− `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt`
164+ `texinfo` (GNU Texinfo), `docbook` (DocBook XML), `opendocument`
155− (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book),
165+ (OpenDocument XML), `odt` (OpenOffice text document), `docx`
156− `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc),
166+ (Word docx), `epub` (EPUB book), `fb2` (FictionBook2 e-book),
157− `slidy` (Slidy HTML and javascript slide show),
167+ `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide
158− `slideous` (Slideous HTML and javascript slide show),
168+ show), `slideous` (Slideous HTML and javascript slide show),
159− `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript
169+ `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and
160− slide show), or `rtf` (rich text format). Note that `odt` and `epub`
170+ javascript slide show), or `rtf` (rich text format). Note that
161− output will not be directed to *stdout*; an output filename must
171+ `odt` and `epub` output will not be directed to *stdout*; an output
162− be specified using the `-o/--output` option. If `+lhs` is appended
172+ filename must be specified using the `-o/--output` option. If `+lhs`
163− to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output
173+ is appended to `markdown`, `rst`, `latex`, `beamer`, `html`, or
164− will be rendered as literate Haskell source: see [Literate Haskell
174+ `html5`, the output will be rendered as literate Haskell source:
165− support](#literate-haskell-support), below.
175+ see [Literate Haskell support](#literate-haskell-support), below.
176+ Markdown syntax extensions can be individually enabled or disabled
177+ by appending `+EXTENSION` or `-EXTENSION` to the format name, as
178+ described above under `-f`.
166
179
167`-o` *FILE*, `--output=`*FILE*
180`-o` *FILE*, `--output=`*FILE*
168: Write output to *FILE* instead of *stdout*. If *FILE* is
181: Write output to *FILE* instead of *stdout*. If *FILE* is
@@ -209,9 +222,10 @@ Reader options
209 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
222 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
210 `...` to ellipses. Nonbreaking spaces are inserted after certain
223 `...` to ellipses. Nonbreaking spaces are inserted after certain
211 abbreviations, such as "Mr." (Note: This option is significant only when
224 abbreviations, such as "Mr." (Note: This option is significant only when
212− the input format is `markdown` or `textile`. It is selected automatically
225+ the input format is `markdown`, `markdown_strict`, or `textile`. It
213− when the input format is `textile` or the output format is `latex` or
226+ is selected automatically when the input format is `textile` or the
214− `context`, unless `--no-tex-ligatures` is used.)
227+ output format is `latex` or `context`, unless `--no-tex-ligatures`
228+ is used.)
215
229
216`--old-dashes`
230`--old-dashes`
217: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
231: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
@@ -758,7 +772,11 @@ Pandoc understands an extended and slightly revised version of
758John Gruber's [markdown] syntax. This document explains the syntax,
772John Gruber's [markdown] syntax. This document explains the syntax,
759noting differences from standard markdown. Except where noted, these
773noting differences from standard markdown. Except where noted, these
760differences can be suppressed by using the `markdown_strict` format instead
774differences can be suppressed by using the `markdown_strict` format instead
761−of `markdown`.
775+of `markdown`. An extensions can be enabled by adding `+EXTENSION`
776+to the format name and disabled by adding `-EXTENSION`. For example,
777+`markdown_strict+footnotes` is strict markdown with footnotes
778+enabled, while `markdown-footnotes-pipe_tables` is pandoc's
779+markdown without footnotes or pipe tables.
762
780
763Philosophy
781Philosophy
764----------
782----------
@@ -2158,7 +2176,9 @@ Non-pandoc extensions
2158=====================
2176=====================
2159
2177
2160The following markdown syntax extensions are not enabled by default
2178The following markdown syntax extensions are not enabled by default
2161−in pandoc.
2179+in pandoc, but may be enabled by adding `+EXTENSION` to the format
2180+name, where `EXTENSION` is the name of the extension. Thus, for
2181+example, `markdown+hard_line_breaks` is markdown with hard line breaks.
2162
2182
2163**Extension: `hard_line_breaks`**\
2183**Extension: `hard_line_breaks`**\
2164Causes all newlines within a paragraph to be interpreted as hard line
2184Causes all newlines within a paragraph to be interpreted as hard line
@@ -2315,9 +2335,9 @@ Literate Haskell support
2315========================
2335========================
2316
2336
2317If you append `+lhs` to an appropriate input or output format (`markdown`,
2337If you append `+lhs` to an appropriate input or output format (`markdown`,
2318−`rst`, or `latex` for input or output; `beamer`, `html` or `html5` for
2338+`mardkown_strict`, `rst`, or `latex` for input or output; `beamer`,
2319−output only), pandoc will treat the document as literate Haskell source.
2339+`html` or `html5` for output only), pandoc will treat the document as
2320−This means that
2340+literate Haskell source. This means that
2321
2341
2322 - In markdown input, "bird track" sections will be parsed as Haskell
2342 - In markdown input, "bird track" sections will be parsed as Haskell
2323 code rather than block quotations. Text between `\begin{code}`
2343 code rather than block quotations. Text between `\begin{code}`