@@ -242,19 +242,10 @@ markup), \f[C]tikiwiki\f[] (TikiWiki markup), \f[C]creole\f[] (Creole
2422421.0), \f[C]haddock\f[] (Haddock markup), or \f[C]latex\f[] (LaTeX).
243243(\f[C]markdown_github\f[] provides deprecated and less accurate support
244244for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless
245−you need to use extensions other than \f[C]smart\f[].) If \f[C]+lhs\f[]
246−is appended to \f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], or
247−\f[C]html\f[], the input will be treated as literate Haskell source: see
248−Literate Haskell support, below.
249−Markdown syntax extensions can be individually enabled or disabled by
250−appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
251−name.
252−So, for example, \f[C]markdown_strict+footnotes+definition_lists\f[] is
253−strict Markdown with footnotes and definition lists enabled, and
254−\f[C]markdown\-pipe_tables+hard_line_breaks\f[] is pandoc\[aq]s Markdown
255−without pipe tables and with hard line breaks.
256−See Pandoc\[aq]s Markdown, below, for a list of extensions and their
257−names.
245+you need to use extensions other than \f[C]smart\f[].) Extensions can be
246+individually enabled or disabled by appending \f[C]+EXTENSION\f[] or
247+\f[C]\-EXTENSION\f[] to the format name.
248+See Extensions below, for a list of extensions and their names.
258249See \f[C]\-\-list\-input\-formats\f[] and \f[C]\-\-list\-extensions\f[],
259250below.
260251.RS
@@ -295,13 +286,9 @@ you use extensions that do not work with \f[C]gfm\f[].) Note that
295286\f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will not be
296287directed to \f[I]stdout\f[]; an output filename must be specified using
297288the \f[C]\-o/\-\-output\f[] option.
298−If \f[C]+lhs\f[] is appended to \f[C]markdown\f[], \f[C]rst\f[],
299−\f[C]latex\f[], \f[C]beamer\f[], \f[C]html4\f[], or \f[C]html5\f[], the
300−output will be rendered as literate Haskell source: see Literate Haskell
301−support, below.
302−Markdown syntax extensions can be individually enabled or disabled by
303−appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
304−name, as described above under \f[C]\-f\f[].
289+Extensions can be individually enabled or disabled by appending
290+\f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format name.
291+See Extensions below, for a list of extensions and their names.
305292See \f[C]\-\-list\-output\-formats\f[] and
306293\f[C]\-\-list\-extensions\f[], below.
307294.RS
@@ -2035,6 +2022,336 @@ merge in changes after each pandoc release.
20352022.PP
20362023Templates may contain comments: anything on a line after \f[C]$\-\-\f[]
20372024will be treated as a comment and ignored.
2025+.SH EXTENSIONS
2026+.PP
2027+The behavior of some of the readers and writers can be adjusted by
2028+enabling or disabling various extensions.
2029+.PP
2030+An extension can be enabled by adding \f[C]+EXTENSION\f[] to the format
2031+name and disabled by adding \f[C]\-EXTENSION\f[].
2032+For example, \f[C]\-\-from\ markdown_strict+footnotes\f[] is strict
2033+Markdown with footnotes enabled, while
2034+\f[C]\-\-from\ markdown\-footnotes\-pipe_tables\f[] is pandoc\[aq]s
2035+Markdown without footnotes or pipe tables.
2036+.PP
2037+The markdown reader and writer make by far the most use of extensions.
2038+Extensions only used by them are therefore covered in the section
2039+Pandoc\[aq]s Markdown below (See Markdown variants for
2040+\f[C]commonmark\f[] and \f[C]gfm\f[].) In the following, extensions that
2041+also work for other formats are covered.
2042+.SS Typography
2043+.SS Extension: \f[C]smart\f[]
2044+.PP
2045+Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as
2046+em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses.
2047+Nonbreaking spaces are inserted after certain abbreviations, such as
2048+"Mr."
2049+.PP
2050+This extension can be enabled/disabled for the following formats:
2051+.TP
2052+.B input formats
2053+\f[C]markdown\f[], \f[C]commonmark\f[], \f[C]latex\f[],
2054+\f[C]mediawiki\f[], \f[C]org\f[], \f[C]rst\f[], \f[C]twiki\f[]
2055+.RS
2056+.RE
2057+.TP
2058+.B output formats
2059+\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[], \f[C]rst\f[]
2060+.RS
2061+.RE
2062+.TP
2063+.B enabled by default in
2064+\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[] (both input and
2065+output)
2066+.RS
2067+.RE
2068+.PP
2069+Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[]
2070+extension has the reverse effect: what would have been curly quotes
2071+comes out straight.
2072+.PP
2073+In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for
2074+quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes,
2075+\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes
2076+(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash).
2077+If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse
2078+these characters literally.
2079+In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the
2080+ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use
2081+unicode quotation mark and dash characters.
2082+.SS Headers and sections
2083+.SS Extension: \f[C]auto_identifiers\f[]
2084+.PP
2085+A header without an explicitly specified identifier will be
2086+automatically assigned a unique identifier based on the header text.
2087+.PP
2088+This extension can be enabled/disabled for the following formats:
2089+.TP
2090+.B input formats
2091+\f[C]markdown\f[], \f[C]latex\f[], \f[C]rst\f[], \f[C]mediawiki\f[],
2092+\f[C]textile\f[]
2093+.RS
2094+.RE
2095+.TP
2096+.B output formats
2097+\f[C]markdown\f[], \f[C]muse\f[]
2098+.RS
2099+.RE
2100+.TP
2101+.B enabled by default in
2102+\f[C]markdown\f[], \f[C]muse\f[]
2103+.RS
2104+.RE
2105+.PP
2106+The algorithm used to derive the identifier from the header text is:
2107+.IP \[bu] 2
2108+Remove all formatting, links, etc.
2109+.IP \[bu] 2
2110+Remove all footnotes.
2111+.IP \[bu] 2
2112+Remove all punctuation, except underscores, hyphens, and periods.
2113+.IP \[bu] 2
2114+Replace all spaces and newlines with hyphens.
2115+.IP \[bu] 2
2116+Convert all alphabetic characters to lowercase.
2117+.IP \[bu] 2
2118+Remove everything up to the first letter (identifiers may not begin with
2119+a number or punctuation mark).
2120+.IP \[bu] 2
2121+If nothing is left after this, use the identifier \f[C]section\f[].
2122+.PP
2123+Thus, for example,
2124+.PP
2125+.TS
2126+tab(@);
2127+l l.
2128+T{
2129+Header
2130+T}@T{
2131+Identifier
2132+T}
2133+_
2134+T{
2135+\f[C]Header\ identifiers\ in\ HTML\f[]
2136+T}@T{
2137+\f[C]header\-identifiers\-in\-html\f[]
2138+T}
2139+T{
2140+\f[C]*Dogs*?\-\-in\ *my*\ house?\f[]
2141+T}@T{
2142+\f[C]dogs\-\-in\-my\-house\f[]
2143+T}
2144+T{
2145+\f[C][HTML],\ [S5],\ or\ [RTF]?\f[]
2146+T}@T{
2147+\f[C]html\-s5\-or\-rtf\f[]
2148+T}
2149+T{
2150+\f[C]3.\ Applications\f[]
2151+T}@T{
2152+\f[C]applications\f[]
2153+T}
2154+T{
2155+\f[C]33\f[]
2156+T}@T{
2157+\f[C]section\f[]
2158+T}
2159+.TE
2160+.PP
2161+These rules should, in most cases, allow one to determine the identifier
2162+from the header text.
2163+The exception is when several headers have the same text; in this case,
2164+the first will get an identifier as described above; the second will get
2165+the same identifier with \f[C]\-1\f[] appended; the third with
2166+\f[C]\-2\f[]; and so on.
2167+.PP
2168+These identifiers are used to provide link targets in the table of
2169+contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
2170+option.
2171+They also make it easy to provide links from one section of a document
2172+to another.
2173+A link to this section, for example, might look like this:
2174+.IP
2175+.nf
2176+\f[C]
2177+See\ the\ section\ on
2178+[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
2179+\f[]
2180+.fi
2181+.PP
2182+Note, however, that this method of providing links to sections works
2183+only in HTML, LaTeX, and ConTeXt formats.
2184+.PP
2185+If the \f[C]\-\-section\-divs\f[] option is specified, then each section
2186+will be wrapped in a \f[C]div\f[] (or a \f[C]section\f[], if
2187+\f[C]html5\f[] was specified), and the identifier will be attached to
2188+the enclosing \f[C]<div>\f[] (or \f[C]<section>\f[]) tag rather than the
2189+header itself.
2190+This allows entire sections to be manipulated using JavaScript or
2191+treated differently in CSS.
2192+.SS Extension: \f[C]ascii_identifiers\f[]
2193+.PP
2194+Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
2195+ASCII.
2196+Accents are stripped off of accented Latin letters, and non\-Latin
2197+letters are omitted.
2198+.SS Math Input
2199+.PP
2200+The extensions \f[C]tex_math_dollars\f[],
2201+\f[C]tex_math_single_backslash\f[], and
2202+\f[C]tex_math_double_backslash\f[] are described in the section about
2203+Pandoc\[aq]s Markdown.
2204+.PP
2205+However, they can also be used with HTML input.
2206+This is handy for reading web pages formatted using MathJax, for
2207+example.
2208+.SS Raw HTML/TeX
2209+.PP
2210+The following extensions (especially how they affect Markdown
2211+input/output) are also described in more detail in their respective
2212+sections of Pandoc\[aq]s Markdown.
2213+.SS Extension: \f[C]raw_html\f[]
2214+.PP
2215+When converting from HTML, parse elements to raw HTML which are not
2216+representable in pandoc\[aq]s AST.
2217+By default, this is disabled for HTML input.
2218+.SS Extension: \f[C]raw_tex\f[]
2219+.PP
2220+Allows raw LaTeX, TeX, and ConTeXt to be included in a document.
2221+.PP
2222+This extension can be enabled/disabled for the following formats (in
2223+addition to \f[C]markdown\f[]):
2224+.TP
2225+.B input formats
2226+\f[C]latex\f[], \f[C]org\f[], \f[C]textile\f[]
2227+.RS
2228+.RE
2229+.TP
2230+.B output formats
2231+\f[C]textile\f[]
2232+.RS
2233+.RE
2234+.SS Extension: \f[C]native_divs\f[]
2235+.PP
2236+This extension is enabled by default for HTML input.
2237+This means that \f[C]div\f[]s are parsed to pandoc native elements.
2238+(Alternatively, you can parse them to raw HTML using
2239+\f[C]\-f\ html\-native_divs+raw_html\f[].)
2240+.PP
2241+When converting HTML to Markdown, for example, you may want to drop all
2242+\f[C]div\f[]s and \f[C]span\f[]s:
2243+.IP
2244+.nf
2245+\f[C]
2246+pandoc\ \-f\ html\-native_divs\-native_spans\ \-t\ markdown
2247+\f[]
2248+.fi
2249+.SS Extension: \f[C]native_spans\f[]
2250+.PP
2251+Analogous to \f[C]native_divs\f[] above.
2252+.SS Literate Haskell support
2253+.SS Extension: \f[C]literate_haskell\f[]
2254+.PP
2255+Treat the document as literate Haskell source.
2256+.PP
2257+This extension can be enabled/disabled for the following formats:
2258+.TP
2259+.B input formats
2260+\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[]
2261+.RS
2262+.RE
2263+.TP
2264+.B output formats
2265+\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], \f[C]html\f[]
2266+.RS
2267+.RE
2268+.PP
2269+If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to one of
2270+the formats above, pandoc will treat the document as literate Haskell
2271+source.
2272+This means that
2273+.IP \[bu] 2
2274+In Markdown input, "bird track" sections will be parsed as Haskell code
2275+rather than block quotations.
2276+Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
2277+be treated as Haskell code.
2278+For ATX\-style headers the character \[aq]=\[aq] will be used instead of
2279+\[aq]#\[aq].
2280+.IP \[bu] 2
2281+In Markdown output, code blocks with classes \f[C]haskell\f[] and
2282+\f[C]literate\f[] will be rendered using bird tracks, and block
2283+quotations will be indented one space, so they will not be treated as
2284+Haskell code.
2285+In addition, headers will be rendered setext\-style (with underlines)
2286+rather than ATX\-style (with \[aq]#\[aq] characters).
2287+(This is because ghc treats \[aq]#\[aq] characters in column 1 as
2288+introducing line numbers.)
2289+.IP \[bu] 2
2290+In restructured text input, "bird track" sections will be parsed as
2291+Haskell code.
2292+.IP \[bu] 2
2293+In restructured text output, code blocks with class \f[C]haskell\f[]
2294+will be rendered using bird tracks.
2295+.IP \[bu] 2
2296+In LaTeX input, text in \f[C]code\f[] environments will be parsed as
2297+Haskell code.
2298+.IP \[bu] 2
2299+In LaTeX output, code blocks with class \f[C]haskell\f[] will be
2300+rendered inside \f[C]code\f[] environments.
2301+.IP \[bu] 2
2302+In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
2303+with class \f[C]literatehaskell\f[] and bird tracks.
2304+.PP
2305+Examples:
2306+.IP
2307+.nf
2308+\f[C]
2309+pandoc\ \-f\ markdown+lhs\ \-t\ html
2310+\f[]
2311+.fi
2312+.PP
2313+reads literate Haskell source formatted with Markdown conventions and
2314+writes ordinary HTML (without bird tracks).
2315+.IP
2316+.nf
2317+\f[C]
2318+pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
2319+\f[]
2320+.fi
2321+.PP
2322+writes HTML with the Haskell code in bird tracks, so it can be copied
2323+and pasted as literate Haskell source.
2324+.PP
2325+Note that GHC expects the bird tracks in the first column, so indentend
2326+literate code blocks (e.g.
2327+inside an itemized environment) will not be picked up by the Haskell
2328+compiler.
2329+.SS Other extensions
2330+.SS Extension: \f[C]empty_paragraphs\f[]
2331+.PP
2332+Allows empty paragraphs.
2333+By default empty paragraphs are omitted.
2334+.PP
2335+This extension can be enabled/disabled for the following formats:
2336+.TP
2337+.B input formats
2338+\f[C]docx\f[], \f[C]html\f[]
2339+.RS
2340+.RE
2341+.TP
2342+.B output formats
2343+\f[C]markdown\f[], \f[C]docx\f[], \f[C]odt\f[], \f[C]opendocument\f[],
2344+\f[C]html\f[]
2345+.RS
2346+.RE
2347+.SS Extension: \f[C]amuse\f[]
2348+.PP
2349+In the \f[C]muse\f[] input format, this enables Text::Amuse extensions
2350+to Emacs Muse markup.
2351+.SS Extension: \f[C]citations\f[]
2352+.PP
2353+Some aspects of Pandoc\[aq]s Markdown citation syntax are also accepted
2354+in \f[C]org\f[] input.
20382355.SH PANDOC\[aq]S MARKDOWN
20392356.PP
20402357Pandoc understands an extended and slightly revised version of John
@@ -2043,11 +2360,11 @@ This document explains the syntax, noting differences from standard
20432360Markdown.
20442361Except where noted, these differences can be suppressed by using the
20452362\f[C]markdown_strict\f[] format instead of \f[C]markdown\f[].
2046−An extensions can be enabled by adding \f[C]+EXTENSION\f[] to the format
2047−name and disabled by adding \f[C]\-EXTENSION\f[].
2048−For example, \f[C]markdown_strict+footnotes\f[] is strict Markdown with
2049−footnotes enabled, while \f[C]markdown\-footnotes\-pipe_tables\f[] is
2050−pandoc\[aq]s Markdown without footnotes or pipe tables.
2363+Extensions can be enabled or disabled to specify the behavior more
2364+granularly.
2365+They are described in the following.
2366+See also Extensions above, for extensions that work also on other
2367+formats.
20512368.SS Philosophy
20522369.PP
20532370Markdown 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
21492466\f[C]#5\ bolt\f[] and \f[C]#hashtag\f[] count as headers.
21502467With this extension, pandoc does require the space.
21512468.SS Header identifiers
2469+.PP
2470+See also the \f[C]auto_identifiers\f[] extension above.
21522471.SS Extension: \f[C]header_attributes\f[]
21532472.PP
21542473Headers can be assigned attributes using this syntax at the end of the
@@ -2203,96 +2522,6 @@ is just the same as
22032522#\ My\ header\ {.unnumbered}
22042523\f[]
22052524.fi
2206−.SS Extension: \f[C]auto_identifiers\f[]
2207−.PP
2208−A header without an explicitly specified identifier will be
2209−automatically assigned a unique identifier based on the header text.
2210−To derive the identifier from the header text,
2211−.IP \[bu] 2
2212−Remove all formatting, links, etc.
2213−.IP \[bu] 2
2214−Remove all footnotes.
2215−.IP \[bu] 2
2216−Remove all punctuation, except underscores, hyphens, and periods.
2217−.IP \[bu] 2
2218−Replace all spaces and newlines with hyphens.
2219−.IP \[bu] 2
2220−Convert all alphabetic characters to lowercase.
2221−.IP \[bu] 2
2222−Remove everything up to the first letter (identifiers may not begin with
2223−a number or punctuation mark).
2224−.IP \[bu] 2
2225−If nothing is left after this, use the identifier \f[C]section\f[].
2226−.PP
2227−Thus, for example,
2228−.PP
2229−.TS
2230−tab(@);
2231−l l.
2232−T{
2233−Header
2234−T}@T{
2235−Identifier
2236−T}
2237−_
2238−T{
2239−\f[C]Header\ identifiers\ in\ HTML\f[]
2240−T}@T{
2241−\f[C]header\-identifiers\-in\-html\f[]
2242−T}
2243−T{
2244−\f[C]*Dogs*?\-\-in\ *my*\ house?\f[]
2245−T}@T{
2246−\f[C]dogs\-\-in\-my\-house\f[]
2247−T}
2248−T{
2249−\f[C][HTML],\ [S5],\ or\ [RTF]?\f[]
2250−T}@T{
2251−\f[C]html\-s5\-or\-rtf\f[]
2252−T}
2253−T{
2254−\f[C]3.\ Applications\f[]
2255−T}@T{
2256−\f[C]applications\f[]
2257−T}
2258−T{
2259−\f[C]33\f[]
2260−T}@T{
2261−\f[C]section\f[]
2262−T}
2263−.TE
2264−.PP
2265−These rules should, in most cases, allow one to determine the identifier
2266−from the header text.
2267−The exception is when several headers have the same text; in this case,
2268−the first will get an identifier as described above; the second will get
2269−the same identifier with \f[C]\-1\f[] appended; the third with
2270−\f[C]\-2\f[]; and so on.
2271−.PP
2272−These identifiers are used to provide link targets in the table of
2273−contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
2274−option.
2275−They also make it easy to provide links from one section of a document
2276−to another.
2277−A link to this section, for example, might look like this:
2278−.IP
2279−.nf
2280−\f[C]
2281−See\ the\ section\ on
2282−[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
2283−\f[]
2284−.fi
2285−.PP
2286−Note, however, that this method of providing links to sections works
2287−only in HTML, LaTeX, and ConTeXt formats.
2288−.PP
2289−If the \f[C]\-\-section\-divs\f[] option is specified, then each section
2290−will be wrapped in a \f[C]div\f[] (or a \f[C]section\f[], if
2291−\f[C]html5\f[] was specified), and the identifier will be attached to
2292−the enclosing \f[C]<div>\f[] (or \f[C]<section>\f[]) tag rather than the
2293−header itself.
2294−This allows entire sections to be manipulated using JavaScript or
2295−treated differently in CSS.
22962525.SS Extension: \f[C]implicit_header_references\f[]
22972526.PP
22982527Pandoc behaves as if reference links have been defined for each header.
@@ -3763,9 +3992,6 @@ options selected.
37633992Therefore see Math rendering in HTML above.
37643993.RS
37653994.RE
3766−.PP
3767−This extension can be used with both \f[C]markdown\f[] and \f[C]html\f[]
3768−input.
37693995.SS Raw HTML
37703996.SS Extension: \f[C]raw_html\f[]
37713997.PP
@@ -4300,32 +4526,6 @@ note.]
43004526.fi
43014527.PP
43024528Inline and regular footnotes may be mixed freely.
4303−.SS Typography
4304−.SS Extension: \f[C]smart\f[]
4305−.PP
4306−Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as
4307−em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses.
4308−Nonbreaking spaces are inserted after certain abbreviations, such as
4309−"Mr." This option currently affects the input formats \f[C]markdown\f[],
4310−\f[C]commonmark\f[], \f[C]latex\f[], \f[C]mediawiki\f[], \f[C]org\f[],
4311−\f[C]rst\f[], and \f[C]twiki\f[], and the output formats
4312−\f[C]markdown\f[], \f[C]latex\f[], and \f[C]context\f[].
4313−It is enabled by default for \f[C]markdown\f[], \f[C]latex\f[], and
4314−\f[C]context\f[] (in both input and output).
4315−.PP
4316−Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[]
4317−extension has the reverse effect: what would have been curly quotes
4318−comes out straight.
4319−.PP
4320−In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for
4321−quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes,
4322−\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes
4323−(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash).
4324−If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse
4325−these characters literally.
4326−In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the
4327−ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use
4328−unicode quotation mark and dash characters.
43294529.SS Citations
43304530.SS Extension: \f[C]citations\f[]
43314531.PP
@@ -4689,9 +4889,6 @@ as inline TeX math, and anything between \f[C]\\[\f[] and \f[C]\\]\f[]
46894889to be interpreted as display TeX math.
46904890Note: a drawback of this extension is that it precludes escaping
46914891\f[C](\f[] and \f[C][\f[].
4692−.PP
4693−This extension can be used with both \f[C]markdown\f[] and \f[C]html\f[]
4694−input.
46954892.SS Extension: \f[C]tex_math_double_backslash\f[]
46964893.PP
46974894Causes anything between \f[C]\\\\(\f[] and \f[C]\\\\)\f[] to be
@@ -4739,12 +4936,6 @@ opposed to being parsed as paragraphs).
47394936.PP
47404937Makes all absolute URIs into links, even when not surrounded by pointy
47414938braces \f[C]<...>\f[].
4742−.SS Extension: \f[C]ascii_identifiers\f[]
4743−.PP
4744−Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
4745−ASCII.
4746−Accents are stripped off of accented Latin letters, and non\-Latin
4747−letters are omitted.
47484939.SS Extension: \f[C]mmd_link_attributes\f[]
47494940.PP
47504941Parses multimarkdown style key\-value attributes on link and image
@@ -4779,13 +4970,6 @@ anything.
47794970.IP \[bu] 2
47804971Lazy wrapping of paragraphs is not allowed: the entire definition must
47814972be indented four spaces.
4782−.SS Extension: \f[C]empty_paragraphs\f[]
4783−.PP
4784−Allows empty paragraphs.
4785−By default empty paragraphs are omitted.
4786−This affects the \f[C]docx\f[] reader and writer, the
4787−\f[C]opendocument\f[] and \f[C]odt\f[] writer, and all HTML\-based
4788−readers and writers.
47894973.SS Markdown variants
47904974.PP
47914975In addition to pandoc\[aq]s extended Markdown, the following Markdown
@@ -4831,37 +5015,26 @@ variants are supported:
48315015.RS
48325016.RE
48335017.PP
4834−We also support \f[C]gfm\f[] (GitHub\-Flavored Markdown) as a set of
4835−extensions on \f[C]commonmark\f[]:
5018+We also support \f[C]commonmark\f[] and \f[C]gfm\f[] (GitHub\-Flavored
5019+Markdown, which is implemented as a set of extensions on
5020+\f[C]commonmark\f[]).
48365021.PP
4837−: \f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
5022+Note, however, that \f[C]commonmark\f[] and \f[C]gfm\f[] have limited
5023+support for extensions.
5024+Only those listed below (and \f[C]smart\f[] and \f[C]raw_tex\f[]) will
5025+work.
5026+The extensions can, however, all be individually disabled.
5027+Also, \f[C]raw_tex\f[] only affects \f[C]gfm\f[] output, not input.
5028+.TP
5029+.B \f[C]gfm\f[] (GitHub\-Flavored Markdown)
5030+\f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
48385031\f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[],
48395032\f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[],
48405033\f[C]intraword_underscores\f[], \f[C]strikeout\f[],
48415034\f[C]hard_line_breaks\f[], \f[C]emoji\f[],
48425035\f[C]shortcut_reference_links\f[], \f[C]angle_brackets_escapable\f[].
4843−.IP
4844−.nf
4845−\f[C]
4846−These\ can\ all\ be\ individually\ disabled.\ Note,\ however,\ that
4847−`commonmark`\ and\ `gfm`\ have\ limited\ support\ for\ extensions:
4848−extensions\ other\ than\ those\ listed\ above\ (and\ `smart`\ and
4849−`raw_tex`)\ will\ have\ no\ effect\ on\ `commonmark`\ or\ `gfm`.
4850−And\ `raw_tex`\ only\ affects\ `gfm`\ output,\ not\ input.
4851−\f[]
4852−.fi
4853−.SS Extensions with formats other than Markdown
4854−.PP
4855−Some of the extensions discussed above can be used with formats other
4856−than Markdown:
4857−.IP \[bu] 2
4858−\f[C]auto_identifiers\f[] can be used with \f[C]latex\f[], \f[C]rst\f[],
4859−\f[C]mediawiki\f[], and \f[C]textile\f[] input (and is used by default).
4860−.IP \[bu] 2
4861−\f[C]tex_math_dollars\f[], \f[C]tex_math_single_backslash\f[], and
4862−\f[C]tex_math_double_backslash\f[] can be used with \f[C]html\f[] input.
4863−(This is handy for reading web pages formatted using MathJax, for
4864−example.)
5036+.RS
5037+.RE
48655038.SH PRODUCING SLIDE SHOWS WITH PANDOC
48665039.PP
48675040You can use pandoc to produce an HTML + JavaScript slide presentation
@@ -5313,70 +5486,6 @@ For example:
53135486</audio>
53145487\f[]
53155488.fi
5316−.SH LITERATE HASKELL SUPPORT
5317−.PP
5318−If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to an
5319−appropriate input or output format (\f[C]markdown\f[],
5320−\f[C]markdown_strict\f[], \f[C]rst\f[], or \f[C]latex\f[] for input or
5321−output; \f[C]beamer\f[], \f[C]html4\f[] or \f[C]html5\f[] for output
5322−only), pandoc will treat the document as literate Haskell source.
5323−This means that
5324−.IP \[bu] 2
5325−In Markdown input, "bird track" sections will be parsed as Haskell code
5326−rather than block quotations.
5327−Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
5328−be treated as Haskell code.
5329−For ATX\-style headers the character \[aq]=\[aq] will be used instead of
5330−\[aq]#\[aq].
5331−.IP \[bu] 2
5332−In Markdown output, code blocks with classes \f[C]haskell\f[] and
5333−\f[C]literate\f[] will be rendered using bird tracks, and block
5334−quotations will be indented one space, so they will not be treated as
5335−Haskell code.
5336−In addition, headers will be rendered setext\-style (with underlines)
5337−rather than ATX\-style (with \[aq]#\[aq] characters).
5338−(This is because ghc treats \[aq]#\[aq] characters in column 1 as
5339−introducing line numbers.)
5340−.IP \[bu] 2
5341−In restructured text input, "bird track" sections will be parsed as
5342−Haskell code.
5343−.IP \[bu] 2
5344−In restructured text output, code blocks with class \f[C]haskell\f[]
5345−will be rendered using bird tracks.
5346−.IP \[bu] 2
5347−In LaTeX input, text in \f[C]code\f[] environments will be parsed as
5348−Haskell code.
5349−.IP \[bu] 2
5350−In LaTeX output, code blocks with class \f[C]haskell\f[] will be
5351−rendered inside \f[C]code\f[] environments.
5352−.IP \[bu] 2
5353−In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
5354−with class \f[C]literatehaskell\f[] and bird tracks.
5355−.PP
5356−Examples:
5357−.IP
5358−.nf
5359−\f[C]
5360−pandoc\ \-f\ markdown+lhs\ \-t\ html
5361−\f[]
5362−.fi
5363−.PP
5364−reads literate Haskell source formatted with Markdown conventions and
5365−writes ordinary HTML (without bird tracks).
5366−.IP
5367−.nf
5368−\f[C]
5369−pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
5370−\f[]
5371−.fi
5372−.PP
5373−writes HTML with the Haskell code in bird tracks, so it can be copied
5374−and pasted as literate Haskell source.
5375−.PP
5376−Note that GHC expects the bird tracks in the first column, so indentend
5377−literate code blocks (e.g.
5378−inside an itemized environment) will not be picked up by the Haskell
5379−compiler.
53805489.SH SYNTAX HIGHLIGHTING
53815490.PP
53825491Pandoc will automatically highlight syntax in fenced code blocks that