Documented new system for enabling/disabling extensions.

This commit is contained in:
John MacFarlane 2012-08-10 11:29:44 -07:00
parent 8d65651309
commit 5a2e601c32

72
README
View file

@ -137,32 +137,45 @@ General options
`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT* `-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
: Specify input format. *FORMAT* can be `native` (native Haskell), : Specify input format. *FORMAT* can be `native` (native Haskell),
`json` (JSON version of native AST), `markdown` (markdown), `json` (JSON version of native AST), `markdown` (pandoc's
extended markdown), `markdown_strict` (original unextended markdown),
`textile` (Textile), `rst` (reStructuredText), `html` (HTML), `textile` (Textile), `rst` (reStructuredText), `html` (HTML),
`docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is `docbook` (DocBook XML), or `latex` (LaTeX). If `+lhs` is
appended to `markdown`, `rst`, `latex`, the input will be appended to `markdown`, `rst`, `latex`, the input will be
treated as literate Haskell source: see [Literate Haskell treated as literate Haskell source: see [Literate Haskell
support](#literate-haskell-support), below. support](#literate-haskell-support), below. Markdown syntax
extensions can be individually enabled or disabled by appending
`+EXTENSION` or `-EXTENSION` to the format name. So, for example,
`markdown_strict+footnotes+definition_lists` is strict markdown
with footnotes and definition lists enabled, and
`markdown-pipe_tables+hard_line_breaks` is pandoc's markdown
without pipe tables and with hard line breaks. See
[Pandoc's markdown](#pandocs-markdown), below, for a list of
extensions and their names.
`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT* `-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
: Specify output format. *FORMAT* can be `native` (native Haskell), : Specify output format. *FORMAT* can be `native` (native Haskell),
`json` (JSON version of native AST), `plain` (plain text), `json` (JSON version of native AST), `plain` (plain text),
`markdown` (markdown), `rst` (reStructuredText), `html` (XHTML 1), `markdown` (pandoc's extended markdown), `markdown_strict` (original
`html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer slide show), unextended markdown), `rst` (reStructuredText), `html` (XHTML
`context` (ConTeXt), `man` (groff man), `mediawiki` (MediaWiki markup), 1), `html5` (HTML 5), `latex` (LaTeX), `beamer` (LaTeX beamer
`textile` (Textile), `org` (Emacs Org-Mode), `texinfo` (GNU Texinfo), slide show), `context` (ConTeXt), `man` (groff man), `mediawiki`
`docbook` (DocBook XML), `opendocument` (OpenDocument XML), `odt` (MediaWiki markup), `textile` (Textile), `org` (Emacs Org-Mode),
(OpenOffice text document), `docx` (Word docx), `epub` (EPUB book), `texinfo` (GNU Texinfo), `docbook` (DocBook XML), `opendocument`
`fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc), (OpenDocument XML), `odt` (OpenOffice text document), `docx`
`slidy` (Slidy HTML and javascript slide show), (Word docx), `epub` (EPUB book), `fb2` (FictionBook2 e-book),
`slideous` (Slideous HTML and javascript slide show), `asciidoc` (AsciiDoc), `slidy` (Slidy HTML and javascript slide
`dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and javascript show), `slideous` (Slideous HTML and javascript slide show),
slide show), or `rtf` (rich text format). Note that `odt` and `epub` `dzslides` (HTML5 + javascript slide show), `s5` (S5 HTML and
output will not be directed to *stdout*; an output filename must javascript slide show), or `rtf` (rich text format). Note that
be specified using the `-o/--output` option. If `+lhs` is appended `odt` and `epub` output will not be directed to *stdout*; an output
to `markdown`, `rst`, `latex`, `beamer`, `html`, or `html5`, the output filename must be specified using the `-o/--output` option. If `+lhs`
will be rendered as literate Haskell source: see [Literate Haskell is appended to `markdown`, `rst`, `latex`, `beamer`, `html`, or
support](#literate-haskell-support), below. `html5`, the output will be rendered as literate Haskell source:
see [Literate Haskell support](#literate-haskell-support), below.
Markdown syntax extensions can be individually enabled or disabled
by appending `+EXTENSION` or `-EXTENSION` to the format name, as
described above under `-f`.
`-o` *FILE*, `--output=`*FILE* `-o` *FILE*, `--output=`*FILE*
: Write output to *FILE* instead of *stdout*. If *FILE* is : Write output to *FILE* instead of *stdout*. If *FILE* is
@ -209,9 +222,10 @@ Reader options
to curly quotes, `---` to em-dashes, `--` to en-dashes, and to curly quotes, `---` to em-dashes, `--` to en-dashes, and
`...` to ellipses. Nonbreaking spaces are inserted after certain `...` to ellipses. Nonbreaking spaces are inserted after certain
abbreviations, such as "Mr." (Note: This option is significant only when abbreviations, such as "Mr." (Note: This option is significant only when
the input format is `markdown` or `textile`. It is selected automatically the input format is `markdown`, `markdown_strict`, or `textile`. It
when the input format is `textile` or the output format is `latex` or is selected automatically when the input format is `textile` or the
`context`, unless `--no-tex-ligatures` is used.) output format is `latex` or `context`, unless `--no-tex-ligatures`
is used.)
`--old-dashes` `--old-dashes`
: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before : 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
John Gruber's [markdown] syntax. This document explains the syntax, John Gruber's [markdown] syntax. This document explains the syntax,
noting differences from standard markdown. Except where noted, these noting differences from standard markdown. Except where noted, these
differences can be suppressed by using the `markdown_strict` format instead differences can be suppressed by using the `markdown_strict` format instead
of `markdown`. of `markdown`. An extensions can be enabled by adding `+EXTENSION`
to the format name and disabled by adding `-EXTENSION`. For example,
`markdown_strict+footnotes` is strict markdown with footnotes
enabled, while `markdown-footnotes-pipe_tables` is pandoc's
markdown without footnotes or pipe tables.
Philosophy Philosophy
---------- ----------
@ -2158,7 +2176,9 @@ Non-pandoc extensions
===================== =====================
The following markdown syntax extensions are not enabled by default The following markdown syntax extensions are not enabled by default
in pandoc. in pandoc, but may be enabled by adding `+EXTENSION` to the format
name, where `EXTENSION` is the name of the extension. Thus, for
example, `markdown+hard_line_breaks` is markdown with hard line breaks.
**Extension: `hard_line_breaks`**\ **Extension: `hard_line_breaks`**\
Causes all newlines within a paragraph to be interpreted as hard line Causes all newlines within a paragraph to be interpreted as hard line
@ -2315,9 +2335,9 @@ Literate Haskell support
======================== ========================
If you append `+lhs` to an appropriate input or output format (`markdown`, If you append `+lhs` to an appropriate input or output format (`markdown`,
`rst`, or `latex` for input or output; `beamer`, `html` or `html5` for `mardkown_strict`, `rst`, or `latex` for input or output; `beamer`,
output only), pandoc will treat the document as literate Haskell source. `html` or `html5` for output only), pandoc will treat the document as
This means that literate Haskell source. This means that
- In markdown input, "bird track" sections will be parsed as Haskell - In markdown input, "bird track" sections will be parsed as Haskell
code rather than block quotations. Text between `\begin{code}` code rather than block quotations. Text between `\begin{code}`