git.iko.soy/typeable/pandoc
on master help sign in
Documented new system for enabling/disabling extensions.
commit5a2e601c326586ab26c6168fa514e1a877ada2f3 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 10 Aug 2012, 11:29 (14 years ago) parent8d65651
1 file changed+46−26
README+46−26
README+46−26
@@ -137,32 +137,45 @@ General options
137137
138138`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
139139: 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),
141142 `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
142143 `docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is
143144 appended to `markdown`, `rst`, `latex`, the input will be
144145 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.
146155
147156`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
148157: Specify output format. *FORMAT* can be `native` (native Haskell),
149158 `json` (JSON version of native AST), `plain` (plain text),
150− `markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1),
151− `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show),
152− `context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup),
153− `textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo),
154− `docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt`
155− (OpenOffice text document), `docx` (Word docx), `epub` (EPUB book),
156− `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc),
157− `slidy` (Slidy HTML and javascript slide show),
158− `slideous` (Slideous HTML and javascript slide show),
159− `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript
160− slide show), or `rtf` (rich text format). Note that `odt` and `epub`
161− output will not be directed to *stdout*; an output filename must
162− be specified using the `-o/--output` option. If `+lhs` is appended
163− to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output
164− will be rendered as literate Haskell source: see [Literate Haskell
165− support](#literate-haskell-support), below.
159+ `markdown` (pandoc's extended markdown), `markdown_strict` (original
160+ unextended markdown), `rst` (reStructuredText), `html` (XHTML
161+ 1), `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer
162+ slide show), `context` (ConTeXt), `man` (groff man), `mediawiki`
163+ (MediaWiki markup), `textile` (Textile), `org` (Emacs Org-Mode),
164+ `texinfo` (GNU Texinfo), `docbook` (DocBook XML), `opendocument`
165+ (OpenDocument XML), `odt` (OpenOffice text document), `docx`
166+ (Word docx), `epub` (EPUB book), `fb2` (FictionBook2 e-book),
167+ `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide
168+ show), `slideous` (Slideous HTML and javascript slide show),
169+ `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and
170+ javascript slide show), or `rtf` (rich text format). Note that
171+ `odt` and `epub` output will not be directed to *stdout*; an output
172+ filename must be specified using the `-o/--output` option. If `+lhs`
173+ is appended to `markdown`, `rst`, `latex`, `beamer`, `html`, or
174+ `html5`, the output will be rendered as literate Haskell source:
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`.
166179
167180`-o` *FILE*, `--output=`*FILE*
168181: Write output to *FILE* instead of *stdout*. If *FILE* is
@@ -209,9 +222,10 @@ Reader options
209222 to curly quotes, `---` to em-dashes, `--` to en-dashes, and
210223 `...` to ellipses. Nonbreaking spaces are inserted after certain
211224 abbreviations, such as "Mr." (Note: This option is significant only when
212− the input format is `markdown` or `textile`. It is selected automatically
213− when the input format is `textile` or the output format is `latex` or
214− `context`, unless `--no-tex-ligatures` is used.)
225+ the input format is `markdown`, `markdown_strict`, or `textile`. It
226+ is selected automatically when the input format is `textile` or the
227+ output format is `latex` or `context`, unless `--no-tex-ligatures`
228+ is used.)
215229
216230`--old-dashes`
217231: 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
758772John Gruber's [markdown] syntax. This document explains the syntax,
759773noting differences from standard markdown. Except where noted, these
760774differences 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.
762780
763781Philosophy
764782----------
@@ -2158,7 +2176,9 @@ Non-pandoc extensions
21582176=====================
21592177
21602178The 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.
21622182
21632183**Extension: `hard_line_breaks`**\
21642184Causes all newlines within a paragraph to be interpreted as hard line
@@ -2315,9 +2335,9 @@ Literate Haskell support
23152335========================
23162336
23172337If you append `+lhs` to an appropriate input or output format (`markdown`,
2318−`rst`, or `latex` for input or output; `beamer`, `html` or `html5` for
2319−output only), pandoc will treat the document as literate Haskell source.
2320−This means that
2338+`mardkown_strict`, `rst`, or `latex` for input or output; `beamer`,
2339+`html` or `html5` for output only), pandoc will treat the document as
2340+literate Haskell source. This means that
23212341
23222342 - In markdown input, "bird track" sections will be parsed as Haskell
23232343 code rather than block quotations. Text between `\begin{code}`