git.iko.soy/typeable/pandoc
on master help sign in
Added pandoc.1 to repository. Don't build as part of cabal build.

The process was too fragile. It made too many assumptions about available libraries (which failed sometimes when sandboxes were used). This is a low-tech solution. The only drawback is that `man/pandoc.1` is a generated file in the repository. It will need to be regenerated periodically when README changes.

commit79764df2d5c75c63b92613316fcc8a9b8379f8cc authorJohn MacFarlane <jgm@berkeley.edu> dateThu 2 Jul 2015, 22:09 (11 years ago) parentfbc5384
6 files changed+4352−28
INSTALL+5−5 Makefile+10−3 RELEASE-CHECKLIST+2 Setup.hs+2−19 man/pandoc.1+4332 pandoc.cabal+1−1
INSTALL+5−5
@@ -75,12 +75,12 @@ Quick install
7575 --extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \
7676 -funicode_collation text-icu pandoc-citeproc
7777
78−The `pandoc.1` man page will be built and installed automatically.
79−The build process shows you where it is installed: you may need
80−to set your `MANPATH` accordingly.
78+The `pandoc.1` man page will be installed automatically. cabal shows
79+you where it is installed: you may need to set your `MANPATH`
80+accordingly. If `README` has been modified, the man page can be
81+rebuilt: `make man/pandoc.1`.
8182
82−The `pandoc-citeproc.1` man page will also be built and installed
83−automatically.
83+The `pandoc-citeproc.1` man page will also be installed automatically.
8484
8585[GHC]: http://www.haskell.org/ghc/
8686[Haskell platform]: http://hackage.haskell.org/platform/
Makefile+10−3
@@ -27,19 +27,26 @@ install: full
2727 cabal copy
2828 cabal register
2929
30−dist:
30+dist: man/pandoc.1
3131 cabal sdist
3232 rm -rf "pandoc-${version}"
3333 tar xvzf dist/pandoc-${version}.tar.gz
3434 cd pandoc-${version}
3535 cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}"
3636
37−debpkg:
37+debpkg: man/pandoc.1
3838 ./make_deb.sh
3939
40−osxpkg:
40+osxpkg: man/pandoc.1
4141 ./make_osx_package.sh
4242
43+man/pandoc.1: README man/pandoc.1.template
44+ pandoc $< -t man -s --template man/pandoc.1.template \
45+ --filter man/capitalizeHeaders.hs \
46+ --filter man/removeNotes.hs \
47+ --filter man/removeLinks.hs \
48+ -o $@
49+
4350download_stats:
4451 curl https://api.github.com/repos/jgm/pandoc/releases | \
4552 jq '[.[] | .assets | .[] | {name: .name, download_count: .download_count}]'
RELEASE-CHECKLIST+2
@@ -2,6 +2,8 @@ _ Test, on linux, windows, mac (inc. website demos)
22
33_ Finalize changelog
44
5+_ man man/pandoc.1 and commit if needed
6+
57_ Tag release in git
68
79_ Tag templates
Setup.hs+2−19
@@ -18,21 +18,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
1919import Distribution.Simple
2020import Distribution.Simple.PreProcess
21−import Distribution.Simple.InstallDirs (mandir)
22−import Distribution.PackageDescription (PackageDescription(..), Executable(..))
21+import Distribution.PackageDescription (PackageDescription(..))
2322import System.Process ( rawSystem )
2423import System.FilePath ( (</>) )
2524import System.Directory ( findExecutable )
26−import Distribution.Simple.Utils (info, notice, rawSystemExit, installOrdinaryFiles)
25+import Distribution.Simple.Utils (info, notice, installOrdinaryFiles)
2726import Distribution.Simple.Setup
2827import Distribution.Simple.LocalBuildInfo
29−import Distribution.Verbosity
3028
3129main :: IO ()
3230main = defaultMainWithHooks $ simpleUserHooks {
3331 -- enable hsb2hs preprocessor for .hsb files
3432 hookedPreProcessors = [ppBlobSuffixHandler]
35− , postBuild = makeManPage
3633 , postCopy = installManPage
3734 }
3835
@@ -49,20 +46,6 @@ ppBlobSuffixHandler = ("hsb", \_ _ ->
4946 return ()
5047 })
5148
52−makeManPage :: Args -> BuildFlags
53− -> PackageDescription -> LocalBuildInfo -> IO ()
54−makeManPage _ bf _ LocalBuildInfo{buildDir=buildDir}
55− = do notice verbosity "Creating man/pandoc.1"
56− rawSystemExit verbosity progPath args
57− where verbosity = fromFlagOrDefault normal $ buildVerbosity bf
58− progPath = buildDir </> "pandoc" </> "pandoc"
59− args = ["README", "-t", "man", "-s",
60− "--template", "man/pandoc.1.template",
61− "--filter", "man/capitalizeHeaders.hs",
62− "--filter", "man/removeNotes.hs",
63− "--filter", "man/removeLinks.hs",
64− "-o", "man/pandoc.1"]
65−
6649installManPage :: Args -> CopyFlags
6750 -> PackageDescription -> LocalBuildInfo -> IO ()
6851installManPage _ flags pkg lbi = do
man/pandoc.1new file+4332
@@ -0,0 +1,4332 @@
1+.\"t
2+.TH PANDOC 1 "July 02, 2015" ""
3+.SH NAME
4+pandoc - general markup converter
5+.SH SYNOPSIS
6+.PP
7+\f[C]pandoc\f[] [\f[I]options\f[]] [\f[I]input\-file\f[]]...
8+.SH DESCRIPTION
9+.PP
10+Pandoc is a Haskell library for converting from one markup format to
11+another, and a command\-line tool that uses this library.
12+It can read Markdown, CommonMark, and (subsets of) Textile,
13+reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, Haddock
14+markup, OPML, Emacs Org\-mode, DocBook, txt2tags, EPUB and Word docx;
15+and it can write plain text, Markdown, reStructuredText, XHTML, HTML 5,
16+LaTeX (including beamer slide shows), ConTeXt, RTF, OPML, DocBook,
17+OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, DokuWiki
18+markup, Haddock markup, EPUB (v2 or v3), FictionBook2, Textile, groff
19+man pages, Emacs Org\-Mode, AsciiDoc, InDesign ICML, and Slidy,
20+Slideous, DZSlides, reveal.js or S5 HTML slide shows.
21+It can also produce PDF output on systems where LaTeX is installed.
22+.PP
23+Pandoc\[aq]s enhanced version of markdown includes syntax for footnotes,
24+tables, flexible ordered lists, definition lists, fenced code blocks,
25+superscript, subscript, strikeout, title blocks, automatic tables of
26+contents, embedded LaTeX math, citations, and markdown inside HTML block
27+elements.
28+(These enhancements, described below under PANDOC\[aq]S MARKDOWN, can be
29+disabled using the \f[C]markdown_strict\f[] input or output format.)
30+.PP
31+In contrast to most existing tools for converting markdown to HTML,
32+which use regex substitutions, Pandoc has a modular design: it consists
33+of a set of readers, which parse text in a given format and produce a
34+native representation of the document, and a set of writers, which
35+convert this native representation into a target format.
36+Thus, adding an input or output format requires only adding a reader or
37+writer.
38+.SS Using \f[C]pandoc\f[]
39+.PP
40+If no \f[I]input\-file\f[] is specified, input is read from
41+\f[I]stdin\f[].
42+Otherwise, the \f[I]input\-files\f[] are concatenated (with a blank line
43+between each) and used as input.
44+Output goes to \f[I]stdout\f[] by default (though output to
45+\f[I]stdout\f[] is disabled for the \f[C]odt\f[], \f[C]docx\f[],
46+\f[C]epub\f[], and \f[C]epub3\f[] output formats).
47+For output to a file, use the \f[C]\-o\f[] option:
48+.IP
49+.nf
50+\f[C]
51+pandoc\ \-o\ output.html\ input.txt
52+\f[]
53+.fi
54+.PP
55+By default, pandoc produces a document fragment, not a standalone
56+document with a proper header and footer.
57+To produce a standalone document, use the \f[C]\-s\f[] or
58+\f[C]\-\-standalone\f[] flag:
59+.IP
60+.nf
61+\f[C]
62+pandoc\ \-s\ \-o\ output.html\ input.txt
63+\f[]
64+.fi
65+.PP
66+For more information on how standalone documents are produced, see
67+TEMPLATES, below.
68+.PP
69+Instead of a file, an absolute URI may be given.
70+In this case pandoc will fetch the content using HTTP:
71+.IP
72+.nf
73+\f[C]
74+pandoc\ \-f\ html\ \-t\ markdown\ http://www.fsf.org
75+\f[]
76+.fi
77+.PP
78+If multiple input files are given, \f[C]pandoc\f[] will concatenate them
79+all (with blank lines between them) before parsing.
80+This feature is disabled for binary input formats such as \f[C]EPUB\f[]
81+and \f[C]docx\f[].
82+.PP
83+The format of the input and output can be specified explicitly using
84+command\-line options.
85+The input format can be specified using the \f[C]\-r/\-\-read\f[] or
86+\f[C]\-f/\-\-from\f[] options, the output format using the
87+\f[C]\-w/\-\-write\f[] or \f[C]\-t/\-\-to\f[] options.
88+Thus, to convert \f[C]hello.txt\f[] from markdown to LaTeX, you could
89+type:
90+.IP
91+.nf
92+\f[C]
93+pandoc\ \-f\ markdown\ \-t\ latex\ hello.txt
94+\f[]
95+.fi
96+.PP
97+To convert \f[C]hello.html\f[] from html to markdown:
98+.IP
99+.nf
100+\f[C]
101+pandoc\ \-f\ html\ \-t\ markdown\ hello.html
102+\f[]
103+.fi
104+.PP
105+Supported output formats are listed below under the \f[C]\-t/\-\-to\f[]
106+option.
107+Supported input formats are listed below under the \f[C]\-f/\-\-from\f[]
108+option.
109+Note that the \f[C]rst\f[], \f[C]textile\f[], \f[C]latex\f[], and
110+\f[C]html\f[] readers are not complete; there are some constructs that
111+they do not parse.
112+.PP
113+If the input or output format is not specified explicitly,
114+\f[C]pandoc\f[] will attempt to guess it from the extensions of the
115+input and output filenames.
116+Thus, for example,
117+.IP
118+.nf
119+\f[C]
120+pandoc\ \-o\ hello.tex\ hello.txt
121+\f[]
122+.fi
123+.PP
124+will convert \f[C]hello.txt\f[] from markdown to LaTeX.
125+If no output file is specified (so that output goes to \f[I]stdout\f[]),
126+or if the output file\[aq]s extension is unknown, the output format will
127+default to HTML.
128+If no input file is specified (so that input comes from \f[I]stdin\f[]),
129+or if the input files\[aq] extensions are unknown, the input format will
130+be assumed to be markdown unless explicitly specified.
131+.PP
132+Pandoc uses the UTF\-8 character encoding for both input and output.
133+If your local character encoding is not UTF\-8, you should pipe input
134+and output through \f[C]iconv\f[]:
135+.IP
136+.nf
137+\f[C]
138+iconv\ \-t\ utf\-8\ input.txt\ |\ pandoc\ |\ iconv\ \-f\ utf\-8
139+\f[]
140+.fi
141+.PP
142+Note that in some output formats (such as HTML, LaTeX, ConTeXt, RTF,
143+OPML, DocBook, and Texinfo), information about the character encoding is
144+included in the document header, which will only be included if you use
145+the \f[C]\-s/\-\-standalone\f[] option.
146+.SS Creating a PDF
147+.PP
148+Earlier versions of pandoc came with a program, \f[C]markdown2pdf\f[],
149+that used pandoc and pdflatex to produce a PDF.
150+This is no longer needed, since \f[C]pandoc\f[] can now produce
151+\f[C]pdf\f[] output itself.
152+To produce a PDF, simply specify an output file with a \f[C]\&.pdf\f[]
153+extension.
154+Pandoc will create a latex file and use pdflatex (or another engine, see
155+\f[C]\-\-latex\-engine\f[]) to convert it to PDF:
156+.IP
157+.nf
158+\f[C]
159+pandoc\ test.txt\ \-o\ test.pdf
160+\f[]
161+.fi
162+.PP
163+Production of a PDF requires that a LaTeX engine be installed (see
164+\f[C]\-\-latex\-engine\f[], below), and assumes that the following LaTeX
165+packages are available: \f[C]amssymb\f[], \f[C]amsmath\f[],
166+\f[C]ifxetex\f[], \f[C]ifluatex\f[], \f[C]listings\f[] (if the
167+\f[C]\-\-listings\f[] option is used), \f[C]fancyvrb\f[],
168+\f[C]longtable\f[], \f[C]booktabs\f[], \f[C]url\f[], \f[C]graphicx\f[]
169+and \f[C]grffile\f[] (if the document contains images),
170+\f[C]hyperref\f[], \f[C]ulem\f[], \f[C]babel\f[] (if the \f[C]lang\f[]
171+variable is set), \f[C]fontspec\f[] (if \f[C]xelatex\f[] or
172+\f[C]lualatex\f[] is used as the LaTeX engine), \f[C]xltxtra\f[] and
173+\f[C]xunicode\f[] (if \f[C]xelatex\f[] is used).
174+.SS \f[C]hsmarkdown\f[]
175+.PP
176+A user who wants a drop\-in replacement for \f[C]Markdown.pl\f[] may
177+create a symbolic link to the \f[C]pandoc\f[] executable called
178+\f[C]hsmarkdown\f[].
179+When invoked under the name \f[C]hsmarkdown\f[], \f[C]pandoc\f[] will
180+behave as if invoked with
181+\f[C]\-f\ markdown_strict\ \-\-email\-obfuscation=references\f[], and
182+all command\-line options will be treated as regular arguments.
183+However, this approach does not work under Cygwin, due to problems with
184+its simulation of symbolic links.
185+.SH OPTIONS
186+.SS General options
187+.TP
188+.B \f[C]\-f\f[] \f[I]FORMAT\f[], \f[C]\-r\f[] \f[I]FORMAT\f[], \f[C]\-\-from=\f[]\f[I]FORMAT\f[], \f[C]\-\-read=\f[]\f[I]FORMAT\f[]
189+Specify input format.
190+\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[]
191+(JSON version of native AST), \f[C]markdown\f[] (pandoc\[aq]s extended
192+markdown), \f[C]markdown_strict\f[] (original unextended markdown),
193+\f[C]markdown_phpextra\f[] (PHP Markdown Extra extended markdown),
194+\f[C]markdown_github\f[] (github extended markdown), \f[C]commonmark\f[]
195+(CommonMark markdown), \f[C]textile\f[] (Textile), \f[C]rst\f[]
196+(reStructuredText), \f[C]html\f[] (HTML), \f[C]docbook\f[] (DocBook),
197+\f[C]t2t\f[] (txt2tags), \f[C]docx\f[] (docx), \f[C]epub\f[] (EPUB),
198+\f[C]opml\f[] (OPML), \f[C]org\f[] (Emacs Org\-mode), \f[C]mediawiki\f[]
199+(MediaWiki markup), \f[C]twiki\f[] (TWiki markup), \f[C]haddock\f[]
200+(Haddock markup), or \f[C]latex\f[] (LaTeX).
201+If \f[C]+lhs\f[] is appended to \f[C]markdown\f[], \f[C]rst\f[],
202+\f[C]latex\f[], or \f[C]html\f[], the input will be treated as literate
203+Haskell source: see LITERATE HASKELL SUPPORT, below.
204+Markdown syntax extensions can be individually enabled or disabled by
205+appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
206+name.
207+So, for example, \f[C]markdown_strict+footnotes+definition_lists\f[] is
208+strict markdown with footnotes and definition lists enabled, and
209+\f[C]markdown\-pipe_tables+hard_line_breaks\f[] is pandoc\[aq]s markdown
210+without pipe tables and with hard line breaks.
211+See PANDOC\[aq]S MARKDOWN, below, for a list of extensions and their
212+names.
213+.RS
214+.RE
215+.TP
216+.B \f[C]\-t\f[] \f[I]FORMAT\f[], \f[C]\-w\f[] \f[I]FORMAT\f[], \f[C]\-\-to=\f[]\f[I]FORMAT\f[], \f[C]\-\-write=\f[]\f[I]FORMAT\f[]
217+Specify output format.
218+\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[]
219+(JSON version of native AST), \f[C]plain\f[] (plain text),
220+\f[C]markdown\f[] (pandoc\[aq]s extended markdown),
221+\f[C]markdown_strict\f[] (original unextended markdown),
222+\f[C]markdown_phpextra\f[] (PHP Markdown extra extended markdown),
223+\f[C]markdown_github\f[] (github extended markdown), \f[C]commonmark\f[]
224+(CommonMark markdown), \f[C]rst\f[] (reStructuredText), \f[C]html\f[]
225+(XHTML 1), \f[C]html5\f[] (HTML 5), \f[C]latex\f[] (LaTeX),
226+\f[C]beamer\f[] (LaTeX beamer slide show), \f[C]context\f[] (ConTeXt),
227+\f[C]man\f[] (groff man), \f[C]mediawiki\f[] (MediaWiki markup),
228+\f[C]dokuwiki\f[] (DokuWiki markup), \f[C]textile\f[] (Textile),
229+\f[C]org\f[] (Emacs Org\-Mode), \f[C]texinfo\f[] (GNU Texinfo),
230+\f[C]opml\f[] (OPML), \f[C]docbook\f[] (DocBook), \f[C]opendocument\f[]
231+(OpenDocument), \f[C]odt\f[] (OpenOffice text document), \f[C]docx\f[]
232+(Word docx), \f[C]haddock\f[] (Haddock markup), \f[C]rtf\f[] (rich text
233+format), \f[C]epub\f[] (EPUB v2 book), \f[C]epub3\f[] (EPUB v3),
234+\f[C]fb2\f[] (FictionBook2 e\-book), \f[C]asciidoc\f[] (AsciiDoc),
235+\f[C]icml\f[] (InDesign ICML), \f[C]slidy\f[] (Slidy HTML and javascript
236+slide show), \f[C]slideous\f[] (Slideous HTML and javascript slide
237+show), \f[C]dzslides\f[] (DZSlides HTML5 + javascript slide show),
238+\f[C]revealjs\f[] (reveal.js HTML5 + javascript slide show), \f[C]s5\f[]
239+(S5 HTML and javascript slide show), or the path of a custom lua writer
240+(see CUSTOM WRITERS, below).
241+Note that \f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will
242+not be directed to \f[I]stdout\f[]; an output filename must be specified
243+using the \f[C]\-o/\-\-output\f[] option.
244+If \f[C]+lhs\f[] is appended to \f[C]markdown\f[], \f[C]rst\f[],
245+\f[C]latex\f[], \f[C]beamer\f[], \f[C]html\f[], or \f[C]html5\f[], the
246+output will be rendered as literate Haskell source: see LITERATE HASKELL
247+SUPPORT, below.
248+Markdown syntax extensions can be individually enabled or disabled by
249+appending \f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format
250+name, as described above under \f[C]\-f\f[].
251+.RS
252+.RE
253+.TP
254+.B \f[C]\-o\f[] \f[I]FILE\f[], \f[C]\-\-output=\f[]\f[I]FILE\f[]
255+Write output to \f[I]FILE\f[] instead of \f[I]stdout\f[].
256+If \f[I]FILE\f[] is \f[C]\-\f[], output will go to \f[I]stdout\f[].
257+(Exception: if the output format is \f[C]odt\f[], \f[C]docx\f[],
258+\f[C]epub\f[], or \f[C]epub3\f[], output to stdout is disabled.)
259+.RS
260+.RE
261+.TP
262+.B \f[C]\-\-data\-dir=\f[]\f[I]DIRECTORY\f[]
263+Specify the user data directory to search for pandoc data files.
264+If this option is not specified, the default user data directory will be
265+used.
266+This is
267+.RS
268+.IP
269+.nf
270+\f[C]
271+$HOME/.pandoc
272+\f[]
273+.fi
274+.PP
275+in unix,
276+.IP
277+.nf
278+\f[C]
279+C:\\Documents\ And\ Settings\\USERNAME\\Application\ Data\\pandoc
280+\f[]
281+.fi
282+.PP
283+in Windows XP, and
284+.IP
285+.nf
286+\f[C]
287+C:\\Users\\USERNAME\\AppData\\Roaming\\pandoc
288+\f[]
289+.fi
290+.PP
291+in Windows 7.
292+(You can find the default user data directory on your system by looking
293+at the output of \f[C]pandoc\ \-\-version\f[].) A
294+\f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]default.csl\f[],
295+\f[C]epub.css\f[], \f[C]templates\f[], \f[C]slidy\f[],
296+\f[C]slideous\f[], or \f[C]s5\f[] directory placed in this directory
297+will override pandoc\[aq]s normal defaults.
298+.RE
299+.TP
300+.B \f[C]\-\-verbose\f[]
301+Give verbose debugging output.
302+Currently this only has an effect with PDF output.
303+.RS
304+.RE
305+.TP
306+.B \f[C]\-v\f[], \f[C]\-\-version\f[]
307+Print version.
308+.RS
309+.RE
310+.TP
311+.B \f[C]\-h\f[], \f[C]\-\-help\f[]
312+Show usage message.
313+.RS
314+.RE
315+.SS Reader options
316+.TP
317+.B \f[C]\-R\f[], \f[C]\-\-parse\-raw\f[]
318+Parse untranslatable HTML codes and LaTeX environments as raw HTML or
319+LaTeX, instead of ignoring them.
320+Affects only HTML and LaTeX input.
321+Raw HTML can be printed in markdown, reStructuredText, HTML, Slidy,
322+Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX can be printed
323+in markdown, reStructuredText, LaTeX, and ConTeXt output.
324+The default is for the readers to omit untranslatable HTML codes and
325+LaTeX environments.
326+(The LaTeX reader does pass through untranslatable LaTeX
327+\f[I]commands\f[], even if \f[C]\-R\f[] is not specified.)
328+.RS
329+.RE
330+.TP
331+.B \f[C]\-S\f[], \f[C]\-\-smart\f[]
332+Produce typographically correct output, converting straight quotes to
333+curly quotes, \f[C]\-\-\-\f[] to em\-dashes, \f[C]\-\-\f[] to
334+en\-dashes, and \f[C]\&...\f[] to ellipses.
335+Nonbreaking spaces are inserted after certain abbreviations, such as
336+"Mr." (Note: This option is significant only when the input format is
337+\f[C]markdown\f[], \f[C]markdown_strict\f[], \f[C]textile\f[] or
338+\f[C]twiki\f[].
339+It is selected automatically when the input format is \f[C]textile\f[]
340+or the output format is \f[C]latex\f[] or \f[C]context\f[], unless
341+\f[C]\-\-no\-tex\-ligatures\f[] is used.)
342+.RS
343+.RE
344+.TP
345+.B \f[C]\-\-old\-dashes\f[]
346+Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
347+\f[C]\-\f[] before a numeral is an en\-dash, and \f[C]\-\-\f[] is an
348+em\-dash.
349+This option is selected automatically for \f[C]textile\f[] input.
350+.RS
351+.RE
352+.TP
353+.B \f[C]\-\-base\-header\-level=\f[]\f[I]NUMBER\f[]
354+Specify the base level for headers (defaults to 1).
355+.RS
356+.RE
357+.TP
358+.B \f[C]\-\-indented\-code\-classes=\f[]\f[I]CLASSES\f[]
359+Specify classes to use for indented code blocks\-\-for example,
360+\f[C]perl,numberLines\f[] or \f[C]haskell\f[].
361+Multiple classes may be separated by spaces or commas.
362+.RS
363+.RE
364+.TP
365+.B \f[C]\-\-default\-image\-extension=\f[]\f[I]EXTENSION\f[]
366+Specify a default extension to use when image paths/URLs have no
367+extension.
368+This allows you to use the same source for formats that require
369+different kinds of images.
370+Currently this option only affects the markdown and LaTeX readers.
371+.RS
372+.RE
373+.TP
374+.B \f[C]\-\-filter=\f[]\f[I]EXECUTABLE\f[]
375+Specify an executable to be used as a filter transforming the Pandoc AST
376+after the input is parsed and before the output is written.
377+The executable should read JSON from stdin and write JSON to stdout.
378+The JSON must be formatted like pandoc\[aq]s own JSON input and output.
379+The name of the output format will be passed to the filter as the first
380+argument.
381+Hence,
382+.RS
383+.IP
384+.nf
385+\f[C]
386+pandoc\ \-\-filter\ ./caps.py\ \-t\ latex
387+\f[]
388+.fi
389+.PP
390+is equivalent to
391+.IP
392+.nf
393+\f[C]
394+pandoc\ \-t\ json\ |\ ./caps.py\ latex\ |\ pandoc\ \-f\ json\ \-t\ latex
395+\f[]
396+.fi
397+.PP
398+The latter form may be useful for debugging filters.
399+.PP
400+Filters may be written in any language.
401+\f[C]Text.Pandoc.JSON\f[] exports \f[C]toJSONFilter\f[] to facilitate
402+writing filters in Haskell.
403+Those who would prefer to write filters in python can use the module
404+\f[C]pandocfilters\f[], installable from PyPI.
405+See http://github.com/jgm/pandocfilters for the module and several
406+examples.
407+There are also pandoc filter libraries in PHP, perl, and
408+javascript/node.js.
409+.PP
410+Note that the \f[I]EXECUTABLE\f[] will be sought in the user\[aq]s
411+\f[C]PATH\f[], and not in the working directory, if no directory is
412+provided.
413+If you want to run a script in the working directory, preface the
414+filename with \f[C]\&./\f[].
415+.RE
416+.TP
417+.B \f[C]\-M\f[] \f[I]KEY\f[][\f[C]=\f[]\f[I]VAL\f[]], \f[C]\-\-metadata=\f[]\f[I]KEY\f[][\f[C]:\f[]\f[I]VAL\f[]]
418+Set the metadata field \f[I]KEY\f[] to the value \f[I]VAL\f[].
419+A value specified on the command line overrides a value specified in the
420+document.
421+Values will be parsed as YAML boolean or string values.
422+If no value is specified, the value will be treated as Boolean true.
423+Like \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] causes template
424+variables to be set.
425+But unlike \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] affects the
426+metadata of the underlying document (which is accessible from filters
427+and may be printed in some output formats).
428+.RS
429+.RE
430+.TP
431+.B \f[C]\-\-normalize\f[]
432+Normalize the document after reading: merge adjacent \f[C]Str\f[] or
433+\f[C]Emph\f[] elements, for example, and remove repeated
434+\f[C]Space\f[]s.
435+.RS
436+.RE
437+.TP
438+.B \f[C]\-p\f[], \f[C]\-\-preserve\-tabs\f[]
439+Preserve tabs instead of converting them to spaces (the default).
440+Note that this will only affect tabs in literal code spans and code
441+blocks; tabs in regular text will be treated as spaces.
442+.RS
443+.RE
444+.TP
445+.B \f[C]\-\-tab\-stop=\f[]\f[I]NUMBER\f[]
446+Specify the number of spaces per tab (default is 4).
447+.RS
448+.RE
449+.TP
450+.B \f[C]\-\-track\-changes=accept\f[]|\f[C]reject\f[]|\f[C]all\f[]
451+Specifies what to do with insertions and deletions produced by the MS
452+Word "track\-changes" feature.
453+\f[C]accept\f[] (the default), inserts all insertions, and ignores all
454+deletions.
455+\f[C]reject\f[] inserts all deletions and ignores insertions.
456+\f[C]all\f[] puts in both insertions and deletions, wrapped in spans
457+with \f[C]insertion\f[] and \f[C]deletion\f[] classes, respectively.
458+The author and time of change is included.
459+\f[C]all\f[] is useful for scripting: only accepting changes from a
460+certain reviewer, say, or before a certain date.
461+This option only affects the docx reader.
462+.RS
463+.RE
464+.TP
465+.B \f[C]\-\-extract\-media=\f[]\f[I]DIR\f[]
466+Extract images and other media contained in a docx or epub container to
467+the path \f[I]DIR\f[], creating it if necessary, and adjust the images
468+references in the document so they point to the extracted files.
469+This option only affects the docx and epub readers.
470+.RS
471+.RE
472+.SS General writer options
473+.TP
474+.B \f[C]\-s\f[], \f[C]\-\-standalone\f[]
475+Produce output with an appropriate header and footer (e.g.
476+a standalone HTML, LaTeX, or RTF file, not a fragment).
477+This option is set automatically for \f[C]pdf\f[], \f[C]epub\f[],
478+\f[C]epub3\f[], \f[C]fb2\f[], \f[C]docx\f[], and \f[C]odt\f[] output.
479+.RS
480+.RE
481+.TP
482+.B \f[C]\-\-template=\f[]\f[I]FILE\f[]
483+Use \f[I]FILE\f[] as a custom template for the generated document.
484+Implies \f[C]\-\-standalone\f[].
485+See TEMPLATES below for a description of template syntax.
486+If no extension is specified, an extension corresponding to the writer
487+will be added, so that \f[C]\-\-template=special\f[] looks for
488+\f[C]special.html\f[] for HTML output.
489+If the template is not found, pandoc will search for it in the user data
490+directory (see \f[C]\-\-data\-dir\f[]).
491+If this option is not used, a default template appropriate for the
492+output format will be used (see
493+\f[C]\-D/\-\-print\-default\-template\f[]).
494+.RS
495+.RE
496+.TP
497+.B \f[C]\-V\f[] \f[I]KEY\f[][\f[C]=\f[]\f[I]VAL\f[]], \f[C]\-\-variable=\f[]\f[I]KEY\f[][\f[C]:\f[]\f[I]VAL\f[]]
498+Set the template variable \f[I]KEY\f[] to the value \f[I]VAL\f[] when
499+rendering the document in standalone mode.
500+This is generally only useful when the \f[C]\-\-template\f[] option is
501+used to specify a custom template, since pandoc automatically sets the
502+variables used in the default templates.
503+If no \f[I]VAL\f[] is specified, the key will be given the value
504+\f[C]true\f[].
505+.RS
506+.RE
507+.TP
508+.B \f[C]\-D\f[] \f[I]FORMAT\f[], \f[C]\-\-print\-default\-template=\f[]\f[I]FORMAT\f[]
509+Print the default template for an output \f[I]FORMAT\f[].
510+(See \f[C]\-t\f[] for a list of possible \f[I]FORMAT\f[]s.)
511+.RS
512+.RE
513+.TP
514+.B \f[C]\-\-print\-default\-data\-file=\f[]\f[I]FILE\f[]
515+Print a default data file.
516+.RS
517+.RE
518+.TP
519+.B \f[C]\-\-no\-wrap\f[]
520+Disable text wrapping in output.
521+By default, text is wrapped appropriately for the output format.
522+.RS
523+.RE
524+.TP
525+.B \f[C]\-\-columns=\f[]\f[I]NUMBER\f[]
526+Specify length of lines in characters (for text wrapping).
527+.RS
528+.RE
529+.TP
530+.B \f[C]\-\-toc\f[], \f[C]\-\-table\-of\-contents\f[]
531+Include an automatically generated table of contents (or, in the case of
532+\f[C]latex\f[], \f[C]context\f[], and \f[C]rst\f[], an instruction to
533+create one) in the output document.
534+This option has no effect on \f[C]man\f[], \f[C]docbook\f[],
535+\f[C]slidy\f[], \f[C]slideous\f[], \f[C]s5\f[], \f[C]docx\f[], or
536+\f[C]odt\f[] output.
537+.RS
538+.RE
539+.TP
540+.B \f[C]\-\-toc\-depth=\f[]\f[I]NUMBER\f[]
541+Specify the number of section levels to include in the table of
542+contents.
543+The default is 3 (which means that level 1, 2, and 3 headers will be
544+listed in the contents).
545+.RS
546+.RE
547+.TP
548+.B \f[C]\-\-no\-highlight\f[]
549+Disables syntax highlighting for code blocks and inlines, even when a
550+language attribute is given.
551+.RS
552+.RE
553+.TP
554+.B \f[C]\-\-highlight\-style=\f[]\f[I]STYLE\f[]
555+Specifies the coloring style to be used in highlighted source code.
556+Options are \f[C]pygments\f[] (the default), \f[C]kate\f[],
557+\f[C]monochrome\f[], \f[C]espresso\f[], \f[C]zenburn\f[],
558+\f[C]haddock\f[], and \f[C]tango\f[].
559+For more information on syntax highlighting in pandoc, see SYNTAX
560+HIGHLIGHTING, below.
561+.RS
562+.RE
563+.TP
564+.B \f[C]\-H\f[] \f[I]FILE\f[], \f[C]\-\-include\-in\-header=\f[]\f[I]FILE\f[]
565+Include contents of \f[I]FILE\f[], verbatim, at the end of the header.
566+This can be used, for example, to include special CSS or javascript in
567+HTML documents.
568+This option can be used repeatedly to include multiple files in the
569+header.
570+They will be included in the order specified.
571+Implies \f[C]\-\-standalone\f[].
572+.RS
573+.RE
574+.TP
575+.B \f[C]\-B\f[] \f[I]FILE\f[], \f[C]\-\-include\-before\-body=\f[]\f[I]FILE\f[]
576+Include contents of \f[I]FILE\f[], verbatim, at the beginning of the
577+document body (e.g.
578+after the \f[C]<body>\f[] tag in HTML, or the \f[C]\\begin{document}\f[]
579+command in LaTeX).
580+This can be used to include navigation bars or banners in HTML
581+documents.
582+This option can be used repeatedly to include multiple files.
583+They will be included in the order specified.
584+Implies \f[C]\-\-standalone\f[].
585+.RS
586+.RE
587+.TP
588+.B \f[C]\-A\f[] \f[I]FILE\f[], \f[C]\-\-include\-after\-body=\f[]\f[I]FILE\f[]
589+Include contents of \f[I]FILE\f[], verbatim, at the end of the document
590+body (before the \f[C]</body>\f[] tag in HTML, or the
591+\f[C]\\end{document}\f[] command in LaTeX).
592+This option can be be used repeatedly to include multiple files.
593+They will be included in the order specified.
594+Implies \f[C]\-\-standalone\f[].
595+.RS
596+.RE
597+.SS Options affecting specific writers
598+.TP
599+.B \f[C]\-\-self\-contained\f[]
600+Produce a standalone HTML file with no external dependencies, using
601+\f[C]data:\f[] URIs to incorporate the contents of linked scripts,
602+stylesheets, images, and videos.
603+The resulting file should be "self\-contained," in the sense that it
604+needs no external files and no net access to be displayed properly by a
605+browser.
606+This option works only with HTML output formats, including
607+\f[C]html\f[], \f[C]html5\f[], \f[C]html+lhs\f[], \f[C]html5+lhs\f[],
608+\f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[], \f[C]dzslides\f[], and
609+\f[C]revealjs\f[].
610+Scripts, images, and stylesheets at absolute URLs will be downloaded;
611+those at relative URLs will be sought relative to the working directory
612+(if the first source file is local) or relative to the base URL (if the
613+first source file is remote).
614+\f[C]\-\-self\-contained\f[] does not work with \f[C]\-\-mathjax\f[].
615+.RS
616+.RE
617+.TP
618+.B \f[C]\-\-offline\f[]
619+Deprecated synonym for \f[C]\-\-self\-contained\f[].
620+.RS
621+.RE
622+.TP
623+.B \f[C]\-5\f[], \f[C]\-\-html5\f[]
624+Produce HTML5 instead of HTML4.
625+This option has no effect for writers other than \f[C]html\f[].
626+(\f[I]Deprecated:\f[] Use the \f[C]html5\f[] output format instead.)
627+.RS
628+.RE
629+.TP
630+.B \f[C]\-\-html\-q\-tags\f[]
631+Use \f[C]<q>\f[] tags for quotes in HTML.
632+.RS
633+.RE
634+.TP
635+.B \f[C]\-\-ascii\f[]
636+Use only ascii characters in output.
637+Currently supported only for HTML output (which uses numerical entities
638+instead of UTF\-8 when this option is selected).
639+.RS
640+.RE
641+.TP
642+.B \f[C]\-\-reference\-links\f[]
643+Use reference\-style links, rather than inline links, in writing
644+markdown or reStructuredText.
645+By default inline links are used.
646+.RS
647+.RE
648+.TP
649+.B \f[C]\-\-atx\-headers\f[]
650+Use ATX style headers in markdown and asciidoc output.
651+The default is to use setext\-style headers for levels 1\-2, and then
652+ATX headers.
653+.RS
654+.RE
655+.TP
656+.B \f[C]\-\-chapters\f[]
657+Treat top\-level headers as chapters in LaTeX, ConTeXt, and DocBook
658+output.
659+When the LaTeX template uses the report, book, or memoir class, this
660+option is implied.
661+If \f[C]beamer\f[] is the output format, top\-level headers will become
662+\f[C]\\part{..}\f[].
663+.RS
664+.RE
665+.TP
666+.B \f[C]\-N\f[], \f[C]\-\-number\-sections\f[]
667+Number section headings in LaTeX, ConTeXt, HTML, or EPUB output.
668+By default, sections are not numbered.
669+Sections with class \f[C]unnumbered\f[] will never be numbered, even if
670+\f[C]\-\-number\-sections\f[] is specified.
671+.RS
672+.RE
673+.TP
674+.B \f[C]\-\-number\-offset=\f[]\f[I]NUMBER\f[][\f[C],\f[]\f[I]NUMBER\f[]\f[C],\f[]\f[I]\&...\f[]]
675+Offset for section headings in HTML output (ignored in other output
676+formats).
677+The first number is added to the section number for top\-level headers,
678+the second for second\-level headers, and so on.
679+So, for example, if you want the first top\-level header in your
680+document to be numbered "6", specify \f[C]\-\-number\-offset=5\f[].
681+If your document starts with a level\-2 header which you want to be
682+numbered "1.5", specify \f[C]\-\-number\-offset=1,4\f[].
683+Offsets are 0 by default.
684+Implies \f[C]\-\-number\-sections\f[].
685+.RS
686+.RE
687+.TP
688+.B \f[C]\-\-no\-tex\-ligatures\f[]
689+Do not convert quotation marks, apostrophes, and dashes to the TeX
690+ligatures when writing LaTeX or ConTeXt.
691+Instead, just use literal unicode characters.
692+This is needed for using advanced OpenType features with XeLaTeX and
693+LuaLaTeX.
694+Note: normally \f[C]\-\-smart\f[] is selected automatically for LaTeX
695+and ConTeXt output, but it must be specified explicitly if
696+\f[C]\-\-no\-tex\-ligatures\f[] is selected.
697+If you use literal curly quotes, dashes, and ellipses in your source,
698+then you may want to use \f[C]\-\-no\-tex\-ligatures\f[] without
699+\f[C]\-\-smart\f[].
700+.RS
701+.RE
702+.TP
703+.B \f[C]\-\-listings\f[]
704+Use listings package for LaTeX code blocks
705+.RS
706+.RE
707+.TP
708+.B \f[C]\-i\f[], \f[C]\-\-incremental\f[]
709+Make list items in slide shows display incrementally (one by one).
710+The default is for lists to be displayed all at once.
711+.RS
712+.RE
713+.TP
714+.B \f[C]\-\-slide\-level=\f[]\f[I]NUMBER\f[]
715+Specifies that headers with the specified level create slides (for
716+\f[C]beamer\f[], \f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[],
717+\f[C]dzslides\f[]).
718+Headers above this level in the hierarchy are used to divide the slide
719+show into sections; headers below this level create subheads within a
720+slide.
721+The default is to set the slide level based on the contents of the
722+document; see STRUCTURING THE SLIDE SHOW, below.
723+.RS
724+.RE
725+.TP
726+.B \f[C]\-\-section\-divs\f[]
727+Wrap sections in \f[C]<div>\f[] tags (or \f[C]<section>\f[] tags in
728+HTML5), and attach identifiers to the enclosing \f[C]<div>\f[] (or
729+\f[C]<section>\f[]) rather than the header itself.
730+See SECTION IDENTIFIERS, below.
731+.RS
732+.RE
733+.TP
734+.B \f[C]\-\-email\-obfuscation=none\f[]|\f[C]javascript\f[]|\f[C]references\f[]
735+Specify a method for obfuscating \f[C]mailto:\f[] links in HTML
736+documents.
737+\f[C]none\f[] leaves \f[C]mailto:\f[] links as they are.
738+\f[C]javascript\f[] obfuscates them using javascript.
739+\f[C]references\f[] obfuscates them by printing their letters as decimal
740+or hexadecimal character references.
741+.RS
742+.RE
743+.TP
744+.B \f[C]\-\-id\-prefix=\f[]\f[I]STRING\f[]
745+Specify a prefix to be added to all automatically generated identifiers
746+in HTML and DocBook output, and to footnote numbers in markdown output.
747+This is useful for preventing duplicate identifiers when generating
748+fragments to be included in other pages.
749+.RS
750+.RE
751+.TP
752+.B \f[C]\-T\f[] \f[I]STRING\f[], \f[C]\-\-title\-prefix=\f[]\f[I]STRING\f[]
753+Specify \f[I]STRING\f[] as a prefix at the beginning of the title that
754+appears in the HTML header (but not in the title as it appears at the
755+beginning of the HTML body).
756+Implies \f[C]\-\-standalone\f[].
757+.RS
758+.RE
759+.TP
760+.B \f[C]\-c\f[] \f[I]URL\f[], \f[C]\-\-css=\f[]\f[I]URL\f[]
761+Link to a CSS style sheet.
762+This option can be be used repeatedly to include multiple files.
763+They will be included in the order specified.
764+.RS
765+.RE
766+.TP
767+.B \f[C]\-\-reference\-odt=\f[]\f[I]FILE\f[]
768+Use the specified file as a style reference in producing an ODT.
769+For best results, the reference ODT should be a modified version of an
770+ODT produced using pandoc.
771+The contents of the reference ODT are ignored, but its stylesheets are
772+used in the new ODT.
773+If no reference ODT is specified on the command line, pandoc will look
774+for a file \f[C]reference.odt\f[] in the user data directory (see
775+\f[C]\-\-data\-dir\f[]).
776+If this is not found either, sensible defaults will be used.
777+.RS
778+.RE
779+.TP
780+.B \f[C]\-\-reference\-docx=\f[]\f[I]FILE\f[]
781+Use the specified file as a style reference in producing a docx file.
782+For best results, the reference docx should be a modified version of a
783+docx file produced using pandoc.
784+The contents of the reference docx are ignored, but its stylesheets and
785+document properties (including margins, page size, header, and footer)
786+are used in the new docx.
787+If no reference docx is specified on the command line, pandoc will look
788+for a file \f[C]reference.docx\f[] in the user data directory (see
789+\f[C]\-\-data\-dir\f[]).
790+If this is not found either, sensible defaults will be used.
791+The following styles are used by pandoc: [paragraph] Normal, Compact,
792+Title, Subtitle, Authors, Date, Abstract, Heading 1, Heading 2, Heading
793+3, Heading 4, Heading 5, Block Text, Definition Term, Definition,
794+Bibliography, Body Text, Table Caption, Image Caption, Figure,
795+FigureWithCaption; [character] Default Paragraph Font, Body Text Char,
796+Verbatim Char, Footnote Reference, Hyperlink.
797+.RS
798+.RE
799+.TP
800+.B \f[C]\-\-epub\-stylesheet=\f[]\f[I]FILE\f[]
801+Use the specified CSS file to style the EPUB.
802+If no stylesheet is specified, pandoc will look for a file
803+\f[C]epub.css\f[] in the user data directory (see
804+\f[C]\-\-data\-dir\f[]).
805+If it is not found there, sensible defaults will be used.
806+.RS
807+.RE
808+.TP
809+.B \f[C]\-\-epub\-cover\-image=\f[]\f[I]FILE\f[]
810+Use the specified image as the EPUB cover.
811+It is recommended that the image be less than 1000px in width and
812+height.
813+Note that in a markdown source document you can also specify
814+\f[C]cover\-image\f[] in a YAML metadata block (see EPUB METADATA,
815+below).
816+.RS
817+.RE
818+.TP
819+.B \f[C]\-\-epub\-metadata=\f[]\f[I]FILE\f[]
820+Look in the specified XML file for metadata for the EPUB.
821+The file should contain a series of Dublin Core elements, as documented
822+at http://dublincore.org/documents/dces/.
823+For example:
824+.RS
825+.IP
826+.nf
827+\f[C]
828+\ <dc:rights>Creative\ Commons</dc:rights>
829+\ <dc:language>es\-AR</dc:language>
830+\f[]
831+.fi
832+.PP
833+By default, pandoc will include the following metadata elements:
834+\f[C]<dc:title>\f[] (from the document title), \f[C]<dc:creator>\f[]
835+(from the document authors), \f[C]<dc:date>\f[] (from the document date,
836+which should be in ISO 8601 format), \f[C]<dc:language>\f[] (from the
837+\f[C]lang\f[] variable, or, if is not set, the locale), and
838+\f[C]<dc:identifier\ id="BookId">\f[] (a randomly generated UUID).
839+Any of these may be overridden by elements in the metadata file.
840+.PP
841+Note: if the source document is markdown, a YAML metadata block in the
842+document can be used instead.
843+See below under EPUB METADATA.
844+.RE
845+.TP
846+.B \f[C]\-\-epub\-embed\-font=\f[]\f[I]FILE\f[]
847+Embed the specified font in the EPUB.
848+This option can be repeated to embed multiple fonts.
849+Wildcards can also be used: for example, \f[C]DejaVuSans\-*.ttf\f[].
850+However, if you use wildcards on the command line, be sure to escape
851+them or put the whole filename in single quotes, to prevent them from
852+being interpreted by the shell.
853+To use the embedded fonts, you will need to add declarations like the
854+following to your CSS (see \f[C]\-\-epub\-stylesheet\f[]):
855+.RS
856+.IP
857+.nf
858+\f[C]
859+\@font\-face\ {
860+font\-family:\ DejaVuSans;
861+font\-style:\ normal;
862+font\-weight:\ normal;
863+src:url("DejaVuSans\-Regular.ttf");
864+}
865+\@font\-face\ {
866+font\-family:\ DejaVuSans;
867+font\-style:\ normal;
868+font\-weight:\ bold;
869+src:url("DejaVuSans\-Bold.ttf");
870+}
871+\@font\-face\ {
872+font\-family:\ DejaVuSans;
873+font\-style:\ italic;
874+font\-weight:\ normal;
875+src:url("DejaVuSans\-Oblique.ttf");
876+}
877+\@font\-face\ {
878+font\-family:\ DejaVuSans;
879+font\-style:\ italic;
880+font\-weight:\ bold;
881+src:url("DejaVuSans\-BoldOblique.ttf");
882+}
883+body\ {\ font\-family:\ "DejaVuSans";\ }
884+\f[]
885+.fi
886+.RE
887+.TP
888+.B \f[C]\-\-epub\-chapter\-level=\f[]\f[I]NUMBER\f[]
889+Specify the header level at which to split the EPUB into separate
890+"chapter" files.
891+The default is to split into chapters at level 1 headers.
892+This option only affects the internal composition of the EPUB, not the
893+way chapters and sections are displayed to users.
894+Some readers may be slow if the chapter files are too large, so for
895+large documents with few level 1 headers, one might want to use a
896+chapter level of 2 or 3.
897+.RS
898+.RE
899+.TP
900+.B \f[C]\-\-latex\-engine=pdflatex\f[]|\f[C]lualatex\f[]|\f[C]xelatex\f[]
901+Use the specified LaTeX engine when producing PDF output.
902+The default is \f[C]pdflatex\f[].
903+If the engine is not in your PATH, the full path of the engine may be
904+specified here.
905+.RS
906+.RE
907+.TP
908+.B \f[C]\-\-latex\-engine\-opt=\f[]\f[I]STRING\f[]
909+Use the given string as a command\-line argument to the
910+\f[C]latex\-engine\f[].
911+If used multiple times, the arguments are provided with spaces between
912+them.
913+Note that no check for duplicate options is done.
914+.RS
915+.RE
916+.SS Citation rendering
917+.TP
918+.B \f[C]\-\-bibliography=\f[]\f[I]FILE\f[]
919+Set the \f[C]bibliography\f[] field in the document\[aq]s metadata to
920+\f[I]FILE\f[], overriding any value set in the metadata, and process
921+citations using \f[C]pandoc\-citeproc\f[].
922+(This is equivalent to
923+\f[C]\-\-metadata\ bibliography=FILE\ \-\-filter\ pandoc\-citeproc\f[].)
924+If \f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] is also supplied,
925+\f[C]pandoc\-citeproc\f[] is not used, making this equivalent to
926+\f[C]\-\-metadata\ bibliography=FILE\f[].
927+If you supply this argument multiple times, each \f[I]FILE\f[] will be
928+added to bibliography.
929+.RS
930+.RE
931+.TP
932+.B \f[C]\-\-csl=\f[]\f[I]FILE\f[]
933+Set the \f[C]csl\f[] field in the document\[aq]s metadata to
934+\f[I]FILE\f[], overriding any value set in the metadata.
935+(This is equivalent to \f[C]\-\-metadata\ csl=FILE\f[].) This option is
936+only relevant with \f[C]pandoc\-citeproc\f[].
937+.RS
938+.RE
939+.TP
940+.B \f[C]\-\-citation\-abbreviations=\f[]\f[I]FILE\f[]
941+Set the \f[C]citation\-abbreviations\f[] field in the document\[aq]s
942+metadata to \f[I]FILE\f[], overriding any value set in the metadata.
943+(This is equivalent to
944+\f[C]\-\-metadata\ citation\-abbreviations=FILE\f[].) This option is
945+only relevant with \f[C]pandoc\-citeproc\f[].
946+.RS
947+.RE
948+.TP
949+.B \f[C]\-\-natbib\f[]
950+Use natbib for citations in LaTeX output.
951+This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or
952+with PDF output.
953+It is intended for use in producing a LaTeX file that can be processed
954+with pdflatex and bibtex.
955+.RS
956+.RE
957+.TP
958+.B \f[C]\-\-biblatex\f[]
959+Use biblatex for citations in LaTeX output.
960+This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or
961+with PDF output.
962+It is intended for use in producing a LaTeX file that can be processed
963+with pdflatex and bibtex or biber.
964+.RS
965+.RE
966+.SS Math rendering in HTML
967+.TP
968+.B \f[C]\-m\f[] [\f[I]URL\f[]], \f[C]\-\-latexmathml\f[][\f[C]=\f[]\f[I]URL\f[]]
969+Use the LaTeXMathML script to display embedded TeX math in HTML output.
970+To insert a link to a local copy of the \f[C]LaTeXMathML.js\f[] script,
971+provide a \f[I]URL\f[].
972+If no \f[I]URL\f[] is provided, the contents of the script will be
973+inserted directly into the HTML header, preserving portability at the
974+price of efficiency.
975+If you plan to use math on several pages, it is much better to link to a
976+copy of the script, so it can be cached.
977+.RS
978+.RE
979+.TP
980+.B \f[C]\-\-mathml\f[][\f[C]=\f[]\f[I]URL\f[]]
981+Convert TeX math to MathML (in \f[C]docbook\f[] as well as \f[C]html\f[]
982+and \f[C]html5\f[]).
983+In standalone \f[C]html\f[] output, a small javascript (or a link to
984+such a script if a \f[I]URL\f[] is supplied) will be inserted that
985+allows the MathML to be viewed on some browsers.
986+.RS
987+.RE
988+.TP
989+.B \f[C]\-\-jsmath\f[][\f[C]=\f[]\f[I]URL\f[]]
990+Use jsMath to display embedded TeX math in HTML output.
991+The \f[I]URL\f[] should point to the jsMath load script (e.g.
992+\f[C]jsMath/easy/load.js\f[]); if provided, it will be linked to in the
993+header of standalone HTML documents.
994+If a \f[I]URL\f[] is not provided, no link to the jsMath load script
995+will be inserted; it is then up to the author to provide such a link in
996+the HTML template.
997+.RS
998+.RE
999+.TP
1000+.B \f[C]\-\-mathjax\f[][\f[C]=\f[]\f[I]URL\f[]]
1001+Use MathJax to display embedded TeX math in HTML output.
1002+The \f[I]URL\f[] should point to the \f[C]MathJax.js\f[] load script.
1003+If a \f[I]URL\f[] is not provided, a link to the MathJax CDN will be
1004+inserted.
1005+.RS
1006+.RE
1007+.TP
1008+.B \f[C]\-\-gladtex\f[]
1009+Enclose TeX math in \f[C]<eq>\f[] tags in HTML output.
1010+These can then be processed by gladTeX to produce links to images of the
1011+typeset formulas.
1012+.RS
1013+.RE
1014+.TP
1015+.B \f[C]\-\-mimetex\f[][\f[C]=\f[]\f[I]URL\f[]]
1016+Render TeX math using the mimeTeX CGI script.
1017+If \f[I]URL\f[] is not specified, it is assumed that the script is at
1018+\f[C]/cgi\-bin/mimetex.cgi\f[].
1019+.RS
1020+.RE
1021+.TP
1022+.B \f[C]\-\-webtex\f[][\f[C]=\f[]\f[I]URL\f[]]
1023+Render TeX formulas using an external script that converts TeX formulas
1024+to images.
1025+The formula will be concatenated with the URL provided.
1026+If \f[I]URL\f[] is not specified, the Google Chart API will be used.
1027+.RS
1028+.RE
1029+.TP
1030+.B \f[C]\-\-katex\f[][\f[C]=\f[]\f[I]URL\f[]]
1031+Use KaTeX to display embedded TeX math in HTML output.
1032+The \f[I]URL\f[] should point to the \f[C]katex.js\f[] load script.
1033+If a \f[I]URL\f[] is not provided, a link to the KaTeX CDN will be
1034+inserted.
1035+.RS
1036+.RE
1037+.TP
1038+.B \f[C]\-\-katex\-stylesheet=\f[]\f[I]URL\f[]
1039+The \f[I]URL\f[] should point to the \f[C]katex.css\f[] stylesheet.
1040+If this option is not specified, a link to the KaTeX CDN will be
1041+inserted.
1042+Note that this option does not imply \f[C]\-\-katex\f[].
1043+.RS
1044+.RE
1045+.SS Options for wrapper scripts
1046+.TP
1047+.B \f[C]\-\-dump\-args\f[]
1048+Print information about command\-line arguments to \f[I]stdout\f[], then
1049+exit.
1050+This option is intended primarily for use in wrapper scripts.
1051+The first line of output contains the name of the output file specified
1052+with the \f[C]\-o\f[] option, or \f[C]\-\f[] (for \f[I]stdout\f[]) if no
1053+output file was specified.
1054+The remaining lines contain the command\-line arguments, one per line,
1055+in the order they appear.
1056+These do not include regular Pandoc options and their arguments, but do
1057+include any options appearing after a \f[C]\-\-\f[] separator at the end
1058+of the line.
1059+.RS
1060+.RE
1061+.TP
1062+.B \f[C]\-\-ignore\-args\f[]
1063+Ignore command\-line arguments (for use in wrapper scripts).
1064+Regular Pandoc options are not ignored.
1065+Thus, for example,
1066+.RS
1067+.IP
1068+.nf
1069+\f[C]
1070+pandoc\ \-\-ignore\-args\ \-o\ foo.html\ \-s\ foo.txt\ \-\-\ \-e\ latin1
1071+\f[]
1072+.fi
1073+.PP
1074+is equivalent to
1075+.IP
1076+.nf
1077+\f[C]
1078+pandoc\ \-o\ foo.html\ \-s
1079+\f[]
1080+.fi
1081+.RE
1082+.SH TEMPLATES
1083+.PP
1084+When the \f[C]\-s/\-\-standalone\f[] option is used, pandoc uses a
1085+template to add header and footer material that is needed for a
1086+self\-standing document.
1087+To see the default template that is used, just type
1088+.IP
1089+.nf
1090+\f[C]
1091+pandoc\ \-D\ FORMAT
1092+\f[]
1093+.fi
1094+.PP
1095+where \f[C]FORMAT\f[] is the name of the output format.
1096+A custom template can be specified using the \f[C]\-\-template\f[]
1097+option.
1098+You can also override the system default templates for a given output
1099+format \f[C]FORMAT\f[] by putting a file
1100+\f[C]templates/default.FORMAT\f[] in the user data directory (see
1101+\f[C]\-\-data\-dir\f[], above).
1102+\f[I]Exceptions:\f[] For \f[C]odt\f[] output, customize the
1103+\f[C]default.opendocument\f[] template.
1104+For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template.
1105+.PP
1106+Templates may contain \f[I]variables\f[].
1107+Variable names are sequences of alphanumerics, \f[C]\-\f[], and
1108+\f[C]_\f[], starting with a letter.
1109+A variable name surrounded by \f[C]$\f[] signs will be replaced by its
1110+value.
1111+For example, the string \f[C]$title$\f[] in
1112+.IP
1113+.nf
1114+\f[C]
1115+<title>$title$</title>
1116+\f[]
1117+.fi
1118+.PP
1119+will be replaced by the document title.
1120+.PP
1121+To write a literal \f[C]$\f[] in a template, use \f[C]$$\f[].
1122+.PP
1123+Some variables are set automatically by pandoc.
1124+These vary somewhat depending on the output format, but include metadata
1125+fields (such as \f[C]title\f[], \f[C]author\f[], and \f[C]date\f[]) as
1126+well as the following:
1127+.TP
1128+.B \f[C]header\-includes\f[]
1129+contents specified by \f[C]\-H/\-\-include\-in\-header\f[] (may have
1130+multiple values)
1131+.RS
1132+.RE
1133+.TP
1134+.B \f[C]toc\f[]
1135+non\-null value if \f[C]\-\-toc/\-\-table\-of\-contents\f[] was
1136+specified
1137+.RS
1138+.RE
1139+.TP
1140+.B \f[C]include\-before\f[]
1141+contents specified by \f[C]\-B/\-\-include\-before\-body\f[] (may have
1142+multiple values)
1143+.RS
1144+.RE
1145+.TP
1146+.B \f[C]include\-after\f[]
1147+contents specified by \f[C]\-A/\-\-include\-after\-body\f[] (may have
1148+multiple values)
1149+.RS
1150+.RE
1151+.TP
1152+.B \f[C]body\f[]
1153+body of document
1154+.RS
1155+.RE
1156+.TP
1157+.B \f[C]lang\f[]
1158+language code for HTML or LaTeX documents
1159+.RS
1160+.RE
1161+.TP
1162+.B \f[C]slidy\-url\f[]
1163+base URL for Slidy documents (defaults to
1164+\f[C]http://www.w3.org/Talks/Tools/Slidy2\f[])
1165+.RS
1166+.RE
1167+.TP
1168+.B \f[C]slideous\-url\f[]
1169+base URL for Slideous documents (defaults to \f[C]slideous\f[])
1170+.RS
1171+.RE
1172+.TP
1173+.B \f[C]s5\-url\f[]
1174+base URL for S5 documents (defaults to \f[C]s5/default\f[])
1175+.RS
1176+.RE
1177+.TP
1178+.B \f[C]revealjs\-url\f[]
1179+base URL for reveal.js documents (defaults to \f[C]reveal.js\f[])
1180+.RS
1181+.RE
1182+.TP
1183+.B \f[C]theme\f[]
1184+reveal.js or LaTeX beamer theme
1185+.RS
1186+.RE
1187+.TP
1188+.B \f[C]transition\f[]
1189+reveal.js transition
1190+.RS
1191+.RE
1192+.TP
1193+.B \f[C]fontsize\f[]
1194+font size (10pt, 11pt, 12pt) for LaTeX documents
1195+.RS
1196+.RE
1197+.TP
1198+.B \f[C]documentclass\f[]
1199+document class for LaTeX documents
1200+.RS
1201+.RE
1202+.TP
1203+.B \f[C]classoption\f[]
1204+option for LaTeX documentclass, e.g.
1205+\f[C]oneside\f[]; may be repeated for multiple options
1206+.RS
1207+.RE
1208+.TP
1209+.B \f[C]geometry\f[]
1210+options for LaTeX \f[C]geometry\f[] class, e.g.
1211+\f[C]margin=1in\f[]; may be repeated for multiple options
1212+.RS
1213+.RE
1214+.TP
1215+.B \f[C]linestretch\f[]
1216+adjusts line spacing (requires the \f[C]setspace\f[] package)
1217+.RS
1218+.RE
1219+.TP
1220+.B \f[C]fontfamily\f[]
1221+font package to use for LaTeX documents (with pdflatex): TeXLive has
1222+\f[C]bookman\f[] (Bookman), \f[C]utopia\f[] or \f[C]fourier\f[]
1223+(Utopia), \f[C]fouriernc\f[] (New Century Schoolbook), \f[C]times\f[] or
1224+\f[C]txfonts\f[] (Times), \f[C]mathpazo\f[] or \f[C]pxfonts\f[] or
1225+\f[C]mathpple\f[] (Palatino), \f[C]libertine\f[] (Linux Libertine),
1226+\f[C]arev\f[] (Arev Sans), and the default \f[C]lmodern\f[], among
1227+others.
1228+.RS
1229+.RE
1230+.TP
1231+.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[]
1232+fonts for LaTeX documents (works only with xelatex and lualatex).
1233+Note that if \f[C]CJKmainfont\f[] is used, the \f[C]xeCJK\f[] package
1234+must be available.
1235+.RS
1236+.RE
1237+.TP
1238+.B \f[C]colortheme\f[]
1239+colortheme for LaTeX beamer documents
1240+.RS
1241+.RE
1242+.TP
1243+.B \f[C]fonttheme\f[]
1244+fonttheme for LaTeX beamer documents
1245+.RS
1246+.RE
1247+.TP
1248+.B \f[C]linkcolor\f[]
1249+color for internal links in LaTeX documents (\f[C]red\f[],
1250+\f[C]green\f[], \f[C]magenta\f[], \f[C]cyan\f[], \f[C]blue\f[],
1251+\f[C]black\f[])
1252+.RS
1253+.RE
1254+.TP
1255+.B \f[C]toccolor\f[]
1256+color for links in table of contents in LaTeX documents
1257+.RS
1258+.RE
1259+.TP
1260+.B \f[C]urlcolor\f[]
1261+color for external links in LaTeX documents
1262+.RS
1263+.RE
1264+.TP
1265+.B \f[C]citecolor\f[]
1266+color for citation links in LaTeX documents
1267+.RS
1268+.RE
1269+.TP
1270+.B \f[C]links\-as\-notes\f[]
1271+causes links to be printed as footnotes in LaTeX documents
1272+.RS
1273+.RE
1274+.TP
1275+.B \f[C]toc\f[]
1276+include table of contents in LaTeX documents
1277+.RS
1278+.RE
1279+.TP
1280+.B \f[C]toc\-depth\f[]
1281+level of section to include in table of contents in LaTeX documents
1282+.RS
1283+.RE
1284+.TP
1285+.B \f[C]toc\-title\f[]
1286+title of table of contents (works only with EPUB and docx)
1287+.RS
1288+.RE
1289+.TP
1290+.B \f[C]lof\f[]
1291+include list of figures in LaTeX documents
1292+.RS
1293+.RE
1294+.TP
1295+.B \f[C]lot\f[]
1296+include list of tables in LaTeX documents
1297+.RS
1298+.RE
1299+.TP
1300+.B \f[C]bibliography\f[]
1301+bibliography to use for resolving references
1302+.RS
1303+.RE
1304+.TP
1305+.B \f[C]biblio\-style\f[]
1306+bibliography style in LaTeX, when used with \f[C]\-\-natbib\f[]
1307+.RS
1308+.RE
1309+.TP
1310+.B \f[C]section\f[]
1311+section number in man pages
1312+.RS
1313+.RE
1314+.TP
1315+.B \f[C]header\f[]
1316+header in man pages
1317+.RS
1318+.RE
1319+.TP
1320+.B \f[C]footer\f[]
1321+footer in man pages
1322+.RS
1323+.RE
1324+.PP
1325+Variables may be set at the command line using the
1326+\f[C]\-V/\-\-variable\f[] option.
1327+Variables set in this way override metadata fields with the same name.
1328+.PP
1329+Templates may contain conditionals.
1330+The syntax is as follows:
1331+.IP
1332+.nf
1333+\f[C]
1334+$if(variable)$
1335+X
1336+$else$
1337+Y
1338+$endif$
1339+\f[]
1340+.fi
1341+.PP
1342+This will include \f[C]X\f[] in the template if \f[C]variable\f[] has a
1343+non\-null value; otherwise it will include \f[C]Y\f[].
1344+\f[C]X\f[] and \f[C]Y\f[] are placeholders for any valid template text,
1345+and may include interpolated variables or other conditionals.
1346+The \f[C]$else$\f[] section may be omitted.
1347+.PP
1348+When variables can have multiple values (for example, \f[C]author\f[] in
1349+a multi\-author document), you can use the \f[C]$for$\f[] keyword:
1350+.IP
1351+.nf
1352+\f[C]
1353+$for(author)$
1354+<meta\ name="author"\ content="$author$"\ />
1355+$endfor$
1356+\f[]
1357+.fi
1358+.PP
1359+You can optionally specify a separator to be used between consecutive
1360+items:
1361+.IP
1362+.nf
1363+\f[C]
1364+$for(author)$$author$$sep$,\ $endfor$
1365+\f[]
1366+.fi
1367+.PP
1368+A dot can be used to select a field of a variable that takes an object
1369+as its value.
1370+So, for example:
1371+.IP
1372+.nf
1373+\f[C]
1374+$author.name$\ ($author.affiliation$)
1375+\f[]
1376+.fi
1377+.PP
1378+If you use custom templates, you may need to revise them as pandoc
1379+changes.
1380+We recommend tracking the changes in the default templates, and
1381+modifying your custom templates accordingly.
1382+An easy way to do this is to fork the pandoc\-templates repository
1383+(http://github.com/jgm/pandoc\-templates) and merge in changes after
1384+each pandoc release.
1385+.SH PANDOC\[aq]S MARKDOWN
1386+.PP
1387+Pandoc understands an extended and slightly revised version of John
1388+Gruber\[aq]s markdown syntax.
1389+This document explains the syntax, noting differences from standard
1390+markdown.
1391+Except where noted, these differences can be suppressed by using the
1392+\f[C]markdown_strict\f[] format instead of \f[C]markdown\f[].
1393+An extensions can be enabled by adding \f[C]+EXTENSION\f[] to the format
1394+name and disabled by adding \f[C]\-EXTENSION\f[].
1395+For example, \f[C]markdown_strict+footnotes\f[] is strict markdown with
1396+footnotes enabled, while \f[C]markdown\-footnotes\-pipe_tables\f[] is
1397+pandoc\[aq]s markdown without footnotes or pipe tables.
1398+.SS Philosophy
1399+.PP
1400+Markdown is designed to be easy to write, and, even more importantly,
1401+easy to read:
1402+.RS
1403+.PP
1404+A Markdown\-formatted document should be publishable as\-is, as plain
1405+text, without looking like it\[aq]s been marked up with tags or
1406+formatting instructions.
1407+\-\- John Gruber
1408+.RE
1409+.PP
1410+This principle has guided pandoc\[aq]s decisions in finding syntax for
1411+tables, footnotes, and other extensions.
1412+.PP
1413+There is, however, one respect in which pandoc\[aq]s aims are different
1414+from the original aims of markdown.
1415+Whereas markdown was originally designed with HTML generation in mind,
1416+pandoc is designed for multiple output formats.
1417+Thus, while pandoc allows the embedding of raw HTML, it discourages it,
1418+and provides other, non\-HTMLish ways of representing important document
1419+elements like definition lists, tables, mathematics, and footnotes.
1420+.SS Paragraphs
1421+.PP
1422+A paragraph is one or more lines of text followed by one or more blank
1423+lines.
1424+Newlines are treated as spaces, so you can reflow your paragraphs as you
1425+like.
1426+If you need a hard line break, put two or more spaces at the end of a
1427+line.
1428+.SS Extension: \f[C]escaped_line_breaks\f[]
1429+.PP
1430+A backslash followed by a newline is also a hard line break.
1431+Note: in multiline and grid table cells, this is the only way to create
1432+a hard line break, since trailing spaces in the cells are ignored.
1433+.SS Headers
1434+.PP
1435+There are two kinds of headers, Setext and atx.
1436+.SS Setext\-style headers
1437+.PP
1438+A setext\-style header is a line of text "underlined" with a row of
1439+\f[C]=\f[] signs (for a level one header) or \f[C]\-\f[] signs (for a
1440+level two header):
1441+.IP
1442+.nf
1443+\f[C]
1444+A\ level\-one\ header
1445+==================
1446+
1447+A\ level\-two\ header
1448+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
1449+\f[]
1450+.fi
1451+.PP
1452+The header text can contain inline formatting, such as emphasis (see
1453+INLINE FORMATTING, below).
1454+.SS Atx\-style headers
1455+.PP
1456+An Atx\-style header consists of one to six \f[C]#\f[] signs and a line
1457+of text, optionally followed by any number of \f[C]#\f[] signs.
1458+The number of \f[C]#\f[] signs at the beginning of the line is the
1459+header level:
1460+.IP
1461+.nf
1462+\f[C]
1463+##\ A\ level\-two\ header
1464+
1465+###\ A\ level\-three\ header\ ###
1466+\f[]
1467+.fi
1468+.PP
1469+As with setext\-style headers, the header text can contain formatting:
1470+.IP
1471+.nf
1472+\f[C]
1473+#\ A\ level\-one\ header\ with\ a\ [link](/url)\ and\ *emphasis*
1474+\f[]
1475+.fi
1476+.SS Extension: \f[C]blank_before_header\f[]
1477+.PP
1478+Standard markdown syntax does not require a blank line before a header.
1479+Pandoc does require this (except, of course, at the beginning of the
1480+document).
1481+The reason for the requirement is that it is all too easy for a
1482+\f[C]#\f[] to end up at the beginning of a line by accident (perhaps
1483+through line wrapping).
1484+Consider, for example:
1485+.IP
1486+.nf
1487+\f[C]
1488+I\ like\ several\ of\ their\ flavors\ of\ ice\ cream:
1489+#22,\ for\ example,\ and\ #5.
1490+\f[]
1491+.fi
1492+.SS Header identifiers in HTML, LaTeX, and ConTeXt
1493+.SS Extension: \f[C]header_attributes\f[]
1494+.PP
1495+Headers can be assigned attributes using this syntax at the end of the
1496+line containing the header text:
1497+.IP
1498+.nf
1499+\f[C]
1500+{#identifier\ .class\ .class\ key=value\ key=value}
1501+\f[]
1502+.fi
1503+.PP
1504+Thus, for example, the following headers will all be assigned the
1505+identifier \f[C]foo\f[]:
1506+.IP
1507+.nf
1508+\f[C]
1509+#\ My\ header\ {#foo}
1510+
1511+##\ My\ header\ ##\ \ \ \ {#foo}
1512+
1513+My\ other\ header\ \ \ {#foo}
1514+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
1515+\f[]
1516+.fi
1517+.PP
1518+(This syntax is compatible with PHP Markdown Extra.)
1519+.PP
1520+Note that although this syntax allows assignment of classes and
1521+key/value attributes, writers generally don\[aq]t use all of this
1522+information.
1523+Identifiers, classes, and key/value attributes are used in HTML and
1524+HTML\-based formats such as EPUB and slidy.
1525+Identifiers are used for labels and link anchors in the LaTeX, ConTeXt,
1526+Textile, and AsciiDoc writers.
1527+.PP
1528+Headers with the class \f[C]unnumbered\f[] will not be numbered, even if
1529+\f[C]\-\-number\-sections\f[] is specified.
1530+A single hyphen (\f[C]\-\f[]) in an attribute context is equivalent to
1531+\f[C]\&.unnumbered\f[], and preferable in non\-English documents.
1532+So,
1533+.IP
1534+.nf
1535+\f[C]
1536+#\ My\ header\ {\-}
1537+\f[]
1538+.fi
1539+.PP
1540+is just the same as
1541+.IP
1542+.nf
1543+\f[C]
1544+#\ My\ header\ {.unnumbered}
1545+\f[]
1546+.fi
1547+.SS Extension: \f[C]auto_identifiers\f[]
1548+.PP
1549+A header without an explicitly specified identifier will be
1550+automatically assigned a unique identifier based on the header text.
1551+To derive the identifier from the header text,
1552+.IP \[bu] 2
1553+Remove all formatting, links, etc.
1554+.IP \[bu] 2
1555+Remove all footnotes.
1556+.IP \[bu] 2
1557+Remove all punctuation, except underscores, hyphens, and periods.
1558+.IP \[bu] 2
1559+Replace all spaces and newlines with hyphens.
1560+.IP \[bu] 2
1561+Convert all alphabetic characters to lowercase.
1562+.IP \[bu] 2
1563+Remove everything up to the first letter (identifiers may not begin with
1564+a number or punctuation mark).
1565+.IP \[bu] 2
1566+If nothing is left after this, use the identifier \f[C]section\f[].
1567+.PP
1568+Thus, for example,
1569+.PP
1570+.TS
1571+tab(@);
1572+l l.
1573+T{
1574+Header
1575+T}@T{
1576+Identifier
1577+T}
1578+_
1579+T{
1580+Header identifiers in HTML
1581+T}@T{
1582+\f[C]header\-identifiers\-in\-html\f[]
1583+T}
1584+T{
1585+\f[I]Dogs\f[]?\-\-in \f[I]my\f[] house?
1586+T}@T{
1587+\f[C]dogs\-\-in\-my\-house\f[]
1588+T}
1589+T{
1590+HTML, S5, or RTF?
1591+T}@T{
1592+\f[C]html\-s5\-or\-rtf\f[]
1593+T}
1594+T{
1595+3.
1596+Applications
1597+T}@T{
1598+\f[C]applications\f[]
1599+T}
1600+T{
1601+33
1602+T}@T{
1603+\f[C]section\f[]
1604+T}
1605+.TE
1606+.PP
1607+These rules should, in most cases, allow one to determine the identifier
1608+from the header text.
1609+The exception is when several headers have the same text; in this case,
1610+the first will get an identifier as described above; the second will get
1611+the same identifier with \f[C]\-1\f[] appended; the third with
1612+\f[C]\-2\f[]; and so on.
1613+.PP
1614+These identifiers are used to provide link targets in the table of
1615+contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
1616+option.
1617+They also make it easy to provide links from one section of a document
1618+to another.
1619+A link to this section, for example, might look like this:
1620+.IP
1621+.nf
1622+\f[C]
1623+See\ the\ section\ on
1624+[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
1625+\f[]
1626+.fi
1627+.PP
1628+Note, however, that this method of providing links to sections works
1629+only in HTML, LaTeX, and ConTeXt formats.
1630+.PP
1631+If the \f[C]\-\-section\-divs\f[] option is specified, then each section
1632+will be wrapped in a \f[C]div\f[] (or a \f[C]section\f[], if
1633+\f[C]\-\-html5\f[] was specified), and the identifier will be attached
1634+to the enclosing \f[C]<div>\f[] (or \f[C]<section>\f[]) tag rather than
1635+the header itself.
1636+This allows entire sections to be manipulated using javascript or
1637+treated differently in CSS.
1638+.SS Extension: \f[C]implicit_header_references\f[]
1639+.PP
1640+Pandoc behaves as if reference links have been defined for each header.
1641+So, instead of
1642+.IP
1643+.nf
1644+\f[C]
1645+[header\ identifiers](#header\-identifiers\-in\-html)
1646+\f[]
1647+.fi
1648+.PP
1649+you can simply write
1650+.IP
1651+.nf
1652+\f[C]
1653+[header\ identifiers]
1654+\f[]
1655+.fi
1656+.PP
1657+or
1658+.IP
1659+.nf
1660+\f[C]
1661+[header\ identifiers][]
1662+\f[]
1663+.fi
1664+.PP
1665+or
1666+.IP
1667+.nf
1668+\f[C]
1669+[the\ section\ on\ header\ identifiers][header\ identifiers]
1670+\f[]
1671+.fi
1672+.PP
1673+If there are multiple headers with identical text, the corresponding
1674+reference will link to the first one only, and you will need to use
1675+explicit links to link to the others, as described above.
1676+.PP
1677+Like regular reference links, these references are case\-insensitive.
1678+.PP
1679+Explicit link reference definitions always take priority over implicit
1680+header references.
1681+So, in the following example, the link will point to \f[C]bar\f[], not
1682+to \f[C]#foo\f[]:
1683+.IP
1684+.nf
1685+\f[C]
1686+#\ Foo
1687+
1688+[foo]:\ bar
1689+
1690+See\ [foo]
1691+\f[]
1692+.fi
1693+.SS Block quotations
1694+.PP
1695+Markdown uses email conventions for quoting blocks of text.
1696+A block quotation is one or more paragraphs or other block elements
1697+(such as lists or headers), with each line preceded by a \f[C]>\f[]
1698+character and a space.
1699+(The \f[C]>\f[] need not start at the left margin, but it should not be
1700+indented more than three spaces.)
1701+.IP
1702+.nf
1703+\f[C]
1704+>\ This\ is\ a\ block\ quote.\ This
1705+>\ paragraph\ has\ two\ lines.
1706+>
1707+>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote.
1708+>\ 2.\ Second\ item.
1709+\f[]
1710+.fi
1711+.PP
1712+A "lazy" form, which requires the \f[C]>\f[] character only on the first
1713+line of each block, is also allowed:
1714+.IP
1715+.nf
1716+\f[C]
1717+>\ This\ is\ a\ block\ quote.\ This
1718+paragraph\ has\ two\ lines.
1719+
1720+>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote.
1721+2.\ Second\ item.
1722+\f[]
1723+.fi
1724+.PP
1725+Among the block elements that can be contained in a block quote are
1726+other block quotes.
1727+That is, block quotes can be nested:
1728+.IP
1729+.nf
1730+\f[C]
1731+>\ This\ is\ a\ block\ quote.
1732+>
1733+>\ >\ A\ block\ quote\ within\ a\ block\ quote.
1734+\f[]
1735+.fi
1736+.SS Extension: \f[C]blank_before_blockquote\f[]
1737+.PP
1738+Standard markdown syntax does not require a blank line before a block
1739+quote.
1740+Pandoc does require this (except, of course, at the beginning of the
1741+document).
1742+The reason for the requirement is that it is all too easy for a
1743+\f[C]>\f[] to end up at the beginning of a line by accident (perhaps
1744+through line wrapping).
1745+So, unless the \f[C]markdown_strict\f[] format is used, the following
1746+does not produce a nested block quote in pandoc:
1747+.IP
1748+.nf
1749+\f[C]
1750+>\ This\ is\ a\ block\ quote.
1751+>>\ Nested.
1752+\f[]
1753+.fi
1754+.SS Verbatim (code) blocks
1755+.SS Indented code blocks
1756+.PP
1757+A block of text indented four spaces (or one tab) is treated as verbatim
1758+text: that is, special characters do not trigger special formatting, and
1759+all spaces and line breaks are preserved.
1760+For example,
1761+.IP
1762+.nf
1763+\f[C]
1764+\ \ \ \ if\ (a\ >\ 3)\ {
1765+\ \ \ \ \ \ moveShip(5\ *\ gravity,\ DOWN);
1766+\ \ \ \ }
1767+\f[]
1768+.fi
1769+.PP
1770+The initial (four space or one tab) indentation is not considered part
1771+of the verbatim text, and is removed in the output.
1772+.PP
1773+Note: blank lines in the verbatim text need not begin with four spaces.
1774+.SS Fenced code blocks
1775+.SS Extension: \f[C]fenced_code_blocks\f[]
1776+.PP
1777+In addition to standard indented code blocks, Pandoc supports
1778+\f[I]fenced\f[] code blocks.
1779+These begin with a row of three or more tildes (\f[C]~\f[]) and end with
1780+a row of tildes that must be at least as long as the starting row.
1781+Everything between these lines is treated as code.
1782+No indentation is necessary:
1783+.IP
1784+.nf
1785+\f[C]
1786+~~~~~~~
1787+if\ (a\ >\ 3)\ {
1788+\ \ moveShip(5\ *\ gravity,\ DOWN);
1789+}
1790+~~~~~~~
1791+\f[]
1792+.fi
1793+.PP
1794+Like regular code blocks, fenced code blocks must be separated from
1795+surrounding text by blank lines.
1796+.PP
1797+If the code itself contains a row of tildes or backticks, just use a
1798+longer row of tildes or backticks at the start and end:
1799+.IP
1800+.nf
1801+\f[C]
1802+~~~~~~~~~~~~~~~~
1803+~~~~~~~~~~
1804+code\ including\ tildes
1805+~~~~~~~~~~
1806+~~~~~~~~~~~~~~~~
1807+\f[]
1808+.fi
1809+.SS Extension: \f[C]backtick_code_blocks\f[]
1810+.PP
1811+Same as \f[C]fenced_code_blocks\f[], but uses backticks (\f[C]`\f[])
1812+instead of tildes (\f[C]~\f[]).
1813+.SS Extension: \f[C]fenced_code_attributes\f[]
1814+.PP
1815+Optionally, you may attach attributes to fenced or backtick code block
1816+using this syntax:
1817+.IP
1818+.nf
1819+\f[C]
1820+~~~~\ {#mycode\ .haskell\ .numberLines\ startFrom="100"}
1821+qsort\ []\ \ \ \ \ =\ []
1822+qsort\ (x:xs)\ =\ qsort\ (filter\ (<\ x)\ xs)\ ++\ [x]\ ++
1823+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ qsort\ (filter\ (>=\ x)\ xs)
1824+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1825+\f[]
1826+.fi
1827+.PP
1828+Here \f[C]mycode\f[] is an identifier, \f[C]haskell\f[] and
1829+\f[C]numberLines\f[] are classes, and \f[C]startFrom\f[] is an attribute
1830+with value \f[C]100\f[].
1831+Some output formats can use this information to do syntax highlighting.
1832+Currently, the only output formats that uses this information are HTML
1833+and LaTeX.
1834+If highlighting is supported for your output format and language, then
1835+the code block above will appear highlighted, with numbered lines.
1836+(To see which languages are supported, do \f[C]pandoc\ \-\-version\f[].)
1837+Otherwise, the code block above will appear as follows:
1838+.IP
1839+.nf
1840+\f[C]
1841+<pre\ id="mycode"\ class="haskell\ numberLines"\ startFrom="100">
1842+\ \ <code>
1843+\ \ ...
1844+\ \ </code>
1845+</pre>
1846+\f[]
1847+.fi
1848+.PP
1849+A shortcut form can also be used for specifying the language of the code
1850+block:
1851+.IP
1852+.nf
1853+\f[C]
1854+```haskell
1855+qsort\ []\ =\ []
1856+```
1857+\f[]
1858+.fi
1859+.PP
1860+This is equivalent to:
1861+.IP
1862+.nf
1863+\f[C]
1864+```\ {.haskell}
1865+qsort\ []\ =\ []
1866+```
1867+\f[]
1868+.fi
1869+.PP
1870+If the \f[C]fenced_code_attributes\f[] extension is disabled, but input
1871+contains class attribute(s) for the codeblock, the first class attribute
1872+will be printed after the opening fence as a bare word.
1873+.PP
1874+To prevent all highlighting, use the \f[C]\-\-no\-highlight\f[] flag.
1875+To set the highlighting style, use \f[C]\-\-highlight\-style\f[].
1876+For more information on highlighting, see SYNTAX HIGHLIGHTING, below.
1877+.SS Line blocks
1878+.SS Extension: \f[C]line_blocks\f[]
1879+.PP
1880+A line block is a sequence of lines beginning with a vertical bar
1881+(\f[C]|\f[]) followed by a space.
1882+The division into lines will be preserved in the output, as will any
1883+leading spaces; otherwise, the lines will be formatted as markdown.
1884+This is useful for verse and addresses:
1885+.IP
1886+.nf
1887+\f[C]
1888+|\ The\ limerick\ packs\ laughs\ anatomical
1889+|\ In\ space\ that\ is\ quite\ economical.
1890+|\ \ \ \ But\ the\ good\ ones\ I\[aq]ve\ seen
1891+|\ \ \ \ So\ seldom\ are\ clean
1892+|\ And\ the\ clean\ ones\ so\ seldom\ are\ comical
1893+
1894+|\ 200\ Main\ St.
1895+|\ Berkeley,\ CA\ 94718
1896+\f[]
1897+.fi
1898+.PP
1899+The lines can be hard\-wrapped if needed, but the continuation line must
1900+begin with a space.
1901+.IP
1902+.nf
1903+\f[C]
1904+|\ The\ Right\ Honorable\ Most\ Venerable\ and\ Righteous\ Samuel\ L.
1905+\ \ Constable,\ Jr.
1906+|\ 200\ Main\ St.
1907+|\ Berkeley,\ CA\ 94718
1908+\f[]
1909+.fi
1910+.PP
1911+This syntax is borrowed from reStructuredText.
1912+.SS Lists
1913+.SS Bullet lists
1914+.PP
1915+A bullet list is a list of bulleted list items.
1916+A bulleted list item begins with a bullet (\f[C]*\f[], \f[C]+\f[], or
1917+\f[C]\-\f[]).
1918+Here is a simple example:
1919+.IP
1920+.nf
1921+\f[C]
1922+*\ one
1923+*\ two
1924+*\ three
1925+\f[]
1926+.fi
1927+.PP
1928+This will produce a "compact" list.
1929+If you want a "loose" list, in which each item is formatted as a
1930+paragraph, put spaces between the items:
1931+.IP
1932+.nf
1933+\f[C]
1934+*\ one
1935+
1936+*\ two
1937+
1938+*\ three
1939+\f[]
1940+.fi
1941+.PP
1942+The bullets need not be flush with the left margin; they may be indented
1943+one, two, or three spaces.
1944+The bullet must be followed by whitespace.
1945+.PP
1946+List items look best if subsequent lines are flush with the first line
1947+(after the bullet):
1948+.IP
1949+.nf
1950+\f[C]
1951+*\ here\ is\ my\ first
1952+\ \ list\ item.
1953+*\ and\ my\ second.
1954+\f[]
1955+.fi
1956+.PP
1957+But markdown also allows a "lazy" format:
1958+.IP
1959+.nf
1960+\f[C]
1961+*\ here\ is\ my\ first
1962+list\ item.
1963+*\ and\ my\ second.
1964+\f[]
1965+.fi
1966+.SS The four\-space rule
1967+.PP
1968+A list item may contain multiple paragraphs and other block\-level
1969+content.
1970+However, subsequent paragraphs must be preceded by a blank line and
1971+indented four spaces or a tab.
1972+The list will look better if the first paragraph is aligned with the
1973+rest:
1974+.IP
1975+.nf
1976+\f[C]
1977+\ \ *\ First\ paragraph.
1978+
1979+\ \ \ \ Continued.
1980+
1981+\ \ *\ Second\ paragraph.\ With\ a\ code\ block,\ which\ must\ be\ indented
1982+\ \ \ \ eight\ spaces:
1983+
1984+\ \ \ \ \ \ \ \ {\ code\ }
1985+\f[]
1986+.fi
1987+.PP
1988+List items may include other lists.
1989+In this case the preceding blank line is optional.
1990+The nested list must be indented four spaces or one tab:
1991+.IP
1992+.nf
1993+\f[C]
1994+*\ fruits
1995+\ \ \ \ +\ apples
1996+\ \ \ \ \ \ \ \ \-\ macintosh
1997+\ \ \ \ \ \ \ \ \-\ red\ delicious
1998+\ \ \ \ +\ pears
1999+\ \ \ \ +\ peaches
2000+*\ vegetables
2001+\ \ \ \ +\ broccoli
2002+\ \ \ \ +\ chard
2003+\f[]
2004+.fi
2005+.PP
2006+As noted above, markdown allows you to write list items "lazily,"
2007+instead of indenting continuation lines.
2008+However, if there are multiple paragraphs or other blocks in a list
2009+item, the first line of each must be indented.
2010+.IP
2011+.nf
2012+\f[C]
2013++\ A\ lazy,\ lazy,\ list
2014+item.
2015+
2016++\ Another\ one;\ this\ looks
2017+bad\ but\ is\ legal.
2018+
2019+\ \ \ \ Second\ paragraph\ of\ second
2020+list\ item.
2021+\f[]
2022+.fi
2023+.PP
2024+\f[B]Note:\f[] Although the four\-space rule for continuation paragraphs
2025+comes from the official markdown syntax guide, the reference
2026+implementation, \f[C]Markdown.pl\f[], does not follow it.
2027+So pandoc will give different results than \f[C]Markdown.pl\f[] when
2028+authors have indented continuation paragraphs fewer than four spaces.
2029+.PP
2030+The markdown syntax guide is not explicit whether the four\-space rule
2031+applies to \f[I]all\f[] block\-level content in a list item; it only
2032+mentions paragraphs and code blocks.
2033+But it implies that the rule applies to all block\-level content
2034+(including nested lists), and pandoc interprets it that way.
2035+.SS Ordered lists
2036+.PP
2037+Ordered lists work just like bulleted lists, except that the items begin
2038+with enumerators rather than bullets.
2039+.PP
2040+In standard markdown, enumerators are decimal numbers followed by a
2041+period and a space.
2042+The numbers themselves are ignored, so there is no difference between
2043+this list:
2044+.IP
2045+.nf
2046+\f[C]
2047+1.\ \ one
2048+2.\ \ two
2049+3.\ \ three
2050+\f[]
2051+.fi
2052+.PP
2053+and this one:
2054+.IP
2055+.nf
2056+\f[C]
2057+5.\ \ one
2058+7.\ \ two
2059+1.\ \ three
2060+\f[]
2061+.fi
2062+.SS Extension: \f[C]fancy_lists\f[]
2063+.PP
2064+Unlike standard markdown, Pandoc allows ordered list items to be marked
2065+with uppercase and lowercase letters and roman numerals, in addition to
2066+arabic numerals.
2067+List markers may be enclosed in parentheses or followed by a single
2068+right\-parentheses or period.
2069+They must be separated from the text that follows by at least one space,
2070+and, if the list marker is a capital letter with a period, by at least
2071+two spaces.
2072+.PP
2073+The \f[C]fancy_lists\f[] extension also allows \[aq]\f[C]#\f[]\[aq] to
2074+be used as an ordered list marker in place of a numeral:
2075+.IP
2076+.nf
2077+\f[C]
2078+#.\ one
2079+#.\ two
2080+\f[]
2081+.fi
2082+.SS Extension: \f[C]startnum\f[]
2083+.PP
2084+Pandoc also pays attention to the type of list marker used, and to the
2085+starting number, and both of these are preserved where possible in the
2086+output format.
2087+Thus, the following yields a list with numbers followed by a single
2088+parenthesis, starting with 9, and a sublist with lowercase roman
2089+numerals:
2090+.IP
2091+.nf
2092+\f[C]
2093+\ 9)\ \ Ninth
2094+10)\ \ Tenth
2095+11)\ \ Eleventh
2096+\ \ \ \ \ \ \ i.\ subone
2097+\ \ \ \ \ \ ii.\ subtwo
2098+\ \ \ \ \ iii.\ subthree
2099+\f[]
2100+.fi
2101+.PP
2102+Pandoc will start a new list each time a different type of list marker
2103+is used.
2104+So, the following will create three lists:
2105+.IP
2106+.nf
2107+\f[C]
2108+(2)\ Two
2109+(5)\ Three
2110+1.\ \ Four
2111+*\ \ \ Five
2112+\f[]
2113+.fi
2114+.PP
2115+If default list markers are desired, use \f[C]#.\f[]:
2116+.IP
2117+.nf
2118+\f[C]
2119+#.\ \ one
2120+#.\ \ two
2121+#.\ \ three
2122+\f[]
2123+.fi
2124+.SS Definition lists
2125+.SS Extension: \f[C]definition_lists\f[]
2126+.PP
2127+Pandoc supports definition lists, using the syntax of PHP Markdown Extra
2128+with some extensions.
2129+.IP
2130+.nf
2131+\f[C]
2132+Term\ 1
2133+
2134+:\ \ \ Definition\ 1
2135+
2136+Term\ 2\ with\ *inline\ markup*
2137+
2138+:\ \ \ Definition\ 2
2139+
2140+\ \ \ \ \ \ \ \ {\ some\ code,\ part\ of\ Definition\ 2\ }
2141+
2142+\ \ \ \ Third\ paragraph\ of\ definition\ 2.
2143+\f[]
2144+.fi
2145+.PP
2146+Each term must fit on one line, which may optionally be followed by a
2147+blank line, and must be followed by one or more definitions.
2148+A definition begins with a colon or tilde, which may be indented one or
2149+two spaces.
2150+.PP
2151+A term may have multiple definitions, and each definition may consist of
2152+one or more block elements (paragraph, code block, list, etc.), each
2153+indented four spaces or one tab stop.
2154+The body of the definition (including the first line, aside from the
2155+colon or tilde) should be indented four spaces.
2156+However, as with other markdown lists, you can "lazily" omit indentation
2157+except at the beginning of a paragraph or other block element:
2158+.IP
2159+.nf
2160+\f[C]
2161+Term\ 1
2162+
2163+:\ \ \ Definition
2164+with\ lazy\ continuation.
2165+
2166+\ \ \ \ Second\ paragraph\ of\ the\ definition.
2167+\f[]
2168+.fi
2169+.PP
2170+If you leave space before the definition (as in the example above), the
2171+text of the definition will be treated as a paragraph.
2172+In some output formats, this will mean greater spacing between
2173+term/definition pairs.
2174+For a more compact definition list, omit the space before the
2175+definition:
2176+.IP
2177+.nf
2178+\f[C]
2179+Term\ 1
2180+\ \ ~\ Definition\ 1
2181+
2182+Term\ 2
2183+\ \ ~\ Definition\ 2a
2184+\ \ ~\ Definition\ 2b
2185+\f[]
2186+.fi
2187+.PP
2188+Note that space between items in a definition list is required.
2189+(A variant that loosens this requirement, but disallows "lazy" hard
2190+wrapping, can be activated with \f[C]compact_definition_lists\f[]: see
2191+NON\-PANDOC EXTENSIONS, below.)
2192+.SS Numbered example lists
2193+.SS Extension: \f[C]example_lists\f[]
2194+.PP
2195+The special list marker \f[C]\@\f[] can be used for sequentially
2196+numbered examples.
2197+The first list item with a \f[C]\@\f[] marker will be numbered
2198+\[aq]1\[aq], the next \[aq]2\[aq], and so on, throughout the document.
2199+The numbered examples need not occur in a single list; each new list
2200+using \f[C]\@\f[] will take up where the last stopped.
2201+So, for example:
2202+.IP
2203+.nf
2204+\f[C]
2205+(\@)\ \ My\ first\ example\ will\ be\ numbered\ (1).
2206+(\@)\ \ My\ second\ example\ will\ be\ numbered\ (2).
2207+
2208+Explanation\ of\ examples.
2209+
2210+(\@)\ \ My\ third\ example\ will\ be\ numbered\ (3).
2211+\f[]
2212+.fi
2213+.PP
2214+Numbered examples can be labeled and referred to elsewhere in the
2215+document:
2216+.IP
2217+.nf
2218+\f[C]
2219+(\@good)\ \ This\ is\ a\ good\ example.
2220+
2221+As\ (\@good)\ illustrates,\ ...
2222+\f[]
2223+.fi
2224+.PP
2225+The label can be any string of alphanumeric characters, underscores, or
2226+hyphens.
2227+.SS Compact and loose lists
2228+.PP
2229+Pandoc behaves differently from \f[C]Markdown.pl\f[] on some "edge
2230+cases" involving lists.
2231+Consider this source:
2232+.IP
2233+.nf
2234+\f[C]
2235++\ \ \ First
2236++\ \ \ Second:
2237+\ \ \ \ \-\ \ \ Fee
2238+\ \ \ \ \-\ \ \ Fie
2239+\ \ \ \ \-\ \ \ Foe
2240+
2241++\ \ \ Third
2242+\f[]
2243+.fi
2244+.PP
2245+Pandoc transforms this into a "compact list" (with no \f[C]<p>\f[] tags
2246+around "First", "Second", or "Third"), while markdown puts \f[C]<p>\f[]
2247+tags around "Second" and "Third" (but not "First"), because of the blank
2248+space around "Third".
2249+Pandoc follows a simple rule: if the text is followed by a blank line,
2250+it is treated as a paragraph.
2251+Since "Second" is followed by a list, and not a blank line, it isn\[aq]t
2252+treated as a paragraph.
2253+The fact that the list is followed by a blank line is irrelevant.
2254+(Note: Pandoc works this way even when the \f[C]markdown_strict\f[]
2255+format is specified.
2256+This behavior is consistent with the official markdown syntax
2257+description, even though it is different from that of
2258+\f[C]Markdown.pl\f[].)
2259+.SS Ending a list
2260+.PP
2261+What if you want to put an indented code block after a list?
2262+.IP
2263+.nf
2264+\f[C]
2265+\-\ \ \ item\ one
2266+\-\ \ \ item\ two
2267+
2268+\ \ \ \ {\ my\ code\ block\ }
2269+\f[]
2270+.fi
2271+.PP
2272+Trouble! Here pandoc (like other markdown implementations) will treat
2273+\f[C]{\ my\ code\ block\ }\f[] as the second paragraph of item two, and
2274+not as a code block.
2275+.PP
2276+To "cut off" the list after item two, you can insert some non\-indented
2277+content, like an HTML comment, which won\[aq]t produce visible output in
2278+any format:
2279+.IP
2280+.nf
2281+\f[C]
2282+\-\ \ \ item\ one
2283+\-\ \ \ item\ two
2284+
2285+<!\-\-\ end\ of\ list\ \-\->
2286+
2287+\ \ \ \ {\ my\ code\ block\ }
2288+\f[]
2289+.fi
2290+.PP
2291+You can use the same trick if you want two consecutive lists instead of
2292+one big list:
2293+.IP
2294+.nf
2295+\f[C]
2296+1.\ \ one
2297+2.\ \ two
2298+3.\ \ three
2299+
2300+<!\-\-\ \-\->
2301+
2302+1.\ \ uno
2303+2.\ \ dos
2304+3.\ \ tres
2305+\f[]
2306+.fi
2307+.SS Horizontal rules
2308+.PP
2309+A line containing a row of three or more \f[C]*\f[], \f[C]\-\f[], or
2310+\f[C]_\f[] characters (optionally separated by spaces) produces a
2311+horizontal rule:
2312+.IP
2313+.nf
2314+\f[C]
2315+*\ \ *\ \ *\ \ *
2316+
2317+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2318+\f[]
2319+.fi
2320+.SS Tables
2321+.PP
2322+Four kinds of tables may be used.
2323+The first three kinds presuppose the use of a fixed\-width font, such as
2324+Courier.
2325+The fourth kind can be used with proportionally spaced fonts, as it does
2326+not require lining up columns.
2327+.SS Extension: \f[C]table_captions\f[]
2328+.PP
2329+A caption may optionally be provided with all 4 kinds of tables (as
2330+illustrated in the examples below).
2331+A caption is a paragraph beginning with the string \f[C]Table:\f[] (or
2332+just \f[C]:\f[]), which will be stripped off.
2333+It may appear either before or after the table.
2334+.SS Extension: \f[C]simple_tables\f[]
2335+.PP
2336+Simple tables look like this:
2337+.IP
2338+.nf
2339+\f[C]
2340+\ \ Right\ \ \ \ \ Left\ \ \ \ \ Center\ \ \ \ \ Default
2341+\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
2342+\ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ 12
2343+\ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ 123
2344+\ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ 1
2345+
2346+Table:\ \ Demonstration\ of\ simple\ table\ syntax.
2347+\f[]
2348+.fi
2349+.PP
2350+The headers and table rows must each fit on one line.
2351+Column alignments are determined by the position of the header text
2352+relative to the dashed line below it:
2353+.IP \[bu] 2
2354+If the dashed line is flush with the header text on the right side but
2355+extends beyond it on the left, the column is right\-aligned.
2356+.IP \[bu] 2
2357+If the dashed line is flush with the header text on the left side but
2358+extends beyond it on the right, the column is left\-aligned.
2359+.IP \[bu] 2
2360+If the dashed line extends beyond the header text on both sides, the
2361+column is centered.
2362+.IP \[bu] 2
2363+If the dashed line is flush with the header text on both sides, the
2364+default alignment is used (in most cases, this will be left).
2365+.PP
2366+The table must end with a blank line, or a line of dashes followed by a
2367+blank line.
2368+.PP
2369+The column headers may be omitted, provided a dashed line is used to end
2370+the table.
2371+For example:
2372+.IP
2373+.nf
2374+\f[C]
2375+\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
2376+\ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ \ 12
2377+\ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ \ 123
2378+\ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1
2379+\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
2380+\f[]
2381+.fi
2382+.PP
2383+When headers are omitted, column alignments are determined on the basis
2384+of the first line of the table body.
2385+So, in the tables above, the columns would be right, left, center, and
2386+right aligned, respectively.
2387+.SS Extension: \f[C]multiline_tables\f[]
2388+.PP
2389+Multiline tables allow headers and table rows to span multiple lines of
2390+text (but cells that span multiple columns or rows of the table are not
2391+supported).
2392+Here is an example:
2393+.IP
2394+.nf
2395+\f[C]
2396+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2397+\ Centered\ \ \ Default\ \ \ \ \ \ \ \ \ \ \ Right\ Left
2398+\ \ Header\ \ \ \ Aligned\ \ \ \ \ \ \ \ \ Aligned\ Aligned
2399+\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2400+\ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that
2401+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines.
2402+
2403+\ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note
2404+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between
2405+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows.
2406+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2407+
2408+Table:\ Here\[aq]s\ the\ caption.\ It,\ too,\ may\ span
2409+multiple\ lines.
2410+\f[]
2411+.fi
2412+.PP
2413+These work like simple tables, but with the following differences:
2414+.IP \[bu] 2
2415+They must begin with a row of dashes, before the header text (unless the
2416+headers are omitted).
2417+.IP \[bu] 2
2418+They must end with a row of dashes, then a blank line.
2419+.IP \[bu] 2
2420+The rows must be separated by blank lines.
2421+.PP
2422+In multiline tables, the table parser pays attention to the widths of
2423+the columns, and the writers try to reproduce these relative widths in
2424+the output.
2425+So, if you find that one of the columns is too narrow in the output, try
2426+widening it in the markdown source.
2427+.PP
2428+Headers may be omitted in multiline tables as well as simple tables:
2429+.IP
2430+.nf
2431+\f[C]
2432+\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2433+\ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that
2434+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines.
2435+
2436+\ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note
2437+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between
2438+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows.
2439+\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2440+
2441+:\ Here\[aq]s\ a\ multiline\ table\ without\ headers.
2442+\f[]
2443+.fi
2444+.PP
2445+It is possible for a multiline table to have just one row, but the row
2446+should be followed by a blank line (and then the row of dashes that ends
2447+the table), or the table may be interpreted as a simple table.
2448+.SS Extension: \f[C]grid_tables\f[]
2449+.PP
2450+Grid tables look like this:
2451+.IP
2452+.nf
2453+\f[C]
2454+:\ Sample\ grid\ table.
2455+
2456++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
2457+|\ Fruit\ \ \ \ \ \ \ \ \ |\ Price\ \ \ \ \ \ \ \ \ |\ Advantages\ \ \ \ \ \ \ \ \ |
2458++===============+===============+====================+
2459+|\ Bananas\ \ \ \ \ \ \ |\ $1.34\ \ \ \ \ \ \ \ \ |\ \-\ built\-in\ wrapper\ |
2460+|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ bright\ color\ \ \ \ \ |
2461++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
2462+|\ Oranges\ \ \ \ \ \ \ |\ $2.10\ \ \ \ \ \ \ \ \ |\ \-\ cures\ scurvy\ \ \ \ \ |
2463+|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ tasty\ \ \ \ \ \ \ \ \ \ \ \ |
2464++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
2465+\f[]
2466+.fi
2467+.PP
2468+The row of \f[C]=\f[]s separates the header from the table body, and can
2469+be omitted for a headerless table.
2470+The cells of grid tables may contain arbitrary block elements (multiple
2471+paragraphs, code blocks, lists, etc.).
2472+Alignments are not supported, nor are cells that span multiple columns
2473+or rows.
2474+Grid tables can be created easily using Emacs table mode.
2475+.SS Extension: \f[C]pipe_tables\f[]
2476+.PP
2477+Pipe tables look like this:
2478+.IP
2479+.nf
2480+\f[C]
2481+|\ Right\ |\ Left\ |\ Default\ |\ Center\ |
2482+|\-\-\-\-\-\-:|:\-\-\-\-\-|\-\-\-\-\-\-\-\-\-|:\-\-\-\-\-\-:|
2483+|\ \ \ 12\ \ |\ \ 12\ \ |\ \ \ \ 12\ \ \ |\ \ \ \ 12\ \ |
2484+|\ \ 123\ \ |\ \ 123\ |\ \ \ 123\ \ \ |\ \ \ 123\ \ |
2485+|\ \ \ \ 1\ \ |\ \ \ \ 1\ |\ \ \ \ \ 1\ \ \ |\ \ \ \ \ 1\ \ |
2486+
2487+\ \ :\ Demonstration\ of\ pipe\ table\ syntax.
2488+\f[]
2489+.fi
2490+.PP
2491+The syntax is the same as in PHP markdown extra.
2492+The beginning and ending pipe characters are optional, but pipes are
2493+required between all columns.
2494+The colons indicate column alignment as shown.
2495+The header cannot be omitted.
2496+To simulate a headerless table, include a header with blank cells.
2497+.PP
2498+Since the pipes indicate column boundaries, columns need not be
2499+vertically aligned, as they are in the above example.
2500+So, this is a perfectly legal (though ugly) pipe table:
2501+.IP
2502+.nf
2503+\f[C]
2504+fruit|\ price
2505+\-\-\-\-\-|\-\-\-\-\-:
2506+apple|2.05
2507+pear|1.37
2508+orange|3.09
2509+\f[]
2510+.fi
2511+.PP
2512+The cells of pipe tables cannot contain block elements like paragraphs
2513+and lists, and cannot span multiple lines.
2514+Note also that in LaTeX/PDF output, the cells produced by pipe tables
2515+will not wrap, since there is no information available about relative
2516+widths.
2517+If you want content to wrap within cells, use multiline or grid tables.
2518+.PP
2519+Note: Pandoc also recognizes pipe tables of the following form, as can
2520+be produced by Emacs\[aq] orgtbl\-mode:
2521+.IP
2522+.nf
2523+\f[C]
2524+|\ One\ |\ Two\ \ \ |
2525+|\-\-\-\-\-+\-\-\-\-\-\-\-|
2526+|\ my\ \ |\ table\ |
2527+|\ is\ \ |\ nice\ \ |
2528+\f[]
2529+.fi
2530+.PP
2531+The difference is that \f[C]+\f[] is used instead of \f[C]|\f[].
2532+Other orgtbl features are not supported.
2533+In particular, to get non\-default column alignment, you\[aq]ll need to
2534+add colons as above.
2535+.SS Metadata blocks
2536+.SS Extension: \f[C]pandoc_title_block\f[]
2537+.PP
2538+If the file begins with a title block
2539+.IP
2540+.nf
2541+\f[C]
2542+%\ title
2543+%\ author(s)\ (separated\ by\ semicolons)
2544+%\ date
2545+\f[]
2546+.fi
2547+.PP
2548+it will be parsed as bibliographic information, not regular text.
2549+(It will be used, for example, in the title of standalone LaTeX or HTML
2550+output.) The block may contain just a title, a title and an author, or
2551+all three elements.
2552+If you want to include an author but no title, or a title and a date but
2553+no author, you need a blank line:
2554+.IP
2555+.nf
2556+\f[C]
2557+%
2558+%\ Author
2559+
2560+%\ My\ title
2561+%
2562+%\ June\ 15,\ 2006
2563+\f[]
2564+.fi
2565+.PP
2566+The title may occupy multiple lines, but continuation lines must begin
2567+with leading space, thus:
2568+.IP
2569+.nf
2570+\f[C]
2571+%\ My\ title
2572+\ \ on\ multiple\ lines
2573+\f[]
2574+.fi
2575+.PP
2576+If a document has multiple authors, the authors may be put on separate
2577+lines with leading space, or separated by semicolons, or both.
2578+So, all of the following are equivalent:
2579+.IP
2580+.nf
2581+\f[C]
2582+%\ Author\ One
2583+\ \ Author\ Two
2584+
2585+%\ Author\ One;\ Author\ Two
2586+
2587+%\ Author\ One;
2588+\ \ Author\ Two
2589+\f[]
2590+.fi
2591+.PP
2592+The date must fit on one line.
2593+.PP
2594+All three metadata fields may contain standard inline formatting
2595+(italics, links, footnotes, etc.).
2596+.PP
2597+Title blocks will always be parsed, but they will affect the output only
2598+when the \f[C]\-\-standalone\f[] (\f[C]\-s\f[]) option is chosen.
2599+In HTML output, titles will appear twice: once in the document head \-\-
2600+this is the title that will appear at the top of the window in a browser
2601+\-\- and once at the beginning of the document body.
2602+The title in the document head can have an optional prefix attached
2603+(\f[C]\-\-title\-prefix\f[] or \f[C]\-T\f[] option).
2604+The title in the body appears as an H1 element with class "title", so it
2605+can be suppressed or reformatted with CSS.
2606+If a title prefix is specified with \f[C]\-T\f[] and no title block
2607+appears in the document, the title prefix will be used by itself as the
2608+HTML title.
2609+.PP
2610+The man page writer extracts a title, man page section number, and other
2611+header and footer information from the title line.
2612+The title is assumed to be the first word on the title line, which may
2613+optionally end with a (single\-digit) section number in parentheses.
2614+(There should be no space between the title and the parentheses.)
2615+Anything after this is assumed to be additional footer and header text.
2616+A single pipe character (\f[C]|\f[]) should be used to separate the
2617+footer text from the header text.
2618+Thus,
2619+.IP
2620+.nf
2621+\f[C]
2622+%\ PANDOC(1)
2623+\f[]
2624+.fi
2625+.PP
2626+will yield a man page with the title \f[C]PANDOC\f[] and section 1.
2627+.IP
2628+.nf
2629+\f[C]
2630+%\ PANDOC(1)\ Pandoc\ User\ Manuals
2631+\f[]
2632+.fi
2633+.PP
2634+will also have "Pandoc User Manuals" in the footer.
2635+.IP
2636+.nf
2637+\f[C]
2638+%\ PANDOC(1)\ Pandoc\ User\ Manuals\ |\ Version\ 4.0
2639+\f[]
2640+.fi
2641+.PP
2642+will also have "Version 4.0" in the header.
2643+.SS Extension: \f[C]yaml_metadata_block\f[]
2644+.PP
2645+A YAML metadata block is a valid YAML object, delimited by a line of
2646+three hyphens (\f[C]\-\-\-\f[]) at the top and a line of three hyphens
2647+(\f[C]\-\-\-\f[]) or three dots (\f[C]\&...\f[]) at the bottom.
2648+A YAML metadata block may occur anywhere in the document, but if it is
2649+not at the beginning, it must be preceded by a blank line.
2650+(Note that, because of the way pandoc concatenates input files when
2651+several are provided, you may also keep the metadata in a separate YAML
2652+file and pass it to pandoc as an argument, along with your markdown
2653+files:
2654+.IP
2655+.nf
2656+\f[C]
2657+pandoc\ chap1.md\ chap2.md\ chap3.md\ metadata.yaml\ \-s\ \-o\ book.html
2658+\f[]
2659+.fi
2660+.PP
2661+Just be sure that the YAML file begins with \f[C]\-\-\-\f[] and ends
2662+with \f[C]\-\-\-\f[] or \f[C]\&...\f[].)
2663+.PP
2664+Metadata will be taken from the fields of the YAML object and added to
2665+any existing document metadata.
2666+Metadata can contain lists and objects (nested arbitrarily), but all
2667+string scalars will be interpreted as markdown.
2668+Fields with names ending in an underscore will be ignored by pandoc.
2669+(They may be given a role by external processors.)
2670+.PP
2671+A document may contain multiple metadata blocks.
2672+The metadata fields will be combined through a \f[I]left\-biased
2673+union\f[]: if two metadata blocks attempt to set the same field, the
2674+value from the first block will be taken.
2675+.PP
2676+When pandoc is used with \f[C]\-t\ markdown\f[] to create a markdown
2677+document, a YAML metadata block will be produced only if the
2678+\f[C]\-s/\-\-standalone\f[] option is used.
2679+All of the metadata will appear in a single block at the beginning of
2680+the document.
2681+.PP
2682+Note that YAML escaping rules must be followed.
2683+Thus, for example, if a title contains a colon, it must be quoted.
2684+The pipe character (\f[C]|\f[]) can be used to begin an indented block
2685+that will be interpreted literally, without need for escaping.
2686+This form is necessary when the field contains blank lines:
2687+.IP
2688+.nf
2689+\f[C]
2690+\-\-\-
2691+title:\ \ \[aq]This\ is\ the\ title:\ it\ contains\ a\ colon\[aq]
2692+author:
2693+\-\ name:\ Author\ One
2694+\ \ affiliation:\ University\ of\ Somewhere
2695+\-\ name:\ Author\ Two
2696+\ \ affiliation:\ University\ of\ Nowhere
2697+tags:\ [nothing,\ nothingness]
2698+abstract:\ |
2699+\ \ This\ is\ the\ abstract.
2700+
2701+\ \ It\ consists\ of\ two\ paragraphs.
2702+\&...
2703+\f[]
2704+.fi
2705+.PP
2706+Template variables will be set automatically from the metadata.
2707+Thus, for example, in writing HTML, the variable \f[C]abstract\f[] will
2708+be set to the HTML equivalent of the markdown in the \f[C]abstract\f[]
2709+field:
2710+.IP
2711+.nf
2712+\f[C]
2713+<p>This\ is\ the\ abstract.</p>
2714+<p>It\ consists\ of\ two\ paragraphs.</p>
2715+\f[]
2716+.fi
2717+.PP
2718+Note: The \f[C]author\f[] variable in the default templates expects a
2719+simple list or string.
2720+To use the structured authors in the example, you would need a custom
2721+template.
2722+For example:
2723+.IP
2724+.nf
2725+\f[C]
2726+$for(author)$
2727+$if(author.name)$
2728+$author.name$$if(author.affiliation)$\ ($author.affiliation$)$endif$
2729+$else$
2730+$author$
2731+$endif$
2732+$endfor$
2733+\f[]
2734+.fi
2735+.SS Backslash escapes
2736+.SS Extension: \f[C]all_symbols_escapable\f[]
2737+.PP
2738+Except inside a code block or inline code, any punctuation or space
2739+character preceded by a backslash will be treated literally, even if it
2740+would normally indicate formatting.
2741+Thus, for example, if one writes
2742+.IP
2743+.nf
2744+\f[C]
2745+*\\*hello\\**
2746+\f[]
2747+.fi
2748+.PP
2749+one will get
2750+.IP
2751+.nf
2752+\f[C]
2753+<em>*hello*</em>
2754+\f[]
2755+.fi
2756+.PP
2757+instead of
2758+.IP
2759+.nf
2760+\f[C]
2761+<strong>hello</strong>
2762+\f[]
2763+.fi
2764+.PP
2765+This rule is easier to remember than standard markdown\[aq]s rule, which
2766+allows only the following characters to be backslash\-escaped:
2767+.IP
2768+.nf
2769+\f[C]
2770+\\`*_{}[]()>#+\-.!
2771+\f[]
2772+.fi
2773+.PP
2774+(However, if the \f[C]markdown_strict\f[] format is used, the standard
2775+markdown rule will be used.)
2776+.PP
2777+A backslash\-escaped space is parsed as a nonbreaking space.
2778+It will appear in TeX output as \f[C]~\f[] and in HTML and XML as
2779+\f[C]\\&#160;\f[] or \f[C]\\&nbsp;\f[].
2780+.PP
2781+A backslash\-escaped newline (i.e.
2782+a backslash occurring at the end of a line) is parsed as a hard line
2783+break.
2784+It will appear in TeX output as \f[C]\\\\\f[] and in HTML as
2785+\f[C]<br\ />\f[].
2786+This is a nice alternative to markdown\[aq]s "invisible" way of
2787+indicating hard line breaks using two trailing spaces on a line.
2788+.PP
2789+Backslash escapes do not work in verbatim contexts.
2790+.SS Smart punctuation
2791+.SS Extension
2792+.PP
2793+If the \f[C]\-\-smart\f[] option is specified, pandoc will produce
2794+typographically correct output, converting straight quotes to curly
2795+quotes, \f[C]\-\-\-\f[] to em\-dashes, \f[C]\-\-\f[] to en\-dashes, and
2796+\f[C]\&...\f[] to ellipses.
2797+Nonbreaking spaces are inserted after certain abbreviations, such as
2798+"Mr."
2799+.PP
2800+Note: if your LaTeX template uses the \f[C]csquotes\f[] package, pandoc
2801+will detect automatically this and use \f[C]\\enquote{...}\f[] for
2802+quoted text.
2803+.SS Inline formatting
2804+.SS Emphasis
2805+.PP
2806+To \f[I]emphasize\f[] some text, surround it with \f[C]*\f[]s or
2807+\f[C]_\f[], like this:
2808+.IP
2809+.nf
2810+\f[C]
2811+This\ text\ is\ _emphasized\ with\ underscores_,\ and\ this
2812+is\ *emphasized\ with\ asterisks*.
2813+\f[]
2814+.fi
2815+.PP
2816+Double \f[C]*\f[] or \f[C]_\f[] produces \f[B]strong emphasis\f[]:
2817+.IP
2818+.nf
2819+\f[C]
2820+This\ is\ **strong\ emphasis**\ and\ __with\ underscores__.
2821+\f[]
2822+.fi
2823+.PP
2824+A \f[C]*\f[] or \f[C]_\f[] character surrounded by spaces, or
2825+backslash\-escaped, will not trigger emphasis:
2826+.IP
2827+.nf
2828+\f[C]
2829+This\ is\ *\ not\ emphasized\ *,\ and\ \\*neither\ is\ this\\*.
2830+\f[]
2831+.fi
2832+.SS Extension: \f[C]intraword_underscores\f[]
2833+.PP
2834+Because \f[C]_\f[] is sometimes used inside words and identifiers,
2835+pandoc does not interpret a \f[C]_\f[] surrounded by alphanumeric
2836+characters as an emphasis marker.
2837+If you want to emphasize just part of a word, use \f[C]*\f[]:
2838+.IP
2839+.nf
2840+\f[C]
2841+feas*ible*,\ not\ feas*able*.
2842+\f[]
2843+.fi
2844+.SS Strikeout
2845+.SS Extension: \f[C]strikeout\f[]
2846+.PP
2847+To strikeout a section of text with a horizontal line, begin and end it
2848+with \f[C]~~\f[].
2849+Thus, for example,
2850+.IP
2851+.nf
2852+\f[C]
2853+This\ ~~is\ deleted\ text.~~
2854+\f[]
2855+.fi
2856+.SS Superscripts and subscripts
2857+.SS Extension: \f[C]superscript\f[], \f[C]subscript\f[]
2858+.PP
2859+Superscripts may be written by surrounding the superscripted text by
2860+\f[C]^\f[] characters; subscripts may be written by surrounding the
2861+subscripted text by \f[C]~\f[] characters.
2862+Thus, for example,
2863+.IP
2864+.nf
2865+\f[C]
2866+H~2~O\ is\ a\ liquid.\ \ 2^10^\ is\ 1024.
2867+\f[]
2868+.fi
2869+.PP
2870+If the superscripted or subscripted text contains spaces, these spaces
2871+must be escaped with backslashes.
2872+(This is to prevent accidental superscripting and subscripting through
2873+the ordinary use of \f[C]~\f[] and \f[C]^\f[].) Thus, if you want the
2874+letter P with \[aq]a cat\[aq] in subscripts, use \f[C]P~a\\\ cat~\f[],
2875+not \f[C]P~a\ cat~\f[].
2876+.SS Verbatim
2877+.PP
2878+To make a short span of text verbatim, put it inside backticks:
2879+.IP
2880+.nf
2881+\f[C]
2882+What\ is\ the\ difference\ between\ `>>=`\ and\ `>>`?
2883+\f[]
2884+.fi
2885+.PP
2886+If the verbatim text includes a backtick, use double backticks:
2887+.IP
2888+.nf
2889+\f[C]
2890+Here\ is\ a\ literal\ backtick\ ``\ `\ ``.
2891+\f[]
2892+.fi
2893+.PP
2894+(The spaces after the opening backticks and before the closing backticks
2895+will be ignored.)
2896+.PP
2897+The general rule is that a verbatim span starts with a string of
2898+consecutive backticks (optionally followed by a space) and ends with a
2899+string of the same number of backticks (optionally preceded by a space).
2900+.PP
2901+Note that backslash\-escapes (and other markdown constructs) do not work
2902+in verbatim contexts:
2903+.IP
2904+.nf
2905+\f[C]
2906+This\ is\ a\ backslash\ followed\ by\ an\ asterisk:\ `\\*`.
2907+\f[]
2908+.fi
2909+.SS Extension: \f[C]inline_code_attributes\f[]
2910+.PP
2911+Attributes can be attached to verbatim text, just as with FENCED CODE
2912+BLOCKS:
2913+.IP
2914+.nf
2915+\f[C]
2916+`<$>`{.haskell}
2917+\f[]
2918+.fi
2919+.SS Small caps
2920+.PP
2921+To write small caps, you can use an HTML span tag:
2922+.IP
2923+.nf
2924+\f[C]
2925+<span\ style="font\-variant:small\-caps;">Small\ caps</span>
2926+\f[]
2927+.fi
2928+.PP
2929+(The semicolon is optional and there may be space after the colon.) This
2930+will work in all output formats that support small caps.
2931+.SS Math
2932+.SS Extension: \f[C]tex_math_dollars\f[]
2933+.PP
2934+Anything between two \f[C]$\f[] characters will be treated as TeX math.
2935+The opening \f[C]$\f[] must have a non\-space character immediately to
2936+its right, while the closing \f[C]$\f[] must have a non\-space character
2937+immediately to its left, and must not be followed immediately by a
2938+digit.
2939+Thus, \f[C]$20,000\ and\ $30,000\f[] won\[aq]t parse as math.
2940+If for some reason you need to enclose text in literal \f[C]$\f[]
2941+characters, backslash\-escape them and they won\[aq]t be treated as math
2942+delimiters.
2943+.PP
2944+TeX math will be printed in all output formats.
2945+How it is rendered depends on the output format:
2946+.TP
2947+.B Markdown, LaTeX, Org\-Mode, ConTeXt
2948+It will appear verbatim between \f[C]$\f[] characters.
2949+.RS
2950+.RE
2951+.TP
2952+.B reStructuredText
2953+It will be rendered using an interpreted text role \f[C]:math:\f[], as
2954+described here
2955+.RS
2956+.RE
2957+.TP
2958+.B AsciiDoc
2959+It will be rendered as \f[C]latexmath:[...]\f[].
2960+.RS
2961+.RE
2962+.TP
2963+.B Texinfo
2964+It will be rendered inside a \f[C]\@math\f[] command.
2965+.RS
2966+.RE
2967+.TP
2968+.B groff man
2969+It will be rendered verbatim without \f[C]$\f[]\[aq]s.
2970+.RS
2971+.RE
2972+.TP
2973+.B MediaWiki, DokuWiki
2974+It will be rendered inside \f[C]<math>\f[] tags.
2975+.RS
2976+.RE
2977+.TP
2978+.B Textile
2979+It will be rendered inside \f[C]<span\ class="math">\f[] tags.
2980+.RS
2981+.RE
2982+.TP
2983+.B RTF, OpenDocument, ODT
2984+It will be rendered, if possible, using unicode characters, and will
2985+otherwise appear verbatim.
2986+.RS
2987+.RE
2988+.TP
2989+.B Docbook
2990+If the \f[C]\-\-mathml\f[] flag is used, it will be rendered using
2991+mathml in an \f[C]inlineequation\f[] or \f[C]informalequation\f[] tag.
2992+Otherwise it will be rendered, if possible, using unicode characters.
2993+.RS
2994+.RE
2995+.TP
2996+.B Docx
2997+It will be rendered using OMML math markup.
2998+.RS
2999+.RE
3000+.TP
3001+.B FictionBook2
3002+If the \f[C]\-\-webtex\f[] option is used, formulas are rendered as
3003+images using Google Charts or other compatible web service, downloaded
3004+and embedded in the e\-book.
3005+Otherwise, they will appear verbatim.
3006+.RS
3007+.RE
3008+.TP
3009+.B HTML, Slidy, DZSlides, S5, EPUB
3010+The way math is rendered in HTML will depend on the command\-line
3011+options selected:
3012+.RS
3013+.IP "1." 3
3014+The default is to render TeX math as far as possible using unicode
3015+characters, as with RTF, DocBook, and OpenDocument output.
3016+Formulas are put inside a \f[C]span\f[] with \f[C]class="math"\f[], so
3017+that they may be styled differently from the surrounding text if needed.
3018+.IP "2." 3
3019+If the \f[C]\-\-latexmathml\f[] option is used, TeX math will be
3020+displayed between \f[C]$\f[] or \f[C]$$\f[] characters and put in
3021+\f[C]<span>\f[] tags with class \f[C]LaTeX\f[].
3022+The LaTeXMathML script will be used to render it as formulas.
3023+(This trick does not work in all browsers, but it works in Firefox.
3024+In browsers that do not support LaTeXMathML, TeX math will appear
3025+verbatim between \f[C]$\f[] characters.)
3026+.IP "3." 3
3027+If the \f[C]\-\-jsmath\f[] option is used, TeX math will be put inside
3028+\f[C]<span>\f[] tags (for inline math) or \f[C]<div>\f[] tags (for
3029+display math) with class \f[C]math\f[].
3030+The jsMath script will be used to render it.
3031+.IP "4." 3
3032+If the \f[C]\-\-mimetex\f[] option is used, the mimeTeX CGI script will
3033+be called to generate images for each TeX formula.
3034+This should work in all browsers.
3035+The \f[C]\-\-mimetex\f[] option takes an optional URL as argument.
3036+If no URL is specified, it will be assumed that the mimeTeX CGI script
3037+is at \f[C]/cgi\-bin/mimetex.cgi\f[].
3038+.IP "5." 3
3039+If the \f[C]\-\-gladtex\f[] option is used, TeX formulas will be
3040+enclosed in \f[C]<eq>\f[] tags in the HTML output.
3041+The resulting \f[C]htex\f[] file may then be processed by gladTeX, which
3042+will produce image files for each formula and an \f[C]html\f[] file with
3043+links to these images.
3044+So, the procedure is:
3045+.RS 4
3046+.IP
3047+.nf
3048+\f[C]
3049+pandoc\ \-s\ \-\-gladtex\ myfile.txt\ \-o\ myfile.htex
3050+gladtex\ \-d\ myfile\-images\ myfile.htex
3051+#\ produces\ myfile.html\ and\ images\ in\ myfile\-images
3052+\f[]
3053+.fi
3054+.RE
3055+.IP "6." 3
3056+If the \f[C]\-\-webtex\f[] option is used, TeX formulas will be
3057+converted to \f[C]<img>\f[] tags that link to an external script that
3058+converts formulas to images.
3059+The formula will be URL\-encoded and concatenated with the URL provided.
3060+If no URL is specified, the Google Chart API will be used
3061+(\f[C]http://chart.apis.google.com/chart?cht=tx&chl=\f[]).
3062+.IP "7." 3
3063+If the \f[C]\-\-mathjax\f[] option is used, TeX math will be displayed
3064+between \f[C]\\(...\\)\f[] (for inline math) or \f[C]\\[...\\]\f[] (for
3065+display math) and put in \f[C]<span>\f[] tags with class \f[C]math\f[].
3066+The MathJax script will be used to render it as formulas.
3067+.RE
3068+.SS Raw HTML
3069+.SS Extension: \f[C]raw_html\f[]
3070+.PP
3071+Markdown allows you to insert raw HTML (or DocBook) anywhere in a
3072+document (except verbatim contexts, where \f[C]<\f[], \f[C]>\f[], and
3073+\f[C]&\f[] are interpreted literally).
3074+(Technically this is not an extension, since standard markdown allows
3075+it, but it has been made an extension so that it can be disabled if
3076+desired.)
3077+.PP
3078+The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
3079+DZSlides, EPUB, Markdown, and Textile output, and suppressed in other
3080+formats.
3081+.SS Extension: \f[C]markdown_in_html_blocks\f[]
3082+.PP
3083+Standard markdown allows you to include HTML "blocks": blocks of HTML
3084+between balanced tags that are separated from the surrounding text with
3085+blank lines, and start and end at the left margin.
3086+Within these blocks, everything is interpreted as HTML, not markdown; so
3087+(for example), \f[C]*\f[] does not signify emphasis.
3088+.PP
3089+Pandoc behaves this way when the \f[C]markdown_strict\f[] format is
3090+used; but by default, pandoc interprets material between HTML block tags
3091+as markdown.
3092+Thus, for example, Pandoc will turn
3093+.IP
3094+.nf
3095+\f[C]
3096+<table>
3097+<tr>
3098+<td>*one*</td>
3099+<td>[a\ link](http://google.com)</td>
3100+</tr>
3101+</table>
3102+\f[]
3103+.fi
3104+.PP
3105+into
3106+.IP
3107+.nf
3108+\f[C]
3109+<table>
3110+<tr>
3111+<td><em>one</em></td>
3112+<td><a\ href="http://google.com">a\ link</a></td>
3113+</tr>
3114+</table>
3115+\f[]
3116+.fi
3117+.PP
3118+whereas \f[C]Markdown.pl\f[] will preserve it as is.
3119+.PP
3120+There is one exception to this rule: text between \f[C]<script>\f[] and
3121+\f[C]<style>\f[] tags is not interpreted as markdown.
3122+.PP
3123+This departure from standard markdown should make it easier to mix
3124+markdown with HTML block elements.
3125+For example, one can surround a block of markdown text with
3126+\f[C]<div>\f[] tags without preventing it from being interpreted as
3127+markdown.
3128+.SS Extension: \f[C]native_divs\f[]
3129+.PP
3130+Use native pandoc \f[C]Div\f[] blocks for content inside \f[C]<div>\f[]
3131+tags.
3132+For the most part this should give the same output as
3133+\f[C]markdown_in_html_blocks\f[], but it makes it easier to write pandoc
3134+filters to manipulate groups of blocks.
3135+.SS Extension: \f[C]native_spans\f[]
3136+.PP
3137+Use native pandoc \f[C]Span\f[] blocks for content inside
3138+\f[C]<span>\f[] tags.
3139+For the most part this should give the same output as \f[C]raw_html\f[],
3140+but it makes it easier to write pandoc filters to manipulate groups of
3141+inlines.
3142+.SS Raw TeX
3143+.SS Extension: \f[C]raw_tex\f[]
3144+.PP
3145+In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
3146+included in a document.
3147+Inline TeX commands will be preserved and passed unchanged to the LaTeX
3148+and ConTeXt writers.
3149+Thus, for example, you can use LaTeX to include BibTeX citations:
3150+.IP
3151+.nf
3152+\f[C]
3153+This\ result\ was\ proved\ in\ \\cite{jones.1967}.
3154+\f[]
3155+.fi
3156+.PP
3157+Note that in LaTeX environments, like
3158+.IP
3159+.nf
3160+\f[C]
3161+\\begin{tabular}{|l|l|}\\hline
3162+Age\ &\ Frequency\ \\\\\ \\hline
3163+18\-\-25\ \ &\ 15\ \\\\
3164+26\-\-35\ \ &\ 33\ \\\\
3165+36\-\-45\ \ &\ 22\ \\\\\ \\hline
3166+\\end{tabular}
3167+\f[]
3168+.fi
3169+.PP
3170+the material between the begin and end tags will be interpreted as raw
3171+LaTeX, not as markdown.
3172+.PP
3173+Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
3174+and ConTeXt.
3175+.SS LaTeX macros
3176+.SS Extension: \f[C]latex_macros\f[]
3177+.PP
3178+For output formats other than LaTeX, pandoc will parse LaTeX
3179+\f[C]\\newcommand\f[] and \f[C]\\renewcommand\f[] definitions and apply
3180+the resulting macros to all LaTeX math.
3181+So, for example, the following will work in all output formats, not just
3182+LaTeX:
3183+.PP
3184+⟨\f[I]a\f[], \f[I]b\f[], \f[I]c\f[]⟩
3185+.PP
3186+In LaTeX output, the \f[C]\\newcommand\f[] definition will simply be
3187+passed unchanged to the output.
3188+.SS Links
3189+.PP
3190+Markdown allows links to be specified in several ways.
3191+.SS Automatic links
3192+.PP
3193+If you enclose a URL or email address in pointy brackets, it will become
3194+a link:
3195+.IP
3196+.nf
3197+\f[C]
3198+<http://google.com>
3199+<sam\@green.eggs.ham>
3200+\f[]
3201+.fi
3202+.SS Inline links
3203+.PP
3204+An inline link consists of the link text in square brackets, followed by
3205+the URL in parentheses.
3206+(Optionally, the URL can be followed by a link title, in quotes.)
3207+.IP
3208+.nf
3209+\f[C]
3210+This\ is\ an\ [inline\ link](/url),\ and\ here\[aq]s\ [one\ with
3211+a\ title](http://fsf.org\ "click\ here\ for\ a\ good\ time!").
3212+\f[]
3213+.fi
3214+.PP
3215+There can be no space between the bracketed part and the parenthesized
3216+part.
3217+The link text can contain formatting (such as emphasis), but the title
3218+cannot.
3219+.PP
3220+Email addresses in inline links are not autodetected, so they have to be
3221+prefixed with \f[C]mailto\f[]:
3222+.IP
3223+.nf
3224+\f[C]
3225+[Write\ me!](mailto:sam\@green.eggs.ham)
3226+\f[]
3227+.fi
3228+.SS Reference links
3229+.PP
3230+An \f[I]explicit\f[] reference link has two parts, the link itself and
3231+the link definition, which may occur elsewhere in the document (either
3232+before or after the link).
3233+.PP
3234+The link consists of link text in square brackets, followed by a label
3235+in square brackets.
3236+(There can be space between the two.) The link definition consists of
3237+the bracketed label, followed by a colon and a space, followed by the
3238+URL, and optionally (after a space) a link title either in quotes or in
3239+parentheses.
3240+The label must not be parseable as a citation (assuming the
3241+\f[C]citations\f[] extension is enabled): citations take precedence over
3242+link labels.
3243+.PP
3244+Here are some examples:
3245+.IP
3246+.nf
3247+\f[C]
3248+[my\ label\ 1]:\ /foo/bar.html\ \ "My\ title,\ optional"
3249+[my\ label\ 2]:\ /foo
3250+[my\ label\ 3]:\ http://fsf.org\ (The\ free\ software\ foundation)
3251+[my\ label\ 4]:\ /bar#special\ \ \[aq]A\ title\ in\ single\ quotes\[aq]
3252+\f[]
3253+.fi
3254+.PP
3255+The URL may optionally be surrounded by angle brackets:
3256+.IP
3257+.nf
3258+\f[C]
3259+[my\ label\ 5]:\ <http://foo.bar.baz>
3260+\f[]
3261+.fi
3262+.PP
3263+The title may go on the next line:
3264+.IP
3265+.nf
3266+\f[C]
3267+[my\ label\ 3]:\ http://fsf.org
3268+\ \ "The\ free\ software\ foundation"
3269+\f[]
3270+.fi
3271+.PP
3272+Note that link labels are not case sensitive.
3273+So, this will work:
3274+.IP
3275+.nf
3276+\f[C]
3277+Here\ is\ [my\ link][FOO]
3278+
3279+[Foo]:\ /bar/baz
3280+\f[]
3281+.fi
3282+.PP
3283+In an \f[I]implicit\f[] reference link, the second pair of brackets is
3284+empty:
3285+.IP
3286+.nf
3287+\f[C]
3288+See\ [my\ website][].
3289+
3290+[my\ website]:\ http://foo.bar.baz
3291+\f[]
3292+.fi
3293+.PP
3294+Note: In \f[C]Markdown.pl\f[] and most other markdown implementations,
3295+reference link definitions cannot occur in nested constructions such as
3296+list items or block quotes.
3297+Pandoc lifts this arbitrary seeming restriction.
3298+So the following is fine in pandoc, though not in most other
3299+implementations:
3300+.IP
3301+.nf
3302+\f[C]
3303+>\ My\ block\ [quote].
3304+>
3305+>\ [quote]:\ /foo
3306+\f[]
3307+.fi
3308+.SS Extension: \f[C]shortcut_reference_links\f[]
3309+.PP
3310+In a \f[I]shortcut\f[] reference link, the second pair of brackets may
3311+be omitted entirely:
3312+.IP
3313+.nf
3314+\f[C]
3315+See\ [my\ website].
3316+
3317+[my\ website]:\ http://foo.bar.baz
3318+\f[]
3319+.fi
3320+.SS Internal links
3321+.PP
3322+To link to another section of the same document, use the automatically
3323+generated identifier (see HEADER IDENTIFIERS IN HTML, LATEX, AND
3324+CONTEXT, below).
3325+For example:
3326+.IP
3327+.nf
3328+\f[C]
3329+See\ the\ [Introduction](#introduction).
3330+\f[]
3331+.fi
3332+.PP
3333+or
3334+.IP
3335+.nf
3336+\f[C]
3337+See\ the\ [Introduction].
3338+
3339+[Introduction]:\ #introduction
3340+\f[]
3341+.fi
3342+.PP
3343+Internal links are currently supported for HTML formats (including HTML
3344+slide shows and EPUB), LaTeX, and ConTeXt.
3345+.SS Images
3346+.PP
3347+A link immediately preceded by a \f[C]!\f[] will be treated as an image.
3348+The link text will be used as the image\[aq]s alt text:
3349+.IP
3350+.nf
3351+\f[C]
3352+![la\ lune](lalune.jpg\ "Voyage\ to\ the\ moon")
3353+
3354+![movie\ reel]
3355+
3356+[movie\ reel]:\ movie.gif
3357+\f[]
3358+.fi
3359+.SS Extension: \f[C]implicit_figures\f[]
3360+.PP
3361+An image occurring by itself in a paragraph will be rendered as a figure
3362+with a caption. (In LaTeX, a figure environment will be used; in HTML,
3363+the image will be placed in a \f[C]div\f[] with class \f[C]figure\f[],
3364+together with a caption in a \f[C]p\f[] with class \f[C]caption\f[].)
3365+The image\[aq]s alt text will be used as the caption.
3366+.IP
3367+.nf
3368+\f[C]
3369+![This\ is\ the\ caption](/url/of/image.png)
3370+\f[]
3371+.fi
3372+.PP
3373+If you just want a regular inline image, just make sure it is not the
3374+only thing in the paragraph.
3375+One way to do this is to insert a nonbreaking space after the image:
3376+.IP
3377+.nf
3378+\f[C]
3379+![This\ image\ won\[aq]t\ be\ a\ figure](/url/of/image.png)\\
3380+\f[]
3381+.fi
3382+.SS Footnotes
3383+.SS Extension: \f[C]footnotes\f[]
3384+.PP
3385+Pandoc\[aq]s markdown allows footnotes, using the following syntax:
3386+.IP
3387+.nf
3388+\f[C]
3389+Here\ is\ a\ footnote\ reference,[^1]\ and\ another.[^longnote]
3390+
3391+[^1]:\ Here\ is\ the\ footnote.
3392+
3393+[^longnote]:\ Here\[aq]s\ one\ with\ multiple\ blocks.
3394+
3395+\ \ \ \ Subsequent\ paragraphs\ are\ indented\ to\ show\ that\ they
3396+belong\ to\ the\ previous\ footnote.
3397+
3398+\ \ \ \ \ \ \ \ {\ some.code\ }
3399+
3400+\ \ \ \ The\ whole\ paragraph\ can\ be\ indented,\ or\ just\ the\ first
3401+\ \ \ \ line.\ \ In\ this\ way,\ multi\-paragraph\ footnotes\ work\ like
3402+\ \ \ \ multi\-paragraph\ list\ items.
3403+
3404+This\ paragraph\ won\[aq]t\ be\ part\ of\ the\ note,\ because\ it
3405+isn\[aq]t\ indented.
3406+\f[]
3407+.fi
3408+.PP
3409+The identifiers in footnote references may not contain spaces, tabs, or
3410+newlines.
3411+These identifiers are used only to correlate the footnote reference with
3412+the note itself; in the output, footnotes will be numbered sequentially.
3413+.PP
3414+The footnotes themselves need not be placed at the end of the document.
3415+They may appear anywhere except inside other block elements (lists,
3416+block quotes, tables, etc.).
3417+.SS Extension: \f[C]inline_notes\f[]
3418+.PP
3419+Inline footnotes are also allowed (though, unlike regular notes, they
3420+cannot contain multiple paragraphs).
3421+The syntax is as follows:
3422+.IP
3423+.nf
3424+\f[C]
3425+Here\ is\ an\ inline\ note.^[Inlines\ notes\ are\ easier\ to\ write,\ since
3426+you\ don\[aq]t\ have\ to\ pick\ an\ identifier\ and\ move\ down\ to\ type\ the
3427+note.]
3428+\f[]
3429+.fi
3430+.PP
3431+Inline and regular footnotes may be mixed freely.
3432+.SS Citations
3433+.SS Extension: \f[C]citations\f[]
3434+.PP
3435+Using an external filter, \f[C]pandoc\-citeproc\f[], pandoc can
3436+automatically generate citations and a bibliography in a number of
3437+styles.
3438+Basic usage is
3439+.IP
3440+.nf
3441+\f[C]
3442+pandoc\ \-\-filter\ pandoc\-citeproc\ myinput.txt
3443+\f[]
3444+.fi
3445+.PP
3446+In order to use this feature, you will need to specify a bibliography
3447+file using the \f[C]bibliography\f[] metadata field in a YAML metadata
3448+section, or \f[C]\-\-bibliography\f[] command line argument.
3449+You can supply multiple \f[C]\-\-bibliography\f[] arguments or set
3450+\f[C]bibliography\f[] metadata field to YAML array, if you want to use
3451+multiple bibliography files.
3452+The bibliography may have any of these formats:
3453+.PP
3454+.TS
3455+tab(@);
3456+l l.
3457+T{
3458+Format
3459+T}@T{
3460+File extension
3461+T}
3462+_
3463+T{
3464+BibLaTeX
3465+T}@T{
3466+\&.bib
3467+T}
3468+T{
3469+BibTeX
3470+T}@T{
3471+\&.bibtex
3472+T}
3473+T{
3474+Copac
3475+T}@T{
3476+\&.copac
3477+T}
3478+T{
3479+CSL JSON
3480+T}@T{
3481+\&.json
3482+T}
3483+T{
3484+CSL YAML
3485+T}@T{
3486+\&.yaml
3487+T}
3488+T{
3489+EndNote
3490+T}@T{
3491+\&.enl
3492+T}
3493+T{
3494+EndNote XML
3495+T}@T{
3496+\&.xml
3497+T}
3498+T{
3499+ISI
3500+T}@T{
3501+\&.wos
3502+T}
3503+T{
3504+MEDLINE
3505+T}@T{
3506+\&.medline
3507+T}
3508+T{
3509+MODS
3510+T}@T{
3511+\&.mods
3512+T}
3513+T{
3514+RIS
3515+T}@T{
3516+\&.ris
3517+T}
3518+.TE
3519+.PP
3520+Note that \f[C]\&.bib\f[] can generally be used with both BibTeX and
3521+BibLaTeX files, but you can use \f[C]\&.bibtex\f[] to force BibTeX.
3522+.PP
3523+Note that \f[C]pandoc\-citeproc\ \-\-bib2json\f[] and
3524+\f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce \f[C]\&.json\f[] and
3525+\f[C]\&.yaml\f[] files from any of the supported formats.
3526+.PP
3527+In\-field markup: In bibtex and biblatex databases, pandoc\-citeproc
3528+parses (a subset of) LaTeX markup; in CSL JSON databases, an HTML\-like
3529+markup (specs); and in CSL YAML databases, pandoc markdown.
3530+\f[C]pandoc\-citeproc\ \-j\f[] and \f[C]\-y\f[] interconvert these
3531+markup formats as far as possible.
3532+.PP
3533+As an alternative to specifying a bibliography file, you can include the
3534+citation data directly in the \f[C]references\f[] field of the
3535+document\[aq]s YAML metadata.
3536+The field should contain an array of YAML\-encoded references, for
3537+example:
3538+.IP
3539+.nf
3540+\f[C]
3541+\-\-\-
3542+references:
3543+\-\ type:\ article\-journal
3544+\ \ id:\ WatsonCrick1953
3545+\ \ author:
3546+\ \ \-\ family:\ Watson
3547+\ \ \ \ given:\ J.\ D.
3548+\ \ \-\ family:\ Crick
3549+\ \ \ \ given:\ F.\ H.\ C.
3550+\ \ issued:
3551+\ \ \ \ date\-parts:
3552+\ \ \ \ \-\ \-\ 1953
3553+\ \ \ \ \ \ \-\ 4
3554+\ \ \ \ \ \ \-\ 25
3555+\ \ title:\ \[aq]Molecular\ structure\ of\ nucleic\ acids:\ a\ structure\ for\ deoxyribose
3556+\ \ \ \ nucleic\ acid\[aq]
3557+\ \ title\-short:\ Molecular\ structure\ of\ nucleic\ acids
3558+\ \ container\-title:\ Nature
3559+\ \ volume:\ 171
3560+\ \ issue:\ 4356
3561+\ \ page:\ 737\-738
3562+\ \ DOI:\ 10.1038/171737a0
3563+\ \ URL:\ http://www.nature.com/nature/journal/v171/n4356/abs/171737a0.html
3564+\ \ language:\ en\-GB
3565+\&...
3566+\f[]
3567+.fi
3568+.PP
3569+(\f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce these from a
3570+bibliography file in one of the supported formats.)
3571+.PP
3572+By default, \f[C]pandoc\-citeproc\f[] will use the Chicago Manual of
3573+Style author\-date format for citations and references.
3574+To use another style, you will need to specify a CSL 1.0 style file in
3575+the \f[C]csl\f[] metadata field.
3576+A repository of CSL styles can be found at
3577+https://github.com/citation\-style\-language/styles.
3578+See also http://zotero.org/styles for easy browsing.
3579+A primer on creating and modifying CSL styles can be found at
3580+http://citationstyles.org/downloads/primer.html.
3581+.PP
3582+Citations go inside square brackets and are separated by semicolons.
3583+Each citation must have a key, composed of \[aq]\@\[aq] + the citation
3584+identifier from the database, and may optionally have a prefix, a
3585+locator, and a suffix.
3586+The citation key must begin with a letter, digit, or \f[C]_\f[], and may
3587+contain alphanumerics, \f[C]_\f[], and internal punctuation characters
3588+(\f[C]:.#$%&\-+?<>~/\f[]).
3589+Here are some examples:
3590+.IP
3591+.nf
3592+\f[C]
3593+Blah\ blah\ [see\ \@doe99,\ pp.\ 33\-35;\ also\ \@smith04,\ ch.\ 1].
3594+
3595+Blah\ blah\ [\@doe99,\ pp.\ 33\-35,\ 38\-39\ and\ *passim*].
3596+
3597+Blah\ blah\ [\@smith04;\ \@doe99].
3598+\f[]
3599+.fi
3600+.PP
3601+A minus sign (\f[C]\-\f[]) before the \f[C]\@\f[] will suppress mention
3602+of the author in the citation.
3603+This can be useful when the author is already mentioned in the text:
3604+.IP
3605+.nf
3606+\f[C]
3607+Smith\ says\ blah\ [\-\@smith04].
3608+\f[]
3609+.fi
3610+.PP
3611+You can also write an in\-text citation, as follows:
3612+.IP
3613+.nf
3614+\f[C]
3615+\@smith04\ says\ blah.
3616+
3617+\@smith04\ [p.\ 33]\ says\ blah.
3618+\f[]
3619+.fi
3620+.PP
3621+If the style calls for a list of works cited, it will be placed at the
3622+end of the document.
3623+Normally, you will want to end your document with an appropriate header:
3624+.IP
3625+.nf
3626+\f[C]
3627+last\ paragraph...
3628+
3629+#\ References
3630+\f[]
3631+.fi
3632+.PP
3633+The bibliography will be inserted after this header.
3634+Note that the \f[C]unnumbered\f[] class will be added to this header, so
3635+that the section will not be numbered.
3636+.PP
3637+If you want to include items in the bibliography without actually citing
3638+them in the body text, you can define a dummy \f[C]nocite\f[] metadata
3639+field and put the citations there:
3640+.IP
3641+.nf
3642+\f[C]
3643+\-\-\-
3644+nocite:\ |
3645+\ \ \@item1,\ \@item2
3646+\&...
3647+
3648+\@item3
3649+\f[]
3650+.fi
3651+.PP
3652+In this example, the document will contain a citation for \f[C]item3\f[]
3653+only, but the bibliography will contain entries for \f[C]item1\f[],
3654+\f[C]item2\f[], and \f[C]item3\f[].
3655+.PP
3656+For LaTeX or PDF output, you can also use NatBib or BibLaTeX to render
3657+bibliography.
3658+In order to do so, specify bibliography files as outlined above, and add
3659+\f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] argument to \f[C]pandoc\f[]
3660+invocation.
3661+Bear in mind that bibliography files have to be in respective format
3662+(either BibTeX or BibLaTeX).
3663+.SS Non\-pandoc extensions
3664+.PP
3665+The following markdown syntax extensions are not enabled by default in
3666+pandoc, but may be enabled by adding \f[C]+EXTENSION\f[] to the format
3667+name, where \f[C]EXTENSION\f[] is the name of the extension.
3668+Thus, for example, \f[C]markdown+hard_line_breaks\f[] is markdown with
3669+hard line breaks.
3670+.SS Extension: \f[C]lists_without_preceding_blankline\f[]
3671+.PP
3672+Allow a list to occur right after a paragraph, with no intervening blank
3673+space.
3674+.SS Extension: \f[C]hard_line_breaks\f[]
3675+.PP
3676+Causes all newlines within a paragraph to be interpreted as hard line
3677+breaks instead of spaces.
3678+.SS Extension: \f[C]ignore_line_breaks\f[]
3679+.PP
3680+Causes newlines within a paragraph to be ignored, rather than being
3681+treated as spaces or as hard line breaks.
3682+This option is intended for use with East Asian languages where spaces
3683+are not used between words, but text is divided into lines for
3684+readability.
3685+.SS Extension: \f[C]tex_math_single_backslash\f[]
3686+.PP
3687+Causes anything between \f[C]\\(\f[] and \f[C]\\)\f[] to be interpreted
3688+as inline TeX math, and anything between \f[C]\\[\f[] and \f[C]\\]\f[]
3689+to be interpreted as display TeX math.
3690+Note: a drawback of this extension is that it precludes escaping
3691+\f[C](\f[] and \f[C][\f[].
3692+.SS Extension: \f[C]tex_math_double_backslash\f[]
3693+.PP
3694+Causes anything between \f[C]\\\\(\f[] and \f[C]\\\\)\f[] to be
3695+interpreted as inline TeX math, and anything between \f[C]\\\\[\f[] and
3696+\f[C]\\\\]\f[] to be interpreted as display TeX math.
3697+.SS Extension: \f[C]markdown_attribute\f[]
3698+.PP
3699+By default, pandoc interprets material inside block\-level tags as
3700+markdown.
3701+This extension changes the behavior so that markdown is only parsed
3702+inside block\-level tags if the tags have the attribute
3703+\f[C]markdown=1\f[].
3704+.SS Extension: \f[C]mmd_title_block\f[]
3705+.PP
3706+Enables a MultiMarkdown style title block at the top of the document,
3707+for example:
3708+.IP
3709+.nf
3710+\f[C]
3711+Title:\ \ \ My\ title
3712+Author:\ \ John\ Doe
3713+Date:\ \ \ \ September\ 1,\ 2008
3714+Comment:\ This\ is\ a\ sample\ mmd\ title\ block,\ with
3715+\ \ \ \ \ \ \ \ \ a\ field\ spanning\ multiple\ lines.
3716+\f[]
3717+.fi
3718+.PP
3719+See the MultiMarkdown documentation for details.
3720+If \f[C]pandoc_title_block\f[] or \f[C]yaml_metadata_block\f[] is
3721+enabled, it will take precedence over \f[C]mmd_title_block\f[].
3722+.SS Extension: \f[C]abbreviations\f[]
3723+.PP
3724+Parses PHP Markdown Extra abbreviation keys, like
3725+.IP
3726+.nf
3727+\f[C]
3728+*[HTML]:\ Hyper\ Text\ Markup\ Language
3729+\f[]
3730+.fi
3731+.PP
3732+Note that the pandoc document model does not support abbreviations, so
3733+if this extension is enabled, abbreviation keys are simply skipped (as
3734+opposed to being parsed as paragraphs).
3735+.SS Extension: \f[C]autolink_bare_uris\f[]
3736+.PP
3737+Makes all absolute URIs into links, even when not surrounded by pointy
3738+braces \f[C]<...>\f[].
3739+.SS Extension: \f[C]ascii_identifiers\f[]
3740+.PP
3741+Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
3742+ASCII.
3743+Accents are stripped off of accented latin letters, and non\-latin
3744+letters are omitted.
3745+.SS Extension: \f[C]link_attributes\f[]
3746+.PP
3747+Parses multimarkdown style key\-value attributes on link and image
3748+references.
3749+Note that pandoc\[aq]s internal document model provides nowhere to put
3750+these, so they are presently just ignored.
3751+.SS Extension: \f[C]mmd_header_identifiers\f[]
3752+.PP
3753+Parses multimarkdown style header identifiers (in square brackets, after
3754+the header but before any trailing \f[C]#\f[]s in an ATX header).
3755+.SS Extension: \f[C]compact_definition_lists\f[]
3756+.PP
3757+Activates the definition list syntax of pandoc 1.12.x and earlier.
3758+This syntax differs from the one described ABOVE in several respects:
3759+.IP \[bu] 2
3760+No blank line is required between consecutive items of the definition
3761+list.
3762+.IP \[bu] 2
3763+To get a "tight" or "compact" list, omit space between consecutive
3764+items; the space between a term and its definition does not affect
3765+anything.
3766+.IP \[bu] 2
3767+Lazy wrapping of paragraphs is not allowed: the entire definition must
3768+be indented four spaces.
3769+.SS Markdown variants
3770+.PP
3771+In addition to pandoc\[aq]s extended markdown, the following markdown
3772+variants are supported:
3773+.TP
3774+.B \f[C]markdown_phpextra\f[] (PHP Markdown Extra)
3775+\f[C]footnotes\f[], \f[C]pipe_tables\f[], \f[C]raw_html\f[],
3776+\f[C]markdown_attribute\f[], \f[C]fenced_code_blocks\f[],
3777+\f[C]definition_lists\f[], \f[C]intraword_underscores\f[],
3778+\f[C]header_attributes\f[], \f[C]abbreviations\f[],
3779+\f[C]shortcut_reference_links\f[].
3780+.RS
3781+.RE
3782+.TP
3783+.B \f[C]markdown_github\f[] (GitHub\-flavored Markdown)
3784+\f[C]pipe_tables\f[], \f[C]raw_html\f[],
3785+\f[C]tex_math_single_backslash\f[], \f[C]fenced_code_blocks\f[],
3786+\f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[],
3787+\f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[],
3788+\f[C]intraword_underscores\f[], \f[C]strikeout\f[],
3789+\f[C]hard_line_breaks\f[], \f[C]shortcut_reference_links\f[].
3790+.RS
3791+.RE
3792+.TP
3793+.B \f[C]markdown_mmd\f[] (MultiMarkdown)
3794+\f[C]pipe_tables\f[] \f[C]raw_html\f[], \f[C]markdown_attribute\f[],
3795+\f[C]link_attributes\f[], \f[C]raw_tex\f[],
3796+\f[C]tex_math_double_backslash\f[], \f[C]intraword_underscores\f[],
3797+\f[C]mmd_title_block\f[], \f[C]footnotes\f[], \f[C]definition_lists\f[],
3798+\f[C]all_symbols_escapable\f[], \f[C]implicit_header_references\f[],
3799+\f[C]auto_identifiers\f[], \f[C]mmd_header_identifiers\f[],
3800+\f[C]shortcut_reference_links\f[].
3801+.RS
3802+.RE
3803+.TP
3804+.B \f[C]markdown_strict\f[] (Markdown.pl)
3805+\f[C]raw_html\f[]
3806+.RS
3807+.RE
3808+.SS Extensions with formats other than markdown
3809+.PP
3810+Some of the extensions discussed above can be used with formats other
3811+than markdown:
3812+.IP \[bu] 2
3813+\f[C]auto_identifiers\f[] can be used with \f[C]latex\f[], \f[C]rst\f[],
3814+\f[C]mediawiki\f[], and \f[C]textile\f[] input (and is used by default).
3815+.IP \[bu] 2
3816+\f[C]tex_math_dollars\f[], \f[C]tex_math_single_backslash\f[], and
3817+\f[C]tex_math_double_backslash\f[] can be used with \f[C]html\f[] input.
3818+(This is handy for reading web pages formatted using MathJax, for
3819+example.)
3820+.SH PRODUCING SLIDE SHOWS WITH PANDOC
3821+.PP
3822+You can use Pandoc to produce an HTML + javascript slide presentation
3823+that can be viewed via a web browser.
3824+There are five ways to do this, using S5, DZSlides, Slidy, Slideous, or
3825+reveal.js.
3826+You can also produce a PDF slide show using LaTeX beamer.
3827+.PP
3828+Here\[aq]s the markdown source for a simple slide show,
3829+\f[C]habits.txt\f[]:
3830+.IP
3831+.nf
3832+\f[C]
3833+%\ Habits
3834+%\ John\ Doe
3835+%\ March\ 22,\ 2005
3836+
3837+#\ In\ the\ morning
3838+
3839+##\ Getting\ up
3840+
3841+\-\ Turn\ off\ alarm
3842+\-\ Get\ out\ of\ bed
3843+
3844+##\ Breakfast
3845+
3846+\-\ Eat\ eggs
3847+\-\ Drink\ coffee
3848+
3849+#\ In\ the\ evening
3850+
3851+##\ Dinner
3852+
3853+\-\ Eat\ spaghetti
3854+\-\ Drink\ wine
3855+
3856+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3857+
3858+![picture\ of\ spaghetti](images/spaghetti.jpg)
3859+
3860+##\ Going\ to\ sleep
3861+
3862+\-\ Get\ in\ bed
3863+\-\ Count\ sheep
3864+\f[]
3865+.fi
3866+.PP
3867+To produce an HTML/javascript slide show, simply type
3868+.IP
3869+.nf
3870+\f[C]
3871+pandoc\ \-t\ FORMAT\ \-s\ habits.txt\ \-o\ habits.html
3872+\f[]
3873+.fi
3874+.PP
3875+where \f[C]FORMAT\f[] is either \f[C]s5\f[], \f[C]slidy\f[],
3876+\f[C]slideous\f[], \f[C]dzslides\f[], or \f[C]revealjs\f[].
3877+.PP
3878+For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with
3879+the \f[C]\-s/\-\-standalone\f[] option embeds a link to javascripts and
3880+CSS files, which are assumed to be available at the relative path
3881+\f[C]s5/default\f[] (for S5), \f[C]slideous\f[] (for Slideous),
3882+\f[C]reveal.js\f[] (for reveal.js), or at the Slidy website at
3883+\f[C]w3.org\f[] (for Slidy).
3884+(These paths can be changed by setting the \f[C]slidy\-url\f[],
3885+\f[C]slideous\-url\f[], \f[C]revealjs\-url\f[], or \f[C]s5\-url\f[]
3886+variables; see \f[C]\-\-variable\f[], above.) For DZSlides, the
3887+(relatively short) javascript and css are included in the file by
3888+default.
3889+.PP
3890+With all HTML slide formats, the \f[C]\-\-self\-contained\f[] option can
3891+be used to produce a single file that contains all of the data necessary
3892+to display the slide show, including linked scripts, stylesheets,
3893+images, and videos.
3894+.PP
3895+To produce a PDF slide show using beamer, type
3896+.IP
3897+.nf
3898+\f[C]
3899+pandoc\ \-t\ beamer\ habits.txt\ \-o\ habits.pdf
3900+\f[]
3901+.fi
3902+.PP
3903+Note that a reveal.js slide show can also be converted to a PDF by
3904+printing it to a file from the browser.
3905+.SS Structuring the slide show
3906+.PP
3907+By default, the \f[I]slide level\f[] is the highest header level in the
3908+hierarchy that is followed immediately by content, and not another
3909+header, somewhere in the document.
3910+In the example above, level 1 headers are always followed by level 2
3911+headers, which are followed by content, so 2 is the slide level.
3912+This default can be overridden using the \f[C]\-\-slide\-level\f[]
3913+option.
3914+.PP
3915+The document is carved up into slides according to the following rules:
3916+.IP \[bu] 2
3917+A horizontal rule always starts a new slide.
3918+.IP \[bu] 2
3919+A header at the slide level always starts a new slide.
3920+.IP \[bu] 2
3921+Headers \f[I]below\f[] the slide level in the hierarchy create headers
3922+\f[I]within\f[] a slide.
3923+.IP \[bu] 2
3924+Headers \f[I]above\f[] the slide level in the hierarchy create "title
3925+slides," which just contain the section title and help to break the
3926+slide show into sections.
3927+.IP \[bu] 2
3928+A title page is constructed automatically from the document\[aq]s title
3929+block, if present.
3930+(In the case of beamer, this can be disabled by commenting out some
3931+lines in the default template.)
3932+.PP
3933+These rules are designed to support many different styles of slide show.
3934+If you don\[aq]t care about structuring your slides into sections and
3935+subsections, you can just use level 1 headers for all each slide.
3936+(In that case, level 1 will be the slide level.) But you can also
3937+structure the slide show into sections, as in the example above.
3938+.PP
3939+Note: in reveal.js slide shows, if slide level is 2, a two\-dimensional
3940+layout will be produced, with level 1 headers building horizontally and
3941+level 2 headers building vertically.
3942+It is not recommended that you use deeper nesting of section levels with
3943+reveal.js.
3944+.SS Incremental lists
3945+.PP
3946+By default, these writers produce lists that display "all at once." If
3947+you want your lists to display incrementally (one item at a time), use
3948+the \f[C]\-i\f[] option.
3949+If you want a particular list to depart from the default (that is, to
3950+display incrementally without the \f[C]\-i\f[] option and all at once
3951+with the \f[C]\-i\f[] option), put it in a block quote:
3952+.IP
3953+.nf
3954+\f[C]
3955+>\ \-\ Eat\ spaghetti
3956+>\ \-\ Drink\ wine
3957+\f[]
3958+.fi
3959+.PP
3960+In this way incremental and nonincremental lists can be mixed in a
3961+single document.
3962+.SS Inserting pauses
3963+.PP
3964+You can add "pauses" within a slide by including a paragraph containing
3965+three dots, separated by spaces:
3966+.IP
3967+.nf
3968+\f[C]
3969+#\ Slide\ with\ a\ pause
3970+
3971+content\ before\ the\ pause
3972+
3973+\&.\ .\ .
3974+
3975+content\ after\ the\ pause
3976+\f[]
3977+.fi
3978+.SS Styling the slides
3979+.PP
3980+You can change the style of HTML slides by putting customized CSS files
3981+in \f[C]$DATADIR/s5/default\f[] (for S5), \f[C]$DATADIR/slidy\f[] (for
3982+Slidy), or \f[C]$DATADIR/slideous\f[] (for Slideous), where
3983+\f[C]$DATADIR\f[] is the user data directory (see
3984+\f[C]\-\-data\-dir\f[], above).
3985+The originals may be found in pandoc\[aq]s system data directory
3986+(generally \f[C]$CABALDIR/pandoc\-VERSION/s5/default\f[]).
3987+Pandoc will look there for any files it does not find in the user data
3988+directory.
3989+.PP
3990+For dzslides, the CSS is included in the HTML file itself, and may be
3991+modified there.
3992+.PP
3993+For reveal.js, themes can be used by setting the \f[C]theme\f[]
3994+variable, for example:
3995+.IP
3996+.nf
3997+\f[C]
3998+\-V\ theme=moon
3999+\f[]
4000+.fi
4001+.PP
4002+Or you can specify a custom stylesheet using the \f[C]\-\-css\f[]
4003+option.
4004+.PP
4005+To style beamer slides, you can specify a beamer "theme" or "colortheme"
4006+using the \f[C]\-V\f[] option:
4007+.IP
4008+.nf
4009+\f[C]
4010+pandoc\ \-t\ beamer\ habits.txt\ \-V\ theme:Warsaw\ \-o\ habits.pdf
4011+\f[]
4012+.fi
4013+.PP
4014+Note that header attributes will turn into slide attributes (on a
4015+\f[C]<div>\f[] or \f[C]<section>\f[]) in HTML slide formats, allowing
4016+you to style individual slides.
4017+In Beamer, the only header attribute that affects slides is the
4018+\f[C]allowframebreaks\f[] class, which sets the
4019+\f[C]allowframebreaks\f[] option, causing multiple slides to be created
4020+if the content overfills the frame.
4021+This is recommended especially for bibliographies:
4022+.IP
4023+.nf
4024+\f[C]
4025+#\ References\ {.allowframebreaks}
4026+\f[]
4027+.fi
4028+.SS Speaker notes
4029+.PP
4030+reveal.js has good support for speaker notes.
4031+You can add notes to your markdown document thus:
4032+.IP
4033+.nf
4034+\f[C]
4035+<div\ class="notes">
4036+This\ is\ my\ note.
4037+
4038+\-\ It\ can\ contain\ markdown
4039+\-\ like\ this\ list
4040+
4041+</div>
4042+\f[]
4043+.fi
4044+.PP
4045+To show the notes window, press \f[C]s\f[] while viewing the
4046+presentation.
4047+Notes are not yet supported for other slide formats, but the notes will
4048+not appear on the slides themselves.
4049+.SS Marking frames "fragile" in beamer
4050+.PP
4051+Sometimes it is necessary to add the LaTeX \f[C][fragile]\f[] option to
4052+a frame in beamer (for example, when using the \f[C]minted\f[]
4053+environment).
4054+This can be forced by adding the \f[C]fragile\f[] class to the header
4055+introducing the slide:
4056+.IP
4057+.nf
4058+\f[C]
4059+#\ Fragile\ slide\ {.fragile}
4060+\f[]
4061+.fi
4062+.SH EPUB METADATA
4063+.PP
4064+EPUB metadata may be specified using the \f[C]\-\-epub\-metadata\f[]
4065+option, but if the source document is markdown, it is better to use a
4066+YAML metadata block.
4067+Here is an example:
4068+.IP
4069+.nf
4070+\f[C]
4071+\-\-\-
4072+title:
4073+\-\ type:\ main
4074+\ \ text:\ My\ Book
4075+\-\ type:\ subtitle
4076+\ \ text:\ An\ investigation\ of\ metadata
4077+creator:
4078+\-\ role:\ author
4079+\ \ text:\ John\ Smith
4080+\-\ role:\ editor
4081+\ \ text:\ Sarah\ Jones
4082+identifier:
4083+\-\ scheme:\ DOI
4084+\ \ text:\ doi:10.234234.234/33
4085+publisher:\ \ My\ Press
4086+rights:\ ©\ 2007\ John\ Smith,\ CC\ BY\-NC
4087+\&...
4088+\f[]
4089+.fi
4090+.PP
4091+The following fields are recognized:
4092+.TP
4093+.B \f[C]identifier\f[]
4094+Either a string value or an object with fields \f[C]text\f[] and
4095+\f[C]scheme\f[].
4096+Valid values for \f[C]scheme\f[] are \f[C]ISBN\-10\f[],
4097+\f[C]GTIN\-13\f[], \f[C]UPC\f[], \f[C]ISMN\-10\f[], \f[C]DOI\f[],
4098+\f[C]LCCN\f[], \f[C]GTIN\-14\f[], \f[C]ISBN\-13\f[],
4099+\f[C]Legal\ deposit\ number\f[], \f[C]URN\f[], \f[C]OCLC\f[],
4100+\f[C]ISMN\-13\f[], \f[C]ISBN\-A\f[], \f[C]JP\f[], \f[C]OLCC\f[].
4101+.RS
4102+.RE
4103+.TP
4104+.B \f[C]title\f[]
4105+Either a string value, or an object with fields \f[C]file\-as\f[] and
4106+\f[C]type\f[], or a list of such objects.
4107+Valid values for \f[C]type\f[] are \f[C]main\f[], \f[C]subtitle\f[],
4108+\f[C]short\f[], \f[C]collection\f[], \f[C]edition\f[],
4109+\f[C]extended\f[].
4110+.RS
4111+.RE
4112+.TP
4113+.B \f[C]creator\f[]
4114+Either a string value, or an object with fields \f[C]role\f[],
4115+\f[C]file\-as\f[], and \f[C]text\f[], or a list of such objects.
4116+Valid values for \f[C]role\f[] are marc relators, but pandoc will
4117+attempt to translate the human\-readable versions (like "author" and
4118+"editor") to the appropriate marc relators.
4119+.RS
4120+.RE
4121+.TP
4122+.B \f[C]contributor\f[]
4123+Same format as \f[C]creator\f[].
4124+.RS
4125+.RE
4126+.TP
4127+.B \f[C]date\f[]
4128+A string value in \f[C]YYYY\-MM\-DD\f[] format.
4129+(Only the year is necessary.) Pandoc will attempt to convert other
4130+common date formats.
4131+.RS
4132+.RE
4133+.TP
4134+.B \f[C]language\f[]
4135+A string value in RFC5646 format.
4136+Pandoc will default to the local language if nothing is specified.
4137+.RS
4138+.RE
4139+.TP
4140+.B \f[C]subject\f[]
4141+A string value or a list of such values.
4142+.RS
4143+.RE
4144+.TP
4145+.B \f[C]description\f[]
4146+A string value.
4147+.RS
4148+.RE
4149+.TP
4150+.B \f[C]type\f[]
4151+A string value.
4152+.RS
4153+.RE
4154+.TP
4155+.B \f[C]format\f[]
4156+A string value.
4157+.RS
4158+.RE
4159+.TP
4160+.B \f[C]relation\f[]
4161+A string value.
4162+.RS
4163+.RE
4164+.TP
4165+.B \f[C]coverage\f[]
4166+A string value.
4167+.RS
4168+.RE
4169+.TP
4170+.B \f[C]rights\f[]
4171+A string value.
4172+.RS
4173+.RE
4174+.TP
4175+.B \f[C]cover\-image\f[]
4176+A string value (path to cover image).
4177+.RS
4178+.RE
4179+.TP
4180+.B \f[C]stylesheet\f[]
4181+A string value (path to CSS stylesheet).
4182+.RS
4183+.RE
4184+.TP
4185+.B \f[C]page\-progression\-direction\f[]
4186+Either \f[C]ltr\f[] or \f[C]rtl\f[].
4187+Specifies the \f[C]page\-progression\-direction\f[] spine attribute.
4188+.RS
4189+.RE
4190+.SH LITERATE HASKELL SUPPORT
4191+.PP
4192+If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to an
4193+appropriate input or output format (\f[C]markdown\f[],
4194+\f[C]markdown_strict\f[], \f[C]rst\f[], or \f[C]latex\f[] for input or
4195+output; \f[C]beamer\f[], \f[C]html\f[] or \f[C]html5\f[] for output
4196+only), pandoc will treat the document as literate Haskell source.
4197+This means that
4198+.IP \[bu] 2
4199+In markdown input, "bird track" sections will be parsed as Haskell code
4200+rather than block quotations.
4201+Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
4202+be treated as Haskell code.
4203+.IP \[bu] 2
4204+In markdown output, code blocks with classes \f[C]haskell\f[] and
4205+\f[C]literate\f[] will be rendered using bird tracks, and block
4206+quotations will be indented one space, so they will not be treated as
4207+Haskell code.
4208+In addition, headers will be rendered setext\-style (with underlines)
4209+rather than atx\-style (with \[aq]#\[aq] characters).
4210+(This is because ghc treats \[aq]#\[aq] characters in column 1 as
4211+introducing line numbers.)
4212+.IP \[bu] 2
4213+In restructured text input, "bird track" sections will be parsed as
4214+Haskell code.
4215+.IP \[bu] 2
4216+In restructured text output, code blocks with class \f[C]haskell\f[]
4217+will be rendered using bird tracks.
4218+.IP \[bu] 2
4219+In LaTeX input, text in \f[C]code\f[] environments will be parsed as
4220+Haskell code.
4221+.IP \[bu] 2
4222+In LaTeX output, code blocks with class \f[C]haskell\f[] will be
4223+rendered inside \f[C]code\f[] environments.
4224+.IP \[bu] 2
4225+In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
4226+with class \f[C]literatehaskell\f[] and bird tracks.
4227+.PP
4228+Examples:
4229+.IP
4230+.nf
4231+\f[C]
4232+pandoc\ \-f\ markdown+lhs\ \-t\ html
4233+\f[]
4234+.fi
4235+.PP
4236+reads literate Haskell source formatted with markdown conventions and
4237+writes ordinary HTML (without bird tracks).
4238+.IP
4239+.nf
4240+\f[C]
4241+pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
4242+\f[]
4243+.fi
4244+.PP
4245+writes HTML with the Haskell code in bird tracks, so it can be copied
4246+and pasted as literate Haskell source.
4247+.SH SYNTAX HIGHLIGHTING
4248+.PP
4249+Pandoc will automatically highlight syntax in fenced code blocks that
4250+are marked with a language name.
4251+(See [Extension: \f[C]inline_code_attributes\f[]] and [Extension:
4252+\f[C]fenced_code_attributes\f[]], above.) The Haskell library
4253+highlighting\-kate is used for highlighting, which works in HTML, Docx,
4254+and LaTeX/PDF output.
4255+The color scheme can be selected using the \f[C]\-\-highlight\-style\f[]
4256+option.
4257+The default color scheme is \f[C]pygments\f[], which imitates the
4258+default color scheme used by the Python library pygments, but pygments
4259+is not actually used to do the highlighting.
4260+.PP
4261+To see a list of language names that pandoc will recognize, type
4262+\f[C]pandoc\ \-\-version\f[].
4263+.PP
4264+To disable highlighting, use the \f[C]\-\-no\-highlight\f[] option.
4265+.SH CUSTOM WRITERS
4266+.PP
4267+Pandoc can be extended with custom writers written in lua.
4268+(Pandoc includes a lua interpreter, so lua need not be installed
4269+separately.)
4270+.PP
4271+To use a custom writer, simply specify the path to the lua script in
4272+place of the output format.
4273+For example:
4274+.IP
4275+.nf
4276+\f[C]
4277+pandoc\ \-t\ data/sample.lua
4278+\f[]
4279+.fi
4280+.PP
4281+Creating a custom writer requires writing a lua function for each
4282+possible element in a pandoc document.
4283+To get a documented example which you can modify according to your
4284+needs, do
4285+.IP
4286+.nf
4287+\f[C]
4288+pandoc\ \-\-print\-default\-data\-file\ sample.lua
4289+\f[]
4290+.fi
4291+.SH AUTHORS
4292+.PP
4293+© 2006\-2015 John MacFarlane (jgm\@berkeley.edu).
4294+Released under the GPL, version 2 or greater.
4295+This software carries no warranty of any kind.
4296+(See COPYRIGHT for full copyright and warranty notices.)
4297+.PP
4298+Contributors include Aaron Wolen, Albert Krewinkel, Alexander
4299+Kondratskiy, Alexander Sulfrian, Alexander V Vershilov, Alfred
4300+Wechselberger, Andreas Lööw, Antoine Latter, Arlo O\[aq]Keeffe, Artyom
4301+Kazak, Ben Gamari, Beni Cherniavsky\-Paskin, Bjorn Buckwalter, Bradley
4302+Kuhn, Brent Yorgey, Bryan O\[aq]Sullivan, B.
4303+Scott Michel, Caleb McDaniel, Calvin Beck, Christoffer Ackelman,
4304+Christoffer Sawicki, Clare Macrae, Clint Adams, Conal Elliott, Craig S.
4305+Bosma, Daniel Bergey, Daniel T.
4306+Staal, David Lazar, David Röthlisberger, Denis Laxalde, Douglas Calvert,
4307+Douglas F.
4308+Calvert, Eric Kow, Eric Seidel, Florian Eitel, François Gannaz, Freiric
4309+Barral, Fyodor Sheremetyev, Gabor Pali, Gavin Beatty, Greg Maslov,
4310+Grégory Bataille, Greg Rundlett, gwern, Gwern Branwen, Hans\-Peter
4311+Deifel, Henry de Valence, Ilya V.
4312+Portnov, infinity0x, Jaime Marquínez Ferrándiz, James Aspnes, Jamie F.
4313+Olson, Jason Ronallo, Jeff Arnold, Jeff Runningen, Jens Petersen, Jérémy
4314+Bobbio, Jesse Rosenthal, J.
4315+Lewis Muir, Joe Hillenbrand, John MacFarlane, Jonas Smedegaard, Jonathan
4316+Daugherty, Josef Svenningsson, Jose Luis Duran, Julien Cretel, Justin
4317+Bogner, Kelsey Hightower, Konstantin Zudov, Lars\-Dominik Braun, Luke
4318+Plant, Mark Szepieniec, Mark Wright, Masayoshi Takahashi, Matej Kollar,
4319+Mathias Schenner, Matthew Pickering, Matthias C.
4320+M.
4321+Troffaes, Max Bolingbroke, Max Rydahl Andersen, mb21, Merijn
4322+Verstraaten, Michael Snoyman, Michael Thompson, MinRK, Nathan Gass, Neil
4323+Mayhew, Nick Bart, Nicolas Kaiser, Nikolay Yakimov, Paulo Tanimoto, Paul
4324+Rivier, Peter Wang, Philippe Ombredanne, Phillip Alday, Puneeth
4325+Chaganti, qerub, Ralf Stephan, Recai Oktaş, rodja.trappe, RyanGlScott,
4326+Scott Morrison, Sergei Trofimovich, Sergey Astanin, Shahbaz Youssefi,
4327+Shaun Attfield, shreevatsa.public, Simon Hengel, Sumit Sahrawat,
4328+takahashim, thsutton, Tim Lin, Timothy Humphries, Todd Sifleet, Tom
4329+Leese, Uli Köhler, Václav Zeman, Viktor Kronvall, Vincent, and Wikiwide.
4330+.PP
4331+The Pandoc source code and all documentation may be downloaded
4332+from <http://pandoc.org>.
pandoc.cabal+1−1
@@ -109,6 +109,7 @@ Data-Files:
109109Extra-Source-Files:
110110 -- documentation
111111 INSTALL, BUGS, CONTRIBUTING.md, changelog
112+ man/pandoc.1
112113 -- files needed to build man page
113114 man/capitalizeHeaders.hs
114115 man/removeNotes.hs
@@ -209,7 +210,6 @@ Extra-Source-Files:
209210 tests/epub/*.native
210211 tests/txt2tags.t2t
211212 tests/twiki-reader.twiki
212−Extra-Tmp-Files: man/pandoc.1
213213
214214Source-repository head
215215 type: git