Updated man page.
This commit is contained in:
parent
eb7f65305d
commit
56951b873e
1 changed files with 358 additions and 249 deletions
607
man/pandoc.1
607
man/pandoc.1
|
@ -242,19 +242,10 @@ markup), \f[C]tikiwiki\f[] (TikiWiki markup), \f[C]creole\f[] (Creole
|
|||
1.0), \f[C]haddock\f[] (Haddock markup), or \f[C]latex\f[] (LaTeX).
|
||||
(\f[C]markdown_github\f[] provides deprecated and less accurate support
|
||||
for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless
|
||||
you need to use extensions other than \f[C]smart\f[].) If \f[C]+lhs\f[]
|
||||
is appended to \f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], or
|
||||
\f[C]html\f[], the input will be treated as literate Haskell source: see
|
||||
Literate Haskell support, below.
|
||||
Markdown syntax extensions can be individually enabled or disabled by
|
||||
appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
|
||||
name.
|
||||
So, for example, \f[C]markdown_strict+footnotes+definition_lists\f[] is
|
||||
strict Markdown with footnotes and definition lists enabled, and
|
||||
\f[C]markdown\-pipe_tables+hard_line_breaks\f[] is pandoc\[aq]s Markdown
|
||||
without pipe tables and with hard line breaks.
|
||||
See Pandoc\[aq]s Markdown, below, for a list of extensions and their
|
||||
names.
|
||||
you need to use extensions other than \f[C]smart\f[].) Extensions can be
|
||||
individually enabled or disabled by appending \f[C]+EXTENSION\f[] or
|
||||
\f[C]\-EXTENSION\f[] to the format name.
|
||||
See Extensions below, for a list of extensions and their names.
|
||||
See \f[C]\-\-list\-input\-formats\f[] and \f[C]\-\-list\-extensions\f[],
|
||||
below.
|
||||
.RS
|
||||
|
@ -295,13 +286,9 @@ you use extensions that do not work with \f[C]gfm\f[].) Note that
|
|||
\f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will not be
|
||||
directed to \f[I]stdout\f[]; an output filename must be specified using
|
||||
the \f[C]\-o/\-\-output\f[] option.
|
||||
If \f[C]+lhs\f[] is appended to \f[C]markdown\f[], \f[C]rst\f[],
|
||||
\f[C]latex\f[], \f[C]beamer\f[], \f[C]html4\f[], or \f[C]html5\f[], the
|
||||
output will be rendered as literate Haskell source: see Literate Haskell
|
||||
support, below.
|
||||
Markdown syntax extensions can be individually enabled or disabled by
|
||||
appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
|
||||
name, as described above under \f[C]\-f\f[].
|
||||
Extensions can be individually enabled or disabled by appending
|
||||
\f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format name.
|
||||
See Extensions below, for a list of extensions and their names.
|
||||
See \f[C]\-\-list\-output\-formats\f[] and
|
||||
\f[C]\-\-list\-extensions\f[], below.
|
||||
.RS
|
||||
|
@ -2035,6 +2022,336 @@ merge in changes after each pandoc release.
|
|||
.PP
|
||||
Templates may contain comments: anything on a line after \f[C]$\-\-\f[]
|
||||
will be treated as a comment and ignored.
|
||||
.SH EXTENSIONS
|
||||
.PP
|
||||
The behavior of some of the readers and writers can be adjusted by
|
||||
enabling or disabling various extensions.
|
||||
.PP
|
||||
An extension can be enabled by adding \f[C]+EXTENSION\f[] to the format
|
||||
name and disabled by adding \f[C]\-EXTENSION\f[].
|
||||
For example, \f[C]\-\-from\ markdown_strict+footnotes\f[] is strict
|
||||
Markdown with footnotes enabled, while
|
||||
\f[C]\-\-from\ markdown\-footnotes\-pipe_tables\f[] is pandoc\[aq]s
|
||||
Markdown without footnotes or pipe tables.
|
||||
.PP
|
||||
The markdown reader and writer make by far the most use of extensions.
|
||||
Extensions only used by them are therefore covered in the section
|
||||
Pandoc\[aq]s Markdown below (See Markdown variants for
|
||||
\f[C]commonmark\f[] and \f[C]gfm\f[].) In the following, extensions that
|
||||
also work for other formats are covered.
|
||||
.SS Typography
|
||||
.SS Extension: \f[C]smart\f[]
|
||||
.PP
|
||||
Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as
|
||||
em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses.
|
||||
Nonbreaking spaces are inserted after certain abbreviations, such as
|
||||
"Mr."
|
||||
.PP
|
||||
This extension can be enabled/disabled for the following formats:
|
||||
.TP
|
||||
.B input formats
|
||||
\f[C]markdown\f[], \f[C]commonmark\f[], \f[C]latex\f[],
|
||||
\f[C]mediawiki\f[], \f[C]org\f[], \f[C]rst\f[], \f[C]twiki\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B output formats
|
||||
\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[], \f[C]rst\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B enabled by default in
|
||||
\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[] (both input and
|
||||
output)
|
||||
.RS
|
||||
.RE
|
||||
.PP
|
||||
Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[]
|
||||
extension has the reverse effect: what would have been curly quotes
|
||||
comes out straight.
|
||||
.PP
|
||||
In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for
|
||||
quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes,
|
||||
\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes
|
||||
(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash).
|
||||
If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse
|
||||
these characters literally.
|
||||
In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the
|
||||
ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use
|
||||
unicode quotation mark and dash characters.
|
||||
.SS Headers and sections
|
||||
.SS Extension: \f[C]auto_identifiers\f[]
|
||||
.PP
|
||||
A header without an explicitly specified identifier will be
|
||||
automatically assigned a unique identifier based on the header text.
|
||||
.PP
|
||||
This extension can be enabled/disabled for the following formats:
|
||||
.TP
|
||||
.B input formats
|
||||
\f[C]markdown\f[], \f[C]latex\f[], \f[C]rst\f[], \f[C]mediawiki\f[],
|
||||
\f[C]textile\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B output formats
|
||||
\f[C]markdown\f[], \f[C]muse\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B enabled by default in
|
||||
\f[C]markdown\f[], \f[C]muse\f[]
|
||||
.RS
|
||||
.RE
|
||||
.PP
|
||||
The algorithm used to derive the identifier from the header text is:
|
||||
.IP \[bu] 2
|
||||
Remove all formatting, links, etc.
|
||||
.IP \[bu] 2
|
||||
Remove all footnotes.
|
||||
.IP \[bu] 2
|
||||
Remove all punctuation, except underscores, hyphens, and periods.
|
||||
.IP \[bu] 2
|
||||
Replace all spaces and newlines with hyphens.
|
||||
.IP \[bu] 2
|
||||
Convert all alphabetic characters to lowercase.
|
||||
.IP \[bu] 2
|
||||
Remove everything up to the first letter (identifiers may not begin with
|
||||
a number or punctuation mark).
|
||||
.IP \[bu] 2
|
||||
If nothing is left after this, use the identifier \f[C]section\f[].
|
||||
.PP
|
||||
Thus, for example,
|
||||
.PP
|
||||
.TS
|
||||
tab(@);
|
||||
l l.
|
||||
T{
|
||||
Header
|
||||
T}@T{
|
||||
Identifier
|
||||
T}
|
||||
_
|
||||
T{
|
||||
\f[C]Header\ identifiers\ in\ HTML\f[]
|
||||
T}@T{
|
||||
\f[C]header\-identifiers\-in\-html\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]*Dogs*?\-\-in\ *my*\ house?\f[]
|
||||
T}@T{
|
||||
\f[C]dogs\-\-in\-my\-house\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C][HTML],\ [S5],\ or\ [RTF]?\f[]
|
||||
T}@T{
|
||||
\f[C]html\-s5\-or\-rtf\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]3.\ Applications\f[]
|
||||
T}@T{
|
||||
\f[C]applications\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]33\f[]
|
||||
T}@T{
|
||||
\f[C]section\f[]
|
||||
T}
|
||||
.TE
|
||||
.PP
|
||||
These rules should, in most cases, allow one to determine the identifier
|
||||
from the header text.
|
||||
The exception is when several headers have the same text; in this case,
|
||||
the first will get an identifier as described above; the second will get
|
||||
the same identifier with \f[C]\-1\f[] appended; the third with
|
||||
\f[C]\-2\f[]; and so on.
|
||||
.PP
|
||||
These identifiers are used to provide link targets in the table of
|
||||
contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
|
||||
option.
|
||||
They also make it easy to provide links from one section of a document
|
||||
to another.
|
||||
A link to this section, for example, might look like this:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
See\ the\ section\ on
|
||||
[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
Note, however, that this method of providing links to sections works
|
||||
only in HTML, LaTeX, and ConTeXt formats.
|
||||
.PP
|
||||
If the \f[C]\-\-section\-divs\f[] option is specified, then each section
|
||||
will be wrapped in a \f[C]div\f[] (or a \f[C]section\f[], if
|
||||
\f[C]html5\f[] was specified), and the identifier will be attached to
|
||||
the enclosing \f[C]<div>\f[] (or \f[C]<section>\f[]) tag rather than the
|
||||
header itself.
|
||||
This allows entire sections to be manipulated using JavaScript or
|
||||
treated differently in CSS.
|
||||
.SS Extension: \f[C]ascii_identifiers\f[]
|
||||
.PP
|
||||
Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
|
||||
ASCII.
|
||||
Accents are stripped off of accented Latin letters, and non\-Latin
|
||||
letters are omitted.
|
||||
.SS Math Input
|
||||
.PP
|
||||
The extensions \f[C]tex_math_dollars\f[],
|
||||
\f[C]tex_math_single_backslash\f[], and
|
||||
\f[C]tex_math_double_backslash\f[] are described in the section about
|
||||
Pandoc\[aq]s Markdown.
|
||||
.PP
|
||||
However, they can also be used with HTML input.
|
||||
This is handy for reading web pages formatted using MathJax, for
|
||||
example.
|
||||
.SS Raw HTML/TeX
|
||||
.PP
|
||||
The following extensions (especially how they affect Markdown
|
||||
input/output) are also described in more detail in their respective
|
||||
sections of Pandoc\[aq]s Markdown.
|
||||
.SS Extension: \f[C]raw_html\f[]
|
||||
.PP
|
||||
When converting from HTML, parse elements to raw HTML which are not
|
||||
representable in pandoc\[aq]s AST.
|
||||
By default, this is disabled for HTML input.
|
||||
.SS Extension: \f[C]raw_tex\f[]
|
||||
.PP
|
||||
Allows raw LaTeX, TeX, and ConTeXt to be included in a document.
|
||||
.PP
|
||||
This extension can be enabled/disabled for the following formats (in
|
||||
addition to \f[C]markdown\f[]):
|
||||
.TP
|
||||
.B input formats
|
||||
\f[C]latex\f[], \f[C]org\f[], \f[C]textile\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B output formats
|
||||
\f[C]textile\f[]
|
||||
.RS
|
||||
.RE
|
||||
.SS Extension: \f[C]native_divs\f[]
|
||||
.PP
|
||||
This extension is enabled by default for HTML input.
|
||||
This means that \f[C]div\f[]s are parsed to pandoc native elements.
|
||||
(Alternatively, you can parse them to raw HTML using
|
||||
\f[C]\-f\ html\-native_divs+raw_html\f[].)
|
||||
.PP
|
||||
When converting HTML to Markdown, for example, you may want to drop all
|
||||
\f[C]div\f[]s and \f[C]span\f[]s:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
pandoc\ \-f\ html\-native_divs\-native_spans\ \-t\ markdown
|
||||
\f[]
|
||||
.fi
|
||||
.SS Extension: \f[C]native_spans\f[]
|
||||
.PP
|
||||
Analogous to \f[C]native_divs\f[] above.
|
||||
.SS Literate Haskell support
|
||||
.SS Extension: \f[C]literate_haskell\f[]
|
||||
.PP
|
||||
Treat the document as literate Haskell source.
|
||||
.PP
|
||||
This extension can be enabled/disabled for the following formats:
|
||||
.TP
|
||||
.B input formats
|
||||
\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B output formats
|
||||
\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], \f[C]html\f[]
|
||||
.RS
|
||||
.RE
|
||||
.PP
|
||||
If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to one of
|
||||
the formats above, pandoc will treat the document as literate Haskell
|
||||
source.
|
||||
This means that
|
||||
.IP \[bu] 2
|
||||
In Markdown input, "bird track" sections will be parsed as Haskell code
|
||||
rather than block quotations.
|
||||
Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
|
||||
be treated as Haskell code.
|
||||
For ATX\-style headers the character \[aq]=\[aq] will be used instead of
|
||||
\[aq]#\[aq].
|
||||
.IP \[bu] 2
|
||||
In Markdown output, code blocks with classes \f[C]haskell\f[] and
|
||||
\f[C]literate\f[] will be rendered using bird tracks, and block
|
||||
quotations will be indented one space, so they will not be treated as
|
||||
Haskell code.
|
||||
In addition, headers will be rendered setext\-style (with underlines)
|
||||
rather than ATX\-style (with \[aq]#\[aq] characters).
|
||||
(This is because ghc treats \[aq]#\[aq] characters in column 1 as
|
||||
introducing line numbers.)
|
||||
.IP \[bu] 2
|
||||
In restructured text input, "bird track" sections will be parsed as
|
||||
Haskell code.
|
||||
.IP \[bu] 2
|
||||
In restructured text output, code blocks with class \f[C]haskell\f[]
|
||||
will be rendered using bird tracks.
|
||||
.IP \[bu] 2
|
||||
In LaTeX input, text in \f[C]code\f[] environments will be parsed as
|
||||
Haskell code.
|
||||
.IP \[bu] 2
|
||||
In LaTeX output, code blocks with class \f[C]haskell\f[] will be
|
||||
rendered inside \f[C]code\f[] environments.
|
||||
.IP \[bu] 2
|
||||
In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
|
||||
with class \f[C]literatehaskell\f[] and bird tracks.
|
||||
.PP
|
||||
Examples:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
pandoc\ \-f\ markdown+lhs\ \-t\ html
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
reads literate Haskell source formatted with Markdown conventions and
|
||||
writes ordinary HTML (without bird tracks).
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
writes HTML with the Haskell code in bird tracks, so it can be copied
|
||||
and pasted as literate Haskell source.
|
||||
.PP
|
||||
Note that GHC expects the bird tracks in the first column, so indentend
|
||||
literate code blocks (e.g.
|
||||
inside an itemized environment) will not be picked up by the Haskell
|
||||
compiler.
|
||||
.SS Other extensions
|
||||
.SS Extension: \f[C]empty_paragraphs\f[]
|
||||
.PP
|
||||
Allows empty paragraphs.
|
||||
By default empty paragraphs are omitted.
|
||||
.PP
|
||||
This extension can be enabled/disabled for the following formats:
|
||||
.TP
|
||||
.B input formats
|
||||
\f[C]docx\f[], \f[C]html\f[]
|
||||
.RS
|
||||
.RE
|
||||
.TP
|
||||
.B output formats
|
||||
\f[C]markdown\f[], \f[C]docx\f[], \f[C]odt\f[], \f[C]opendocument\f[],
|
||||
\f[C]html\f[]
|
||||
.RS
|
||||
.RE
|
||||
.SS Extension: \f[C]amuse\f[]
|
||||
.PP
|
||||
In the \f[C]muse\f[] input format, this enables Text::Amuse extensions
|
||||
to Emacs Muse markup.
|
||||
.SS Extension: \f[C]citations\f[]
|
||||
.PP
|
||||
Some aspects of Pandoc\[aq]s Markdown citation syntax are also accepted
|
||||
in \f[C]org\f[] input.
|
||||
.SH PANDOC\[aq]S MARKDOWN
|
||||
.PP
|
||||
Pandoc understands an extended and slightly revised version of John
|
||||
|
@ -2043,11 +2360,11 @@ This document explains the syntax, noting differences from standard
|
|||
Markdown.
|
||||
Except where noted, these differences can be suppressed by using the
|
||||
\f[C]markdown_strict\f[] format instead of \f[C]markdown\f[].
|
||||
An extensions can be enabled by adding \f[C]+EXTENSION\f[] to the format
|
||||
name and disabled by adding \f[C]\-EXTENSION\f[].
|
||||
For example, \f[C]markdown_strict+footnotes\f[] is strict Markdown with
|
||||
footnotes enabled, while \f[C]markdown\-footnotes\-pipe_tables\f[] is
|
||||
pandoc\[aq]s Markdown without footnotes or pipe tables.
|
||||
Extensions can be enabled or disabled to specify the behavior more
|
||||
granularly.
|
||||
They are described in the following.
|
||||
See also Extensions above, for extensions that work also on other
|
||||
formats.
|
||||
.SS Philosophy
|
||||
.PP
|
||||
Markdown is designed to be easy to write, and, even more importantly,
|
||||
|
@ -2149,6 +2466,8 @@ Many Markdown implementations do not require a space between the opening
|
|||
\f[C]#5\ bolt\f[] and \f[C]#hashtag\f[] count as headers.
|
||||
With this extension, pandoc does require the space.
|
||||
.SS Header identifiers
|
||||
.PP
|
||||
See also the \f[C]auto_identifiers\f[] extension above.
|
||||
.SS Extension: \f[C]header_attributes\f[]
|
||||
.PP
|
||||
Headers can be assigned attributes using this syntax at the end of the
|
||||
|
@ -2203,96 +2522,6 @@ is just the same as
|
|||
#\ My\ header\ {.unnumbered}
|
||||
\f[]
|
||||
.fi
|
||||
.SS Extension: \f[C]auto_identifiers\f[]
|
||||
.PP
|
||||
A header without an explicitly specified identifier will be
|
||||
automatically assigned a unique identifier based on the header text.
|
||||
To derive the identifier from the header text,
|
||||
.IP \[bu] 2
|
||||
Remove all formatting, links, etc.
|
||||
.IP \[bu] 2
|
||||
Remove all footnotes.
|
||||
.IP \[bu] 2
|
||||
Remove all punctuation, except underscores, hyphens, and periods.
|
||||
.IP \[bu] 2
|
||||
Replace all spaces and newlines with hyphens.
|
||||
.IP \[bu] 2
|
||||
Convert all alphabetic characters to lowercase.
|
||||
.IP \[bu] 2
|
||||
Remove everything up to the first letter (identifiers may not begin with
|
||||
a number or punctuation mark).
|
||||
.IP \[bu] 2
|
||||
If nothing is left after this, use the identifier \f[C]section\f[].
|
||||
.PP
|
||||
Thus, for example,
|
||||
.PP
|
||||
.TS
|
||||
tab(@);
|
||||
l l.
|
||||
T{
|
||||
Header
|
||||
T}@T{
|
||||
Identifier
|
||||
T}
|
||||
_
|
||||
T{
|
||||
\f[C]Header\ identifiers\ in\ HTML\f[]
|
||||
T}@T{
|
||||
\f[C]header\-identifiers\-in\-html\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]*Dogs*?\-\-in\ *my*\ house?\f[]
|
||||
T}@T{
|
||||
\f[C]dogs\-\-in\-my\-house\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C][HTML],\ [S5],\ or\ [RTF]?\f[]
|
||||
T}@T{
|
||||
\f[C]html\-s5\-or\-rtf\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]3.\ Applications\f[]
|
||||
T}@T{
|
||||
\f[C]applications\f[]
|
||||
T}
|
||||
T{
|
||||
\f[C]33\f[]
|
||||
T}@T{
|
||||
\f[C]section\f[]
|
||||
T}
|
||||
.TE
|
||||
.PP
|
||||
These rules should, in most cases, allow one to determine the identifier
|
||||
from the header text.
|
||||
The exception is when several headers have the same text; in this case,
|
||||
the first will get an identifier as described above; the second will get
|
||||
the same identifier with \f[C]\-1\f[] appended; the third with
|
||||
\f[C]\-2\f[]; and so on.
|
||||
.PP
|
||||
These identifiers are used to provide link targets in the table of
|
||||
contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
|
||||
option.
|
||||
They also make it easy to provide links from one section of a document
|
||||
to another.
|
||||
A link to this section, for example, might look like this:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
See\ the\ section\ on
|
||||
[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
Note, however, that this method of providing links to sections works
|
||||
only in HTML, LaTeX, and ConTeXt formats.
|
||||
.PP
|
||||
If the \f[C]\-\-section\-divs\f[] option is specified, then each section
|
||||
will be wrapped in a \f[C]div\f[] (or a \f[C]section\f[], if
|
||||
\f[C]html5\f[] was specified), and the identifier will be attached to
|
||||
the enclosing \f[C]<div>\f[] (or \f[C]<section>\f[]) tag rather than the
|
||||
header itself.
|
||||
This allows entire sections to be manipulated using JavaScript or
|
||||
treated differently in CSS.
|
||||
.SS Extension: \f[C]implicit_header_references\f[]
|
||||
.PP
|
||||
Pandoc behaves as if reference links have been defined for each header.
|
||||
|
@ -3763,9 +3992,6 @@ options selected.
|
|||
Therefore see Math rendering in HTML above.
|
||||
.RS
|
||||
.RE
|
||||
.PP
|
||||
This extension can be used with both \f[C]markdown\f[] and \f[C]html\f[]
|
||||
input.
|
||||
.SS Raw HTML
|
||||
.SS Extension: \f[C]raw_html\f[]
|
||||
.PP
|
||||
|
@ -4300,32 +4526,6 @@ note.]
|
|||
.fi
|
||||
.PP
|
||||
Inline and regular footnotes may be mixed freely.
|
||||
.SS Typography
|
||||
.SS Extension: \f[C]smart\f[]
|
||||
.PP
|
||||
Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as
|
||||
em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses.
|
||||
Nonbreaking spaces are inserted after certain abbreviations, such as
|
||||
"Mr." This option currently affects the input formats \f[C]markdown\f[],
|
||||
\f[C]commonmark\f[], \f[C]latex\f[], \f[C]mediawiki\f[], \f[C]org\f[],
|
||||
\f[C]rst\f[], and \f[C]twiki\f[], and the output formats
|
||||
\f[C]markdown\f[], \f[C]latex\f[], and \f[C]context\f[].
|
||||
It is enabled by default for \f[C]markdown\f[], \f[C]latex\f[], and
|
||||
\f[C]context\f[] (in both input and output).
|
||||
.PP
|
||||
Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[]
|
||||
extension has the reverse effect: what would have been curly quotes
|
||||
comes out straight.
|
||||
.PP
|
||||
In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for
|
||||
quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes,
|
||||
\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes
|
||||
(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash).
|
||||
If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse
|
||||
these characters literally.
|
||||
In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the
|
||||
ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use
|
||||
unicode quotation mark and dash characters.
|
||||
.SS Citations
|
||||
.SS Extension: \f[C]citations\f[]
|
||||
.PP
|
||||
|
@ -4689,9 +4889,6 @@ as inline TeX math, and anything between \f[C]\\[\f[] and \f[C]\\]\f[]
|
|||
to be interpreted as display TeX math.
|
||||
Note: a drawback of this extension is that it precludes escaping
|
||||
\f[C](\f[] and \f[C][\f[].
|
||||
.PP
|
||||
This extension can be used with both \f[C]markdown\f[] and \f[C]html\f[]
|
||||
input.
|
||||
.SS Extension: \f[C]tex_math_double_backslash\f[]
|
||||
.PP
|
||||
Causes anything between \f[C]\\\\(\f[] and \f[C]\\\\)\f[] to be
|
||||
|
@ -4739,12 +4936,6 @@ opposed to being parsed as paragraphs).
|
|||
.PP
|
||||
Makes all absolute URIs into links, even when not surrounded by pointy
|
||||
braces \f[C]<...>\f[].
|
||||
.SS Extension: \f[C]ascii_identifiers\f[]
|
||||
.PP
|
||||
Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
|
||||
ASCII.
|
||||
Accents are stripped off of accented Latin letters, and non\-Latin
|
||||
letters are omitted.
|
||||
.SS Extension: \f[C]mmd_link_attributes\f[]
|
||||
.PP
|
||||
Parses multimarkdown style key\-value attributes on link and image
|
||||
|
@ -4779,13 +4970,6 @@ anything.
|
|||
.IP \[bu] 2
|
||||
Lazy wrapping of paragraphs is not allowed: the entire definition must
|
||||
be indented four spaces.
|
||||
.SS Extension: \f[C]empty_paragraphs\f[]
|
||||
.PP
|
||||
Allows empty paragraphs.
|
||||
By default empty paragraphs are omitted.
|
||||
This affects the \f[C]docx\f[] reader and writer, the
|
||||
\f[C]opendocument\f[] and \f[C]odt\f[] writer, and all HTML\-based
|
||||
readers and writers.
|
||||
.SS Markdown variants
|
||||
.PP
|
||||
In addition to pandoc\[aq]s extended Markdown, the following Markdown
|
||||
|
@ -4831,37 +5015,26 @@ variants are supported:
|
|||
.RS
|
||||
.RE
|
||||
.PP
|
||||
We also support \f[C]gfm\f[] (GitHub\-Flavored Markdown) as a set of
|
||||
extensions on \f[C]commonmark\f[]:
|
||||
We also support \f[C]commonmark\f[] and \f[C]gfm\f[] (GitHub\-Flavored
|
||||
Markdown, which is implemented as a set of extensions on
|
||||
\f[C]commonmark\f[]).
|
||||
.PP
|
||||
: \f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
|
||||
Note, however, that \f[C]commonmark\f[] and \f[C]gfm\f[] have limited
|
||||
support for extensions.
|
||||
Only those listed below (and \f[C]smart\f[] and \f[C]raw_tex\f[]) will
|
||||
work.
|
||||
The extensions can, however, all be individually disabled.
|
||||
Also, \f[C]raw_tex\f[] only affects \f[C]gfm\f[] output, not input.
|
||||
.TP
|
||||
.B \f[C]gfm\f[] (GitHub\-Flavored Markdown)
|
||||
\f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
|
||||
\f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[],
|
||||
\f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[],
|
||||
\f[C]intraword_underscores\f[], \f[C]strikeout\f[],
|
||||
\f[C]hard_line_breaks\f[], \f[C]emoji\f[],
|
||||
\f[C]shortcut_reference_links\f[], \f[C]angle_brackets_escapable\f[].
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
These\ can\ all\ be\ individually\ disabled.\ Note,\ however,\ that
|
||||
`commonmark`\ and\ `gfm`\ have\ limited\ support\ for\ extensions:
|
||||
extensions\ other\ than\ those\ listed\ above\ (and\ `smart`\ and
|
||||
`raw_tex`)\ will\ have\ no\ effect\ on\ `commonmark`\ or\ `gfm`.
|
||||
And\ `raw_tex`\ only\ affects\ `gfm`\ output,\ not\ input.
|
||||
\f[]
|
||||
.fi
|
||||
.SS Extensions with formats other than Markdown
|
||||
.PP
|
||||
Some of the extensions discussed above can be used with formats other
|
||||
than Markdown:
|
||||
.IP \[bu] 2
|
||||
\f[C]auto_identifiers\f[] can be used with \f[C]latex\f[], \f[C]rst\f[],
|
||||
\f[C]mediawiki\f[], and \f[C]textile\f[] input (and is used by default).
|
||||
.IP \[bu] 2
|
||||
\f[C]tex_math_dollars\f[], \f[C]tex_math_single_backslash\f[], and
|
||||
\f[C]tex_math_double_backslash\f[] can be used with \f[C]html\f[] input.
|
||||
(This is handy for reading web pages formatted using MathJax, for
|
||||
example.)
|
||||
.RS
|
||||
.RE
|
||||
.SH PRODUCING SLIDE SHOWS WITH PANDOC
|
||||
.PP
|
||||
You can use pandoc to produce an HTML + JavaScript slide presentation
|
||||
|
@ -5313,70 +5486,6 @@ For example:
|
|||
</audio>
|
||||
\f[]
|
||||
.fi
|
||||
.SH LITERATE HASKELL SUPPORT
|
||||
.PP
|
||||
If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to an
|
||||
appropriate input or output format (\f[C]markdown\f[],
|
||||
\f[C]markdown_strict\f[], \f[C]rst\f[], or \f[C]latex\f[] for input or
|
||||
output; \f[C]beamer\f[], \f[C]html4\f[] or \f[C]html5\f[] for output
|
||||
only), pandoc will treat the document as literate Haskell source.
|
||||
This means that
|
||||
.IP \[bu] 2
|
||||
In Markdown input, "bird track" sections will be parsed as Haskell code
|
||||
rather than block quotations.
|
||||
Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
|
||||
be treated as Haskell code.
|
||||
For ATX\-style headers the character \[aq]=\[aq] will be used instead of
|
||||
\[aq]#\[aq].
|
||||
.IP \[bu] 2
|
||||
In Markdown output, code blocks with classes \f[C]haskell\f[] and
|
||||
\f[C]literate\f[] will be rendered using bird tracks, and block
|
||||
quotations will be indented one space, so they will not be treated as
|
||||
Haskell code.
|
||||
In addition, headers will be rendered setext\-style (with underlines)
|
||||
rather than ATX\-style (with \[aq]#\[aq] characters).
|
||||
(This is because ghc treats \[aq]#\[aq] characters in column 1 as
|
||||
introducing line numbers.)
|
||||
.IP \[bu] 2
|
||||
In restructured text input, "bird track" sections will be parsed as
|
||||
Haskell code.
|
||||
.IP \[bu] 2
|
||||
In restructured text output, code blocks with class \f[C]haskell\f[]
|
||||
will be rendered using bird tracks.
|
||||
.IP \[bu] 2
|
||||
In LaTeX input, text in \f[C]code\f[] environments will be parsed as
|
||||
Haskell code.
|
||||
.IP \[bu] 2
|
||||
In LaTeX output, code blocks with class \f[C]haskell\f[] will be
|
||||
rendered inside \f[C]code\f[] environments.
|
||||
.IP \[bu] 2
|
||||
In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
|
||||
with class \f[C]literatehaskell\f[] and bird tracks.
|
||||
.PP
|
||||
Examples:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
pandoc\ \-f\ markdown+lhs\ \-t\ html
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
reads literate Haskell source formatted with Markdown conventions and
|
||||
writes ordinary HTML (without bird tracks).
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
|
||||
\f[]
|
||||
.fi
|
||||
.PP
|
||||
writes HTML with the Haskell code in bird tracks, so it can be copied
|
||||
and pasted as literate Haskell source.
|
||||
.PP
|
||||
Note that GHC expects the bird tracks in the first column, so indentend
|
||||
literate code blocks (e.g.
|
||||
inside an itemized environment) will not be picked up by the Haskell
|
||||
compiler.
|
||||
.SH SYNTAX HIGHLIGHTING
|
||||
.PP
|
||||
Pandoc will automatically highlight syntax in fenced code blocks that
|
||||
|
|
Loading…
Reference in a new issue