git.iko.soy/typeable/pandoc
on 2.0.6 help sign in
5596 lines 166 kB history raw
1.\"t
2.TH PANDOC 1 "December 27, 2017" "pandoc 2.0.6"
3.SH NAME
4pandoc - 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
10Pandoc is a Haskell library for converting from one markup format to
11another, and a command\-line tool that uses this library.
12It can read Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored
13Markdown, MultiMarkdown, and (subsets of) Textile, reStructuredText,
14HTML, LaTeX, MediaWiki markup, TWiki markup, TikiWiki markup, Creole
151.0, Haddock markup, OPML, Emacs Org mode, DocBook, JATS, Muse,
16txt2tags, Vimwiki, EPUB, ODT, and Word docx; and it can write plain
17text, Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored
18Markdown, MultiMarkdown, reStructuredText, XHTML, HTML5, LaTeX
19(including \f[C]beamer\f[] slide shows), ConTeXt, RTF, OPML, DocBook,
20JATS, OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup,
21DokuWiki markup, ZimWiki markup, Haddock markup, EPUB (v2 or v3),
22FictionBook2, Textile, groff man, groff ms, Emacs Org mode, AsciiDoc,
23InDesign ICML, TEI Simple, Muse, PowerPoint slide shows and Slidy,
24Slideous, DZSlides, reveal.js or S5 HTML slide shows.
25It can also produce PDF output on systems where LaTeX, ConTeXt,
26\f[C]pdfroff\f[], \f[C]wkhtmltopdf\f[], \f[C]prince\f[], or
27\f[C]weasyprint\f[] is installed.
28.PP
29Pandoc\[aq]s enhanced version of Markdown includes syntax for footnotes,
30tables, flexible ordered lists, definition lists, fenced code blocks,
31superscripts and subscripts, strikeout, metadata blocks, automatic
32tables of contents, embedded LaTeX math, citations, and Markdown inside
33HTML block elements.
34(These enhancements, described further under Pandoc\[aq]s Markdown, can
35be disabled using the \f[C]markdown_strict\f[] input or output format.)
36.PP
37In contrast to most existing tools for converting Markdown to HTML,
38which use regex substitutions, pandoc has a modular design: it consists
39of a set of readers, which parse text in a given format and produce a
40native representation of the document, and a set of writers, which
41convert this native representation into a target format.
42Thus, adding an input or output format requires only adding a reader or
43writer.
44.PP
45Because pandoc\[aq]s intermediate representation of a document is less
46expressive than many of the formats it converts between, one should not
47expect perfect conversions between every format and every other.
48Pandoc attempts to preserve the structural elements of a document, but
49not formatting details such as margin size.
50And some document elements, such as complex tables, may not fit into
51pandoc\[aq]s simple document model.
52While conversions from pandoc\[aq]s Markdown to all formats aspire to be
53perfect, conversions from formats more expressive than pandoc\[aq]s
54Markdown can be expected to be lossy.
55.SS Using \f[C]pandoc\f[]
56.PP
57If no \f[I]input\-file\f[] is specified, input is read from
58\f[I]stdin\f[].
59Otherwise, the \f[I]input\-files\f[] are concatenated (with a blank line
60between each) and used as input.
61Output goes to \f[I]stdout\f[] by default (though output to the terminal
62is disabled for the \f[C]odt\f[], \f[C]docx\f[], \f[C]epub2\f[], and
63\f[C]epub3\f[] output formats, unless it is forced using
64\f[C]\-o\ \-\f[]).
65For output to a file, use the \f[C]\-o\f[] option:
66.IP
67.nf
68\f[C]
69pandoc\ \-o\ output.html\ input.txt
70\f[]
71.fi
72.PP
73By default, pandoc produces a document fragment, not a standalone
74document with a proper header and footer.
75To produce a standalone document, use the \f[C]\-s\f[] or
76\f[C]\-\-standalone\f[] flag:
77.IP
78.nf
79\f[C]
80pandoc\ \-s\ \-o\ output.html\ input.txt
81\f[]
82.fi
83.PP
84For more information on how standalone documents are produced, see
85Templates, below.
86.PP
87Instead of a file, an absolute URI may be given.
88In this case pandoc will fetch the content using HTTP:
89.IP
90.nf
91\f[C]
92pandoc\ \-f\ html\ \-t\ markdown\ http://www.fsf.org
93\f[]
94.fi
95.PP
96It is possible to supply a custom User\-Agent string or other header
97when requesting a document from a URL:
98.IP
99.nf
100\f[C]
101pandoc\ \-f\ html\ \-t\ markdown\ \-\-request\-header\ User\-Agent:"Mozilla/5.0"\ \\
102\ \ http://www.fsf.org
103\f[]
104.fi
105.PP
106If multiple input files are given, \f[C]pandoc\f[] will concatenate them
107all (with blank lines between them) before parsing.
108This feature is disabled for binary input formats such as \f[C]EPUB\f[],
109\f[C]odt\f[], and \f[C]docx\f[].
110.PP
111The format of the input and output can be specified explicitly using
112command\-line options.
113The input format can be specified using the \f[C]\-r/\-\-read\f[] or
114\f[C]\-f/\-\-from\f[] options, the output format using the
115\f[C]\-w/\-\-write\f[] or \f[C]\-t/\-\-to\f[] options.
116Thus, to convert \f[C]hello.txt\f[] from Markdown to LaTeX, you could
117type:
118.IP
119.nf
120\f[C]
121pandoc\ \-f\ markdown\ \-t\ latex\ hello.txt
122\f[]
123.fi
124.PP
125To convert \f[C]hello.html\f[] from HTML to Markdown:
126.IP
127.nf
128\f[C]
129pandoc\ \-f\ html\ \-t\ markdown\ hello.html
130\f[]
131.fi
132.PP
133Supported output formats are listed below under the \f[C]\-t/\-\-to\f[]
134option.
135Supported input formats are listed below under the \f[C]\-f/\-\-from\f[]
136option.
137Note that the \f[C]rst\f[], \f[C]textile\f[], \f[C]latex\f[], and
138\f[C]html\f[] readers are not complete; there are some constructs that
139they do not parse.
140.PP
141If the input or output format is not specified explicitly,
142\f[C]pandoc\f[] will attempt to guess it from the extensions of the
143input and output filenames.
144Thus, for example,
145.IP
146.nf
147\f[C]
148pandoc\ \-o\ hello.tex\ hello.txt
149\f[]
150.fi
151.PP
152will convert \f[C]hello.txt\f[] from Markdown to LaTeX.
153If no output file is specified (so that output goes to \f[I]stdout\f[]),
154or if the output file\[aq]s extension is unknown, the output format will
155default to HTML.
156If no input file is specified (so that input comes from \f[I]stdin\f[]),
157or if the input files\[aq] extensions are unknown, the input format will
158be assumed to be Markdown unless explicitly specified.
159.PP
160Pandoc uses the UTF\-8 character encoding for both input and output.
161If your local character encoding is not UTF\-8, you should pipe input
162and output through \f[C]iconv\f[]:
163.IP
164.nf
165\f[C]
166iconv\ \-t\ utf\-8\ input.txt\ |\ pandoc\ |\ iconv\ \-f\ utf\-8
167\f[]
168.fi
169.PP
170Note that in some output formats (such as HTML, LaTeX, ConTeXt, RTF,
171OPML, DocBook, and Texinfo), information about the character encoding is
172included in the document header, which will only be included if you use
173the \f[C]\-s/\-\-standalone\f[] option.
174.SS Creating a PDF
175.PP
176To produce a PDF, specify an output file with a \f[C]\&.pdf\f[]
177extension.
178By default, pandoc will use LaTeX to create the PDF:
179.IP
180.nf
181\f[C]
182pandoc\ test.txt\ \-o\ test.pdf
183\f[]
184.fi
185.PP
186Production of a PDF requires that a LaTeX engine be installed (see
187\f[C]\-\-pdf\-engine\f[], below), and assumes that the following LaTeX
188packages are available: \f[C]amsfonts\f[], \f[C]amsmath\f[],
189\f[C]lm\f[], \f[C]unicode\-math\f[], \f[C]ifxetex\f[],
190\f[C]ifluatex\f[], \f[C]listings\f[] (if the \f[C]\-\-listings\f[]
191option is used), \f[C]fancyvrb\f[], \f[C]longtable\f[],
192\f[C]booktabs\f[], \f[C]graphicx\f[] and \f[C]grffile\f[] (if the
193document contains images), \f[C]hyperref\f[], \f[C]xcolor\f[] (with
194\f[C]colorlinks\f[]), \f[C]ulem\f[], \f[C]geometry\f[] (with the
195\f[C]geometry\f[] variable set), \f[C]setspace\f[] (with
196\f[C]linestretch\f[]), and \f[C]babel\f[] (with \f[C]lang\f[]).
197The use of \f[C]xelatex\f[] or \f[C]lualatex\f[] as the LaTeX engine
198requires \f[C]fontspec\f[].
199\f[C]xelatex\f[] uses \f[C]polyglossia\f[] (with \f[C]lang\f[]),
200\f[C]xecjk\f[], and \f[C]bidi\f[] (with the \f[C]dir\f[] variable set).
201If the \f[C]mathspec\f[] variable is set, \f[C]xelatex\f[] will use
202\f[C]mathspec\f[] instead of \f[C]unicode\-math\f[].
203The \f[C]upquote\f[] and \f[C]microtype\f[] packages are used if
204available, and \f[C]csquotes\f[] will be used for typography if added to
205the template or included in any header file.
206The \f[C]natbib\f[], \f[C]biblatex\f[], \f[C]bibtex\f[], and
207\f[C]biber\f[] packages can optionally be used for citation rendering.
208These are included with all recent versions of TeX Live.
209.PP
210Alternatively, pandoc can use ConTeXt, \f[C]pdfroff\f[], or any of the
211following HTML/CSS\-to\-PDF\-engines, to create a PDF:
212\f[C]wkhtmltopdf\f[], \f[C]weasyprint\f[] or \f[C]prince\f[].
213To do this, specify an output file with a \f[C]\&.pdf\f[] extension, as
214before, but add the \f[C]\-\-pdf\-engine\f[] option or
215\f[C]\-t\ context\f[], \f[C]\-t\ html\f[], or \f[C]\-t\ ms\f[] to the
216command line (\f[C]\-t\ html\f[] defaults to
217\f[C]\-\-pdf\-engine=wkhtmltopdf\f[]).
218.PP
219PDF output can be controlled using variables for LaTeX (if LaTeX is
220used) and variables for ConTeXt (if ConTeXt is used).
221When using an HTML/CSS\-to\-PDF\-engine, \f[C]\-\-css\f[] affects the
222output.
223If \f[C]wkhtmltopdf\f[] is used, then the variables
224\f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[],
225\f[C]margin\-bottom\f[], and \f[C]papersize\f[] will affect the output.
226.SH OPTIONS
227.SS General options
228.TP
229.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[]
230Specify input format.
231\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[]
232(JSON version of native AST), \f[C]markdown\f[] (pandoc\[aq]s extended
233Markdown), \f[C]markdown_strict\f[] (original unextended Markdown),
234\f[C]markdown_phpextra\f[] (PHP Markdown Extra), \f[C]markdown_mmd\f[]
235(MultiMarkdown), \f[C]gfm\f[] (GitHub\-Flavored Markdown),
236\f[C]commonmark\f[] (CommonMark Markdown), \f[C]textile\f[] (Textile),
237\f[C]rst\f[] (reStructuredText), \f[C]html\f[] (HTML), \f[C]docbook\f[]
238(DocBook), \f[C]t2t\f[] (txt2tags), \f[C]docx\f[] (docx), \f[C]odt\f[]
239(ODT), \f[C]epub\f[] (EPUB), \f[C]opml\f[] (OPML), \f[C]org\f[] (Emacs
240Org mode), \f[C]mediawiki\f[] (MediaWiki markup), \f[C]twiki\f[] (TWiki
241markup), \f[C]tikiwiki\f[] (TikiWiki markup), \f[C]creole\f[] (Creole
2421.0), \f[C]haddock\f[] (Haddock markup), or \f[C]latex\f[] (LaTeX).
243(\f[C]markdown_github\f[] provides deprecated and less accurate support
244for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless
245you need to use extensions other than \f[C]smart\f[].) Extensions can be
246individually enabled or disabled by appending \f[C]+EXTENSION\f[] or
247\f[C]\-EXTENSION\f[] to the format name.
248See Extensions below, for a list of extensions and their names.
249See \f[C]\-\-list\-input\-formats\f[] and \f[C]\-\-list\-extensions\f[],
250below.
251.RS
252.RE
253.TP
254.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[]
255Specify output format.
256\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[]
257(JSON version of native AST), \f[C]plain\f[] (plain text),
258\f[C]markdown\f[] (pandoc\[aq]s extended Markdown),
259\f[C]markdown_strict\f[] (original unextended Markdown),
260\f[C]markdown_phpextra\f[] (PHP Markdown Extra), \f[C]markdown_mmd\f[]
261(MultiMarkdown), \f[C]gfm\f[] (GitHub\-Flavored Markdown),
262\f[C]commonmark\f[] (CommonMark Markdown), \f[C]rst\f[]
263(reStructuredText), \f[C]html4\f[] (XHTML 1.0 Transitional),
264\f[C]html\f[] or \f[C]html5\f[] (HTML5/XHTML polyglot markup),
265\f[C]latex\f[] (LaTeX), \f[C]beamer\f[] (LaTeX beamer slide show),
266\f[C]context\f[] (ConTeXt), \f[C]man\f[] (groff man), \f[C]mediawiki\f[]
267(MediaWiki markup), \f[C]dokuwiki\f[] (DokuWiki markup),
268\f[C]zimwiki\f[] (ZimWiki markup), \f[C]textile\f[] (Textile),
269\f[C]org\f[] (Emacs Org mode), \f[C]texinfo\f[] (GNU Texinfo),
270\f[C]opml\f[] (OPML), \f[C]docbook\f[] or \f[C]docbook4\f[] (DocBook 4),
271\f[C]docbook5\f[] (DocBook 5), \f[C]jats\f[] (JATS XML),
272\f[C]opendocument\f[] (OpenDocument), \f[C]odt\f[] (OpenOffice text
273document), \f[C]docx\f[] (Word docx), \f[C]haddock\f[] (Haddock markup),
274\f[C]rtf\f[] (rich text format), \f[C]epub2\f[] (EPUB v2 book),
275\f[C]epub\f[] or \f[C]epub3\f[] (EPUB v3), \f[C]fb2\f[] (FictionBook2
276e\-book), \f[C]asciidoc\f[] (AsciiDoc), \f[C]icml\f[] (InDesign ICML),
277\f[C]tei\f[] (TEI Simple), \f[C]slidy\f[] (Slidy HTML and JavaScript
278slide show), \f[C]slideous\f[] (Slideous HTML and JavaScript slide
279show), \f[C]dzslides\f[] (DZSlides HTML5 + JavaScript slide show),
280\f[C]revealjs\f[] (reveal.js HTML5 + JavaScript slide show), \f[C]s5\f[]
281(S5 HTML and JavaScript slide show), \f[C]pptx\f[] (PowerPoint slide
282show) or the path of a custom lua writer (see Custom writers, below).
283(\f[C]markdown_github\f[] provides deprecated and less accurate support
284for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless
285you use extensions that do not work with \f[C]gfm\f[].) Note that
286\f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will not be
287directed to \f[I]stdout\f[]; an output filename must be specified using
288the \f[C]\-o/\-\-output\f[] option.
289Extensions can be individually enabled or disabled by appending
290\f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format name.
291See Extensions below, for a list of extensions and their names.
292See \f[C]\-\-list\-output\-formats\f[] and
293\f[C]\-\-list\-extensions\f[], below.
294.RS
295.RE
296.TP
297.B \f[C]\-o\f[] \f[I]FILE\f[], \f[C]\-\-output=\f[]\f[I]FILE\f[]
298Write output to \f[I]FILE\f[] instead of \f[I]stdout\f[].
299If \f[I]FILE\f[] is \f[C]\-\f[], output will go to \f[I]stdout\f[], even
300if a non\-textual format (\f[C]docx\f[], \f[C]odt\f[], \f[C]epub2\f[],
301\f[C]epub3\f[]) is specified.
302.RS
303.RE
304.TP
305.B \f[C]\-\-data\-dir=\f[]\f[I]DIRECTORY\f[]
306Specify the user data directory to search for pandoc data files.
307If this option is not specified, the default user data directory will be
308used.
309This is, in UNIX:
310.RS
311.IP
312.nf
313\f[C]
314$HOME/.pandoc
315\f[]
316.fi
317.PP
318in Windows XP:
319.IP
320.nf
321\f[C]
322C:\\Documents\ And\ Settings\\USERNAME\\Application\ Data\\pandoc
323\f[]
324.fi
325.PP
326and in Windows Vista or later:
327.IP
328.nf
329\f[C]
330C:\\Users\\USERNAME\\AppData\\Roaming\\pandoc
331\f[]
332.fi
333.PP
334You can find the default user data directory on your system by looking
335at the output of \f[C]pandoc\ \-\-version\f[].
336A \f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]epub.css\f[],
337\f[C]templates\f[], \f[C]slidy\f[], \f[C]slideous\f[], or \f[C]s5\f[]
338directory placed in this directory will override pandoc\[aq]s normal
339defaults.
340.RE
341.TP
342.B \f[C]\-\-bash\-completion\f[]
343Generate a bash completion script.
344To enable bash completion with pandoc, add this to your
345\f[C]\&.bashrc\f[]:
346.RS
347.IP
348.nf
349\f[C]
350\ eval\ "$(pandoc\ \-\-bash\-completion)"
351\f[]
352.fi
353.RE
354.TP
355.B \f[C]\-\-verbose\f[]
356Give verbose debugging output.
357Currently this only has an effect with PDF output.
358.RS
359.RE
360.TP
361.B \f[C]\-\-quiet\f[]
362Suppress warning messages.
363.RS
364.RE
365.TP
366.B \f[C]\-\-fail\-if\-warnings\f[]
367Exit with error status if there are any warnings.
368.RS
369.RE
370.TP
371.B \f[C]\-\-log=\f[]\f[I]FILE\f[]
372Write log messages in machine\-readable JSON format to \f[I]FILE\f[].
373All messages above DEBUG level will be written, regardless of verbosity
374settings (\f[C]\-\-verbose\f[], \f[C]\-\-quiet\f[]).
375.RS
376.RE
377.TP
378.B \f[C]\-\-list\-input\-formats\f[]
379List supported input formats, one per line.
380.RS
381.RE
382.TP
383.B \f[C]\-\-list\-output\-formats\f[]
384List supported output formats, one per line.
385.RS
386.RE
387.TP
388.B \f[C]\-\-list\-extensions\f[][\f[C]=\f[]\f[I]FORMAT\f[]]
389List supported Markdown extensions, one per line, preceded by a
390\f[C]+\f[] or \f[C]\-\f[] indicating whether it is enabled by default in
391\f[I]FORMAT\f[].
392If \f[I]FORMAT\f[] is not specified, defaults for pandoc\[aq]s Markdown
393are given.
394.RS
395.RE
396.TP
397.B \f[C]\-\-list\-highlight\-languages\f[]
398List supported languages for syntax highlighting, one per line.
399.RS
400.RE
401.TP
402.B \f[C]\-\-list\-highlight\-styles\f[]
403List supported styles for syntax highlighting, one per line.
404See \f[C]\-\-highlight\-style\f[].
405.RS
406.RE
407.TP
408.B \f[C]\-v\f[], \f[C]\-\-version\f[]
409Print version.
410.RS
411.RE
412.TP
413.B \f[C]\-h\f[], \f[C]\-\-help\f[]
414Show usage message.
415.RS
416.RE
417.SS Reader options
418.TP
419.B \f[C]\-\-base\-header\-level=\f[]\f[I]NUMBER\f[]
420Specify the base level for headers (defaults to 1).
421.RS
422.RE
423.TP
424.B \f[C]\-\-strip\-empty\-paragraphs\f[]
425\f[I]Deprecated. Use the \f[CI]+empty_paragraphs\f[I] extension
426instead.\f[] Ignore paragraphs with no content.
427This option is useful for converting word processing documents where
428users have used empty paragraphs to create inter\-paragraph space.
429.RS
430.RE
431.TP
432.B \f[C]\-\-indented\-code\-classes=\f[]\f[I]CLASSES\f[]
433Specify classes to use for indented code blocks\-\-for example,
434\f[C]perl,numberLines\f[] or \f[C]haskell\f[].
435Multiple classes may be separated by spaces or commas.
436.RS
437.RE
438.TP
439.B \f[C]\-\-default\-image\-extension=\f[]\f[I]EXTENSION\f[]
440Specify a default extension to use when image paths/URLs have no
441extension.
442This allows you to use the same source for formats that require
443different kinds of images.
444Currently this option only affects the Markdown and LaTeX readers.
445.RS
446.RE
447.TP
448.B \f[C]\-\-file\-scope\f[]
449Parse each file individually before combining for multifile documents.
450This will allow footnotes in different files with the same identifiers
451to work as expected.
452If this option is set, footnotes and links will not work across files.
453Reading binary files (docx, odt, epub) implies \f[C]\-\-file\-scope\f[].
454.RS
455.RE
456.TP
457.B \f[C]\-\-filter=\f[]\f[I]PROGRAM\f[]
458Specify an executable to be used as a filter transforming the pandoc AST
459after the input is parsed and before the output is written.
460The executable should read JSON from stdin and write JSON to stdout.
461The JSON must be formatted like pandoc\[aq]s own JSON input and output.
462The name of the output format will be passed to the filter as the first
463argument.
464Hence,
465.RS
466.IP
467.nf
468\f[C]
469pandoc\ \-\-filter\ ./caps.py\ \-t\ latex
470\f[]
471.fi
472.PP
473is equivalent to
474.IP
475.nf
476\f[C]
477pandoc\ \-t\ json\ |\ ./caps.py\ latex\ |\ pandoc\ \-f\ json\ \-t\ latex
478\f[]
479.fi
480.PP
481The latter form may be useful for debugging filters.
482.PP
483Filters may be written in any language.
484\f[C]Text.Pandoc.JSON\f[] exports \f[C]toJSONFilter\f[] to facilitate
485writing filters in Haskell.
486Those who would prefer to write filters in python can use the module
487\f[C]pandocfilters\f[], installable from PyPI.
488There are also pandoc filter libraries in PHP, perl, and
489JavaScript/node.js.
490.PP
491In order of preference, pandoc will look for filters in
492.IP "1." 3
493a specified full or relative path (executable or non\-executable)
494.IP "2." 3
495\f[C]$DATADIR/filters\f[] (executable or non\-executable) where
496\f[C]$DATADIR\f[] is the user data directory (see
497\f[C]\-\-data\-dir\f[], above).
498.IP "3." 3
499\f[C]$PATH\f[] (executable only)
500.RE
501.TP
502.B \f[C]\-\-lua\-filter=\f[]\f[I]SCRIPT\f[]
503Transform the document in a similar fashion as JSON filters (see
504\f[C]\-\-filter\f[]), but use pandoc\[aq]s build\-in lua filtering
505system.
506The given lua script is expected to return a list of lua filters which
507will be applied in order.
508Each lua filter must contain element\-transforming functions indexed by
509the name of the AST element on which the filter function should be
510applied.
511.RS
512.PP
513The \f[C]pandoc\f[] lua module provides helper functions for element
514creation.
515It is always loaded into the script\[aq]s lua environment.
516.PP
517The following is an example lua script for macro\-expansion:
518.IP
519.nf
520\f[C]
521function\ expand_hello_world(inline)
522\ \ if\ inline.c\ ==\ \[aq]{{helloworld}}\[aq]\ then
523\ \ \ \ return\ pandoc.Emph{\ pandoc.Str\ "Hello,\ World"\ }
524\ \ else
525\ \ \ \ return\ inline
526\ \ end
527end
529return\ {{Str\ =\ expand_hello_world}}
530\f[]
531.fi
532.RE
533.TP
534.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[]]
535Set the metadata field \f[I]KEY\f[] to the value \f[I]VAL\f[].
536A value specified on the command line overrides a value specified in the
537document.
538Values will be parsed as YAML boolean or string values.
539If no value is specified, the value will be treated as Boolean true.
540Like \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] causes template
541variables to be set.
542But unlike \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] affects the
543metadata of the underlying document (which is accessible from filters
544and may be printed in some output formats).
545.RS
546.RE
547.TP
548.B \f[C]\-p\f[], \f[C]\-\-preserve\-tabs\f[]
549Preserve tabs instead of converting them to spaces (the default).
550Note that this will only affect tabs in literal code spans and code
551blocks; tabs in regular text will be treated as spaces.
552.RS
553.RE
554.TP
555.B \f[C]\-\-tab\-stop=\f[]\f[I]NUMBER\f[]
556Specify the number of spaces per tab (default is 4).
557.RS
558.RE
559.TP
560.B \f[C]\-\-track\-changes=accept\f[]|\f[C]reject\f[]|\f[C]all\f[]
561Specifies what to do with insertions, deletions, and comments produced
562by the MS Word "Track Changes" feature.
563\f[C]accept\f[] (the default), inserts all insertions, and ignores all
564deletions.
565\f[C]reject\f[] inserts all deletions and ignores insertions.
566Both \f[C]accept\f[] and \f[C]reject\f[] ignore comments.
567\f[C]all\f[] puts in insertions, deletions, and comments, wrapped in
568spans with \f[C]insertion\f[], \f[C]deletion\f[],
569\f[C]comment\-start\f[], and \f[C]comment\-end\f[] classes,
570respectively.
571The author and time of change is included.
572\f[C]all\f[] is useful for scripting: only accepting changes from a
573certain reviewer, say, or before a certain date.
574This option only affects the docx reader.
575.RS
576.RE
577.TP
578.B \f[C]\-\-extract\-media=\f[]\f[I]DIR\f[]
579Extract images and other media contained in or linked from the source
580document to the path \f[I]DIR\f[], creating it if necessary, and adjust
581the images references in the document so they point to the extracted
582files.
583If the source format is a binary container (docx, epub, or odt), the
584media is extracted from the container and the original filenames are
585used.
586Otherwise the media is read from the file system or downloaded, and new
587filenames are constructed based on SHA1 hashes of the contents.
588.RS
589.RE
590.TP
591.B \f[C]\-\-abbreviations=\f[]\f[I]FILE\f[]
592Specifies a custom abbreviations file, with abbreviations one to a line.
593If this option is not specified, pandoc will read the data file
594\f[C]abbreviations\f[] from the user data directory or fall back on a
595system default.
596To see the system default, use
597\f[C]pandoc\ \-\-print\-default\-data\-file=abbreviations\f[].
598The only use pandoc makes of this list is in the Markdown reader.
599Strings ending in a period that are found in this list will be followed
600by a nonbreaking space, so that the period will not produce
601sentence\-ending space in formats like LaTeX.
602.RS
603.RE
604.SS General writer options
605.TP
606.B \f[C]\-s\f[], \f[C]\-\-standalone\f[]
607Produce output with an appropriate header and footer (e.g.
608a standalone HTML, LaTeX, TEI, or RTF file, not a fragment).
609This option is set automatically for \f[C]pdf\f[], \f[C]epub\f[],
610\f[C]epub3\f[], \f[C]fb2\f[], \f[C]docx\f[], and \f[C]odt\f[] output.
611.RS
612.RE
613.TP
614.B \f[C]\-\-template=\f[]\f[I]FILE\f[]
615Use \f[I]FILE\f[] as a custom template for the generated document.
616Implies \f[C]\-\-standalone\f[].
617See Templates, below, for a description of template syntax.
618If no extension is specified, an extension corresponding to the writer
619will be added, so that \f[C]\-\-template=special\f[] looks for
620\f[C]special.html\f[] for HTML output.
621If the template is not found, pandoc will search for it in the
622\f[C]templates\f[] subdirectory of the user data directory (see
623\f[C]\-\-data\-dir\f[]).
624If this option is not used, a default template appropriate for the
625output format will be used (see
626\f[C]\-D/\-\-print\-default\-template\f[]).
627.RS
628.RE
629.TP
630.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[]]
631Set the template variable \f[I]KEY\f[] to the value \f[I]VAL\f[] when
632rendering the document in standalone mode.
633This is generally only useful when the \f[C]\-\-template\f[] option is
634used to specify a custom template, since pandoc automatically sets the
635variables used in the default templates.
636If no \f[I]VAL\f[] is specified, the key will be given the value
637\f[C]true\f[].
638.RS
639.RE
640.TP
641.B \f[C]\-D\f[] \f[I]FORMAT\f[], \f[C]\-\-print\-default\-template=\f[]\f[I]FORMAT\f[]
642Print the system default template for an output \f[I]FORMAT\f[].
643(See \f[C]\-t\f[] for a list of possible \f[I]FORMAT\f[]s.) Templates in
644the user data directory are ignored.
645.RS
646.RE
647.TP
648.B \f[C]\-\-print\-default\-data\-file=\f[]\f[I]FILE\f[]
649Print a system default data file.
650Files in the user data directory are ignored.
651.RS
652.RE
653.TP
654.B \f[C]\-\-eol=crlf\f[]|\f[C]lf\f[]|\f[C]native\f[]
655Manually specify line endings: \f[C]crlf\f[] (Windows), \f[C]lf\f[]
656(macOS/Linux/UNIX), or \f[C]native\f[] (line endings appropriate to the
657OS on which pandoc is being run).
658The default is \f[C]native\f[].
659.RS
660.RE
661.TP
662.B \f[C]\-\-dpi\f[]=\f[I]NUMBER\f[]
663Specify the dpi (dots per inch) value for conversion from pixels to
664inch/centimeters and vice versa.
665The default is 96dpi.
666Technically, the correct term would be ppi (pixels per inch).
667.RS
668.RE
669.TP
670.B \f[C]\-\-wrap=auto\f[]|\f[C]none\f[]|\f[C]preserve\f[]
671Determine how text is wrapped in the output (the source code, not the
672rendered version).
673With \f[C]auto\f[] (the default), pandoc will attempt to wrap lines to
674the column width specified by \f[C]\-\-columns\f[] (default 72).
675With \f[C]none\f[], pandoc will not wrap lines at all.
676With \f[C]preserve\f[], pandoc will attempt to preserve the wrapping
677from the source document (that is, where there are nonsemantic newlines
678in the source, there will be nonsemantic newlines in the output as
679well).
680Automatic wrapping does not currently work in HTML output.
681.RS
682.RE
683.TP
684.B \f[C]\-\-columns=\f[]\f[I]NUMBER\f[]
685Specify length of lines in characters.
686This affects text wrapping in the generated source code (see
687\f[C]\-\-wrap\f[]).
688It also affects calculation of column widths for plain text tables (see
689Tables below).
690.RS
691.RE
692.TP
693.B \f[C]\-\-toc\f[], \f[C]\-\-table\-of\-contents\f[]
694Include an automatically generated table of contents (or, in the case of
695\f[C]latex\f[], \f[C]context\f[], \f[C]docx\f[], \f[C]odt\f[],
696\f[C]opendocument\f[], \f[C]rst\f[], or \f[C]ms\f[], an instruction to
697create one) in the output document.
698This option has no effect on \f[C]man\f[], \f[C]docbook4\f[],
699\f[C]docbook5\f[], or \f[C]jats\f[] output.
700.RS
701.RE
702.TP
703.B \f[C]\-\-toc\-depth=\f[]\f[I]NUMBER\f[]
704Specify the number of section levels to include in the table of
705contents.
706The default is 3 (which means that level 1, 2, and 3 headers will be
707listed in the contents).
708.RS
709.RE
710.TP
711.B \f[C]\-\-strip\-comments\f[]
712Strip out HTML comments in the Markdown or Textile source, rather than
713passing them on to Markdown, Textile or HTML output as raw HTML.
714This does not apply to HTML comments inside raw HTML blocks when the
715\f[C]markdown_in_html_blocks\f[] extension is not set.
716.RS
717.RE
718.TP
719.B \f[C]\-\-no\-highlight\f[]
720Disables syntax highlighting for code blocks and inlines, even when a
721language attribute is given.
722.RS
723.RE
724.TP
725.B \f[C]\-\-highlight\-style=\f[]\f[I]STYLE\f[]|\f[I]FILE\f[]
726Specifies the coloring style to be used in highlighted source code.
727Options are \f[C]pygments\f[] (the default), \f[C]kate\f[],
728\f[C]monochrome\f[], \f[C]breezeDark\f[], \f[C]espresso\f[],
729\f[C]zenburn\f[], \f[C]haddock\f[], and \f[C]tango\f[].
730For more information on syntax highlighting in pandoc, see Syntax
731highlighting, below.
732See also \f[C]\-\-list\-highlight\-styles\f[].
733.RS
734.PP
735Instead of a \f[I]STYLE\f[] name, a JSON file with extension
736\f[C]\&.theme\f[] may be supplied.
737This will be parsed as a KDE syntax highlighting theme and (if valid)
738used as the highlighting style.
739.PP
740To generate the JSON version of an existing style, use
741\f[C]\-\-print\-highlight\-style\f[].
742.RE
743.TP
744.B \f[C]\-\-print\-highlight\-style=\f[]\f[I]STYLE\f[]|\f[I]FILE\f[]
745Prints a JSON version of a highlighting style, which can be modified,
746saved with a \f[C]\&.theme\f[] extension, and used with
747\f[C]\-\-highlight\-style\f[].
748.RS
749.RE
750.TP
751.B \f[C]\-\-syntax\-definition=\f[]\f[I]FILE\f[]
752Instructs pandoc to load a KDE XML syntax definition file, which will be
753used for syntax highlighting of appropriately marked code blocks.
754This can be used to add support for new languages or to use altered
755syntax definitions for existing languages.
756.RS
757.RE
758.TP
759.B \f[C]\-H\f[] \f[I]FILE\f[], \f[C]\-\-include\-in\-header=\f[]\f[I]FILE\f[]
760Include contents of \f[I]FILE\f[], verbatim, at the end of the header.
761This can be used, for example, to include special CSS or JavaScript in
762HTML documents.
763This option can be used repeatedly to include multiple files in the
764header.
765They will be included in the order specified.
766Implies \f[C]\-\-standalone\f[].
767.RS
768.RE
769.TP
770.B \f[C]\-B\f[] \f[I]FILE\f[], \f[C]\-\-include\-before\-body=\f[]\f[I]FILE\f[]
771Include contents of \f[I]FILE\f[], verbatim, at the beginning of the
772document body (e.g.
773after the \f[C]<body>\f[] tag in HTML, or the \f[C]\\begin{document}\f[]
774command in LaTeX).
775This can be used to include navigation bars or banners in HTML
776documents.
777This option can be used repeatedly to include multiple files.
778They will be included in the order specified.
779Implies \f[C]\-\-standalone\f[].
780.RS
781.RE
782.TP
783.B \f[C]\-A\f[] \f[I]FILE\f[], \f[C]\-\-include\-after\-body=\f[]\f[I]FILE\f[]
784Include contents of \f[I]FILE\f[], verbatim, at the end of the document
785body (before the \f[C]</body>\f[] tag in HTML, or the
786\f[C]\\end{document}\f[] command in LaTeX).
787This option can be used repeatedly to include multiple files.
788They will be included in the order specified.
789Implies \f[C]\-\-standalone\f[].
790.RS
791.RE
792.TP
793.B \f[C]\-\-resource\-path=\f[]\f[I]SEARCHPATH\f[]
794List of paths to search for images and other resources.
795The paths should be separated by \f[C]:\f[] on Linux, UNIX, and macOS
796systems, and by \f[C];\f[] on Windows.
797If \f[C]\-\-resource\-path\f[] is not specified, the default resource
798path is the working directory.
799Note that, if \f[C]\-\-resource\-path\f[] is specified, the working
800directory must be explicitly listed or it will not be searched.
801For example: \f[C]\-\-resource\-path=.:test\f[] will search the working
802directory and the \f[C]test\f[] subdirectory, in that order.
803.RS
804.RE
805.TP
806.B \f[C]\-\-request\-header=\f[]\f[I]NAME\f[]\f[C]:\f[]\f[I]VAL\f[]
807Set the request header \f[I]NAME\f[] to the value \f[I]VAL\f[] when
808making HTTP requests (for example, when a URL is given on the command
809line, or when resources used in a document must be downloaded).
810.RS
811.RE
812.SS Options affecting specific writers
813.TP
814.B \f[C]\-\-self\-contained\f[]
815Produce a standalone HTML file with no external dependencies, using
816\f[C]data:\f[] URIs to incorporate the contents of linked scripts,
817stylesheets, images, and videos.
818The resulting file should be "self\-contained," in the sense that it
819needs no external files and no net access to be displayed properly by a
820browser.
821This option works only with HTML output formats, including
822\f[C]html4\f[], \f[C]html5\f[], \f[C]html+lhs\f[], \f[C]html5+lhs\f[],
823\f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[], \f[C]dzslides\f[], and
824\f[C]revealjs\f[].
825Scripts, images, and stylesheets at absolute URLs will be downloaded;
826those at relative URLs will be sought relative to the working directory
827(if the first source file is local) or relative to the base URL (if the
828first source file is remote).
829Elements with the attribute \f[C]data\-external="1"\f[] will be left
830alone; the documents they link to will not be incorporated in the
831document.
832Limitation: resources that are loaded dynamically through JavaScript
833cannot be incorporated; as a result, \f[C]\-\-self\-contained\f[] does
834not work with \f[C]\-\-mathjax\f[], and some advanced features (e.g.
835zoom or speaker notes) may not work in an offline "self\-contained"
836\f[C]reveal.js\f[] slide show.
837.RS
838.RE
839.TP
840.B \f[C]\-\-html\-q\-tags\f[]
841Use \f[C]<q>\f[] tags for quotes in HTML.
842.RS
843.RE
844.TP
845.B \f[C]\-\-ascii\f[]
846Use only ASCII characters in output.
847Currently supported only for HTML and DocBook output (which uses
848numerical entities instead of UTF\-8 when this option is selected).
849.RS
850.RE
851.TP
852.B \f[C]\-\-reference\-links\f[]
853Use reference\-style links, rather than inline links, in writing
854Markdown or reStructuredText.
855By default inline links are used.
856The placement of link references is affected by the
857\f[C]\-\-reference\-location\f[] option.
858.RS
859.RE
860.TP
861.B \f[C]\-\-reference\-location\ =\ block\f[]|\f[C]section\f[]|\f[C]document\f[]
862Specify whether footnotes (and references, if \f[C]reference\-links\f[]
863is set) are placed at the end of the current (top\-level) block, the
864current section, or the document.
865The default is \f[C]document\f[].
866Currently only affects the markdown writer.
867.RS
868.RE
869.TP
870.B \f[C]\-\-atx\-headers\f[]
871Use ATX\-style headers in Markdown and AsciiDoc output.
872The default is to use setext\-style headers for levels 1\-2, and then
873ATX headers.
874(Note: for \f[C]gfm\f[] output, ATX headers are always used.)
875.RS
876.RE
877.TP
878.B \f[C]\-\-top\-level\-division=[default|section|chapter|part]\f[]
879Treat top\-level headers as the given division type in LaTeX, ConTeXt,
880DocBook, and TEI output.
881The hierarchy order is part, chapter, then section; all headers are
882shifted such that the top\-level header becomes the specified type.
883The default behavior is to determine the best division type via
884heuristics: unless other conditions apply, \f[C]section\f[] is chosen.
885When the LaTeX document class is set to \f[C]report\f[], \f[C]book\f[],
886or \f[C]memoir\f[] (unless the \f[C]article\f[] option is specified),
887\f[C]chapter\f[] is implied as the setting for this option.
888If \f[C]beamer\f[] is the output format, specifying either
889\f[C]chapter\f[] or \f[C]part\f[] will cause top\-level headers to
890become \f[C]\\part{..}\f[], while second\-level headers remain as their
891default type.
892.RS
893.RE
894.TP
895.B \f[C]\-N\f[], \f[C]\-\-number\-sections\f[]
896Number section headings in LaTeX, ConTeXt, HTML, or EPUB output.
897By default, sections are not numbered.
898Sections with class \f[C]unnumbered\f[] will never be numbered, even if
899\f[C]\-\-number\-sections\f[] is specified.
900.RS
901.RE
902.TP
903.B \f[C]\-\-number\-offset=\f[]\f[I]NUMBER\f[][\f[C],\f[]\f[I]NUMBER\f[]\f[C],\f[]\f[I]...\f[]]
904Offset for section headings in HTML output (ignored in other output
905formats).
906The first number is added to the section number for top\-level headers,
907the second for second\-level headers, and so on.
908So, for example, if you want the first top\-level header in your
909document to be numbered "6", specify \f[C]\-\-number\-offset=5\f[].
910If your document starts with a level\-2 header which you want to be
911numbered "1.5", specify \f[C]\-\-number\-offset=1,4\f[].
912Offsets are 0 by default.
913Implies \f[C]\-\-number\-sections\f[].
914.RS
915.RE
916.TP
917.B \f[C]\-\-listings\f[]
918Use the \f[C]listings\f[] package for LaTeX code blocks
919.RS
920.RE
921.TP
922.B \f[C]\-i\f[], \f[C]\-\-incremental\f[]
923Make list items in slide shows display incrementally (one by one).
924The default is for lists to be displayed all at once.
925.RS
926.RE
927.TP
928.B \f[C]\-\-slide\-level=\f[]\f[I]NUMBER\f[]
929Specifies that headers with the specified level create slides (for
930\f[C]beamer\f[], \f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[],
931\f[C]dzslides\f[]).
932Headers above this level in the hierarchy are used to divide the slide
933show into sections; headers below this level create subheads within a
934slide.
935Note that content that is not contained under slide\-level headers will
936not appear in the slide show.
937The default is to set the slide level based on the contents of the
938document; see Structuring the slide show.
939.RS
940.RE
941.TP
942.B \f[C]\-\-section\-divs\f[]
943Wrap sections in \f[C]<section>\f[] tags (or \f[C]<div>\f[] tags for
944\f[C]html4\f[]), and attach identifiers to the enclosing
945\f[C]<section>\f[] (or \f[C]<div>\f[]) rather than the header itself.
946See Header identifiers, below.
947.RS
948.RE
949.TP
950.B \f[C]\-\-email\-obfuscation=none\f[]|\f[C]javascript\f[]|\f[C]references\f[]
951Specify a method for obfuscating \f[C]mailto:\f[] links in HTML
952documents.
953\f[C]none\f[] leaves \f[C]mailto:\f[] links as they are.
954\f[C]javascript\f[] obfuscates them using JavaScript.
955\f[C]references\f[] obfuscates them by printing their letters as decimal
956or hexadecimal character references.
957The default is \f[C]none\f[].
958.RS
959.RE
960.TP
961.B \f[C]\-\-id\-prefix=\f[]\f[I]STRING\f[]
962Specify a prefix to be added to all identifiers and internal links in
963HTML and DocBook output, and to footnote numbers in Markdown and Haddock
964output.
965This is useful for preventing duplicate identifiers when generating
966fragments to be included in other pages.
967.RS
968.RE
969.TP
970.B \f[C]\-T\f[] \f[I]STRING\f[], \f[C]\-\-title\-prefix=\f[]\f[I]STRING\f[]
971Specify \f[I]STRING\f[] as a prefix at the beginning of the title that
972appears in the HTML header (but not in the title as it appears at the
973beginning of the HTML body).
974Implies \f[C]\-\-standalone\f[].
975.RS
976.RE
977.TP
978.B \f[C]\-c\f[] \f[I]URL\f[], \f[C]\-\-css=\f[]\f[I]URL\f[]
979Link to a CSS style sheet.
980This option can be used repeatedly to include multiple files.
981They will be included in the order specified.
982.RS
983.PP
984A stylesheet is required for generating EPUB.
985If none is provided using this option (or the \f[C]stylesheet\f[]
986metadata field), pandoc will look for a file \f[C]epub.css\f[] in the
987user data directory (see \f[C]\-\-data\-dir\f[]).
988If it is not found there, sensible defaults will be used.
989.RE
990.TP
991.B \f[C]\-\-reference\-doc=\f[]\f[I]FILE\f[]
992Use the specified file as a style reference in producing a docx or ODT
993file.
994.RS
995.TP
996.B Docx
997For best results, the reference docx should be a modified version of a
998docx file produced using pandoc.
999The contents of the reference docx are ignored, but its stylesheets and
1000document properties (including margins, page size, header, and footer)
1001are used in the new docx.
1002If no reference docx is specified on the command line, pandoc will look
1003for a file \f[C]reference.docx\f[] in the user data directory (see
1004\f[C]\-\-data\-dir\f[]).
1005If this is not found either, sensible defaults will be used.
1006.RS
1007.PP
1008To produce a custom \f[C]reference.docx\f[], first get a copy of the
1009default \f[C]reference.docx\f[]:
1010\f[C]pandoc\ \-\-print\-default\-data\-file\ reference.docx\ >\ custom\-reference.docx\f[].
1011Then open \f[C]custom\-reference.docx\f[] in Word, modify the styles as
1012you wish, and save the file.
1013For best results, do not make changes to this file other than modifying
1014the styles used by pandoc: [paragraph] Normal, Body Text, First
1015Paragraph, Compact, Title, Subtitle, Author, Date, Abstract,
1016Bibliography, Heading 1, Heading 2, Heading 3, Heading 4, Heading 5,
1017Heading 6, Heading 7, Heading 8, Heading 9, Block Text, Footnote Text,
1018Definition Term, Definition, Caption, Table Caption, Image Caption,
1019Figure, Captioned Figure, TOC Heading; [character] Default Paragraph
1020Font, Body Text Char, Verbatim Char, Footnote Reference, Hyperlink;
1021[table] Table.
1022.RE
1023.TP
1024.B ODT
1025For best results, the reference ODT should be a modified version of an
1026ODT produced using pandoc.
1027The contents of the reference ODT are ignored, but its stylesheets are
1028used in the new ODT.
1029If no reference ODT is specified on the command line, pandoc will look
1030for a file \f[C]reference.odt\f[] in the user data directory (see
1031\f[C]\-\-data\-dir\f[]).
1032If this is not found either, sensible defaults will be used.
1033.RS
1034.PP
1035To produce a custom \f[C]reference.odt\f[], first get a copy of the
1036default \f[C]reference.odt\f[]:
1037\f[C]pandoc\ \-\-print\-default\-data\-file\ reference.odt\ >\ custom\-reference.odt\f[].
1038Then open \f[C]custom\-reference.odt\f[] in LibreOffice, modify the
1039styles as you wish, and save the file.
1040.RE
1041.RE
1042.TP
1043.B \f[C]\-\-epub\-cover\-image=\f[]\f[I]FILE\f[]
1044Use the specified image as the EPUB cover.
1045It is recommended that the image be less than 1000px in width and
1046height.
1047Note that in a Markdown source document you can also specify
1048\f[C]cover\-image\f[] in a YAML metadata block (see EPUB Metadata,
1049below).
1050.RS
1051.RE
1052.TP
1053.B \f[C]\-\-epub\-metadata=\f[]\f[I]FILE\f[]
1054Look in the specified XML file for metadata for the EPUB.
1055The file should contain a series of Dublin Core elements.
1056For example:
1057.RS
1058.IP
1059.nf
1060\f[C]
1061\ <dc:rights>Creative\ Commons</dc:rights>
1062\ <dc:language>es\-AR</dc:language>
1063\f[]
1064.fi
1065.PP
1066By default, pandoc will include the following metadata elements:
1067\f[C]<dc:title>\f[] (from the document title), \f[C]<dc:creator>\f[]
1068(from the document authors), \f[C]<dc:date>\f[] (from the document date,
1069which should be in ISO 8601 format), \f[C]<dc:language>\f[] (from the
1070\f[C]lang\f[] variable, or, if is not set, the locale), and
1071\f[C]<dc:identifier\ id="BookId">\f[] (a randomly generated UUID).
1072Any of these may be overridden by elements in the metadata file.
1073.PP
1074Note: if the source document is Markdown, a YAML metadata block in the
1075document can be used instead.
1076See below under EPUB Metadata.
1077.RE
1078.TP
1079.B \f[C]\-\-epub\-embed\-font=\f[]\f[I]FILE\f[]
1080Embed the specified font in the EPUB.
1081This option can be repeated to embed multiple fonts.
1082Wildcards can also be used: for example, \f[C]DejaVuSans\-*.ttf\f[].
1083However, if you use wildcards on the command line, be sure to escape
1084them or put the whole filename in single quotes, to prevent them from
1085being interpreted by the shell.
1086To use the embedded fonts, you will need to add declarations like the
1087following to your CSS (see \f[C]\-\-css\f[]):
1088.RS
1089.IP
1090.nf
1091\f[C]
1092\@font\-face\ {
1093font\-family:\ DejaVuSans;
1094font\-style:\ normal;
1095font\-weight:\ normal;
1096src:url("DejaVuSans\-Regular.ttf");
1098\@font\-face\ {
1099font\-family:\ DejaVuSans;
1100font\-style:\ normal;
1101font\-weight:\ bold;
1102src:url("DejaVuSans\-Bold.ttf");
1104\@font\-face\ {
1105font\-family:\ DejaVuSans;
1106font\-style:\ italic;
1107font\-weight:\ normal;
1108src:url("DejaVuSans\-Oblique.ttf");
1110\@font\-face\ {
1111font\-family:\ DejaVuSans;
1112font\-style:\ italic;
1113font\-weight:\ bold;
1114src:url("DejaVuSans\-BoldOblique.ttf");
1116body\ {\ font\-family:\ "DejaVuSans";\ }
1117\f[]
1118.fi
1119.RE
1120.TP
1121.B \f[C]\-\-epub\-chapter\-level=\f[]\f[I]NUMBER\f[]
1122Specify the header level at which to split the EPUB into separate
1123"chapter" files.
1124The default is to split into chapters at level 1 headers.
1125This option only affects the internal composition of the EPUB, not the
1126way chapters and sections are displayed to users.
1127Some readers may be slow if the chapter files are too large, so for
1128large documents with few level 1 headers, one might want to use a
1129chapter level of 2 or 3.
1130.RS
1131.RE
1132.TP
1133.B \f[C]\-\-epub\-subdirectory=\f[]\f[I]DIRNAME\f[]
1134Specify the subdirectory in the OCF container that is to hold the
1135EPUB\-specific contents.
1136The default is \f[C]EPUB\f[].
1137To put the EPUB contents in the top level, use an empty string.
1138.RS
1139.RE
1140.TP
1141.B \f[C]\-\-pdf\-engine=pdflatex\f[]|\f[C]lualatex\f[]|\f[C]xelatex\f[]|\f[C]wkhtmltopdf\f[]|\f[C]weasyprint\f[]|\f[C]prince\f[]|\f[C]context\f[]|\f[C]pdfroff\f[]
1142Use the specified engine when producing PDF output.
1143The default is \f[C]pdflatex\f[].
1144If the engine is not in your PATH, the full path of the engine may be
1145specified here.
1146.RS
1147.RE
1148.TP
1149.B \f[C]\-\-pdf\-engine\-opt=\f[]\f[I]STRING\f[]
1150Use the given string as a command\-line argument to the
1151\f[C]pdf\-engine\f[].
1152If used multiple times, the arguments are provided with spaces between
1153them.
1154Note that no check for duplicate options is done.
1155.RS
1156.RE
1157.SS Citation rendering
1158.TP
1159.B \f[C]\-\-bibliography=\f[]\f[I]FILE\f[]
1160Set the \f[C]bibliography\f[] field in the document\[aq]s metadata to
1161\f[I]FILE\f[], overriding any value set in the metadata, and process
1162citations using \f[C]pandoc\-citeproc\f[].
1163(This is equivalent to
1164\f[C]\-\-metadata\ bibliography=FILE\ \-\-filter\ pandoc\-citeproc\f[].)
1165If \f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] is also supplied,
1166\f[C]pandoc\-citeproc\f[] is not used, making this equivalent to
1167\f[C]\-\-metadata\ bibliography=FILE\f[].
1168If you supply this argument multiple times, each \f[I]FILE\f[] will be
1169added to bibliography.
1170.RS
1171.RE
1172.TP
1173.B \f[C]\-\-csl=\f[]\f[I]FILE\f[]
1174Set the \f[C]csl\f[] field in the document\[aq]s metadata to
1175\f[I]FILE\f[], overriding any value set in the metadata.
1176(This is equivalent to \f[C]\-\-metadata\ csl=FILE\f[].) This option is
1177only relevant with \f[C]pandoc\-citeproc\f[].
1178.RS
1179.RE
1180.TP
1181.B \f[C]\-\-citation\-abbreviations=\f[]\f[I]FILE\f[]
1182Set the \f[C]citation\-abbreviations\f[] field in the document\[aq]s
1183metadata to \f[I]FILE\f[], overriding any value set in the metadata.
1184(This is equivalent to
1185\f[C]\-\-metadata\ citation\-abbreviations=FILE\f[].) This option is
1186only relevant with \f[C]pandoc\-citeproc\f[].
1187.RS
1188.RE
1189.TP
1190.B \f[C]\-\-natbib\f[]
1191Use \f[C]natbib\f[] for citations in LaTeX output.
1192This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or
1193with PDF output.
1194It is intended for use in producing a LaTeX file that can be processed
1195with \f[C]bibtex\f[].
1196.RS
1197.RE
1198.TP
1199.B \f[C]\-\-biblatex\f[]
1200Use \f[C]biblatex\f[] for citations in LaTeX output.
1201This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or
1202with PDF output.
1203It is intended for use in producing a LaTeX file that can be processed
1204with \f[C]bibtex\f[] or \f[C]biber\f[].
1205.RS
1206.RE
1207.SS Math rendering in HTML
1208.PP
1209The default is to render TeX math as far as possible using Unicode
1210characters.
1211Formulas are put inside a \f[C]span\f[] with \f[C]class="math"\f[], so
1212that they may be styled differently from the surrounding text if needed.
1213However, this gives acceptable results only for basic math, usually you
1214will want to use \f[C]\-\-mathjax\f[] or another of the following
1215options.
1216.TP
1217.B \f[C]\-\-mathjax\f[][\f[C]=\f[]\f[I]URL\f[]]
1218Use MathJax to display embedded TeX math in HTML output.
1219TeX math will be put between \f[C]\\(...\\)\f[] (for inline math) or
1220\f[C]\\[...\\]\f[] (for display math) and wrapped in \f[C]<span>\f[]
1221tags with class \f[C]math\f[].
1222Then the MathJax JavaScript will render it.
1223The \f[I]URL\f[] should point to the \f[C]MathJax.js\f[] load script.
1224If a \f[I]URL\f[] is not provided, a link to the Cloudflare CDN will be
1225inserted.
1226.RS
1227.RE
1228.TP
1229.B \f[C]\-\-mathml\f[]
1230Convert TeX math to MathML (in \f[C]epub3\f[], \f[C]docbook4\f[],
1231\f[C]docbook5\f[], \f[C]jats\f[], \f[C]html4\f[] and \f[C]html5\f[]).
1232This is the default in \f[C]odt\f[] output.
1233Note that currently only Firefox and Safari (and select e\-book readers)
1234natively support MathML.
1235.RS
1236.RE
1237.TP
1238.B \f[C]\-\-webtex\f[][\f[C]=\f[]\f[I]URL\f[]]
1239Convert TeX formulas to \f[C]<img>\f[] tags that link to an external
1240script that converts formulas to images.
1241The formula will be URL\-encoded and concatenated with the URL provided.
1242For SVG images you can for example use
1243\f[C]\-\-webtex\ https://latex.codecogs.com/svg.latex?\f[].
1244If no URL is specified, the CodeCogs URL generating PNGs will be used
1245(\f[C]https://latex.codecogs.com/png.latex?\f[]).
1246Note: the \f[C]\-\-webtex\f[] option will affect Markdown output as well
1247as HTML, which is useful if you\[aq]re targeting a version of Markdown
1248without native math support.
1249.RS
1250.RE
1251.TP
1252.B \f[C]\-\-katex\f[][\f[C]=\f[]\f[I]URL\f[]]
1253Use KaTeX to display embedded TeX math in HTML output.
1254The \f[I]URL\f[] is the base URL for the KaTeX library.
1255If a \f[I]URL\f[] is not provided, a link to the KaTeX CDN will be
1256inserted.
1257.RS
1258.RE
1259.TP
1260.B \f[C]\-\-katex\-stylesheet=\f[]\f[I]URL\f[]
1261The \f[I]URL\f[] should point to the \f[C]katex.css\f[] stylesheet.
1262If this option is not specified, a link to the KaTeX CDN will be
1263inserted.
1264Note that this option does not imply \f[C]\-\-katex\f[].
1265.RS
1266.RE
1267.TP
1268.B \f[C]\-m\f[] [\f[I]URL\f[]], \f[C]\-\-latexmathml\f[][\f[C]=\f[]\f[I]URL\f[]]
1269\f[I]Deprecated.\f[] Use the LaTeXMathML script to display embedded TeX
1270math in HTML output.
1271TeX math will be displayed between \f[C]$\f[] or \f[C]$$\f[] characters
1272and put in \f[C]<span>\f[] tags with class \f[C]LaTeX\f[].
1273The LaTeXMathML JavaScript will then change it to MathML.
1274Note that currently only Firefox and Safari (and select e\-book readers)
1275natively support MathML.
1276To insert a link the \f[C]LaTeXMathML.js\f[] script, provide a
1277\f[I]URL\f[].
1278.RS
1279.RE
1280.TP
1281.B \f[C]\-\-jsmath\f[][\f[C]=\f[]\f[I]URL\f[]]
1282\f[I]Deprecated.\f[] Use jsMath (the predecessor of MathJax) to display
1283embedded TeX math in HTML output.
1284TeX math will be put inside \f[C]<span>\f[] tags (for inline math) or
1285\f[C]<div>\f[] tags (for display math) with class \f[C]math\f[] and
1286rendered by the jsMath script.
1287The \f[I]URL\f[] should point to the script (e.g.
1288\f[C]jsMath/easy/load.js\f[]); if provided, it will be linked to in the
1289header of standalone HTML documents.
1290If a \f[I]URL\f[] is not provided, no link to the jsMath load script
1291will be inserted; it is then up to the author to provide such a link in
1292the HTML template.
1293.RS
1294.RE
1295.TP
1296.B \f[C]\-\-gladtex\f[]
1297\f[I]Deprecated.\f[] Enclose TeX math in \f[C]<eq>\f[] tags in HTML
1298output.
1299The resulting HTML can then be processed by gladTeX to produce images of
1300the typeset formulas and an HTML file with links to these images.
1301So, the procedure is:
1302.RS
1303.IP
1304.nf
1305\f[C]
1306pandoc\ \-s\ \-\-gladtex\ input.md\ \-o\ myfile.htex
1307gladtex\ \-d\ myfile\-images\ myfile.htex
1308#\ produces\ myfile.html\ and\ images\ in\ myfile\-images
1309\f[]
1310.fi
1311.RE
1312.TP
1313.B \f[C]\-\-mimetex\f[][\f[C]=\f[]\f[I]URL\f[]]
1314\f[I]Deprecated.\f[] Render TeX math using the mimeTeX CGI script, which
1315generates an image for each TeX formula.
1316This should work in all browsers.
1317If \f[I]URL\f[] is not specified, it is assumed that the script is at
1318\f[C]/cgi\-bin/mimetex.cgi\f[].
1319.RS
1320.RE
1321.SS Options for wrapper scripts
1322.TP
1323.B \f[C]\-\-dump\-args\f[]
1324Print information about command\-line arguments to \f[I]stdout\f[], then
1325exit.
1326This option is intended primarily for use in wrapper scripts.
1327The first line of output contains the name of the output file specified
1328with the \f[C]\-o\f[] option, or \f[C]\-\f[] (for \f[I]stdout\f[]) if no
1329output file was specified.
1330The remaining lines contain the command\-line arguments, one per line,
1331in the order they appear.
1332These do not include regular pandoc options and their arguments, but do
1333include any options appearing after a \f[C]\-\-\f[] separator at the end
1334of the line.
1335.RS
1336.RE
1337.TP
1338.B \f[C]\-\-ignore\-args\f[]
1339Ignore command\-line arguments (for use in wrapper scripts).
1340Regular pandoc options are not ignored.
1341Thus, for example,
1342.RS
1343.IP
1344.nf
1345\f[C]
1346pandoc\ \-\-ignore\-args\ \-o\ foo.html\ \-s\ foo.txt\ \-\-\ \-e\ latin1
1347\f[]
1348.fi
1349.PP
1350is equivalent to
1351.IP
1352.nf
1353\f[C]
1354pandoc\ \-o\ foo.html\ \-s
1355\f[]
1356.fi
1357.RE
1358.SH TEMPLATES
1359.PP
1360When the \f[C]\-s/\-\-standalone\f[] option is used, pandoc uses a
1361template to add header and footer material that is needed for a
1362self\-standing document.
1363To see the default template that is used, just type
1364.IP
1365.nf
1366\f[C]
1367pandoc\ \-D\ *FORMAT*
1368\f[]
1369.fi
1370.PP
1371where \f[I]FORMAT\f[] is the name of the output format.
1372A custom template can be specified using the \f[C]\-\-template\f[]
1373option.
1374You can also override the system default templates for a given output
1375format \f[I]FORMAT\f[] by putting a file
1376\f[C]templates/default.*FORMAT*\f[] in the user data directory (see
1377\f[C]\-\-data\-dir\f[], above).
1378\f[I]Exceptions:\f[]
1379.IP \[bu] 2
1380For \f[C]odt\f[] output, customize the \f[C]default.opendocument\f[]
1381template.
1382.IP \[bu] 2
1383For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template
1384(or the \f[C]default.context\f[] template, if you use
1385\f[C]\-t\ context\f[], or the \f[C]default.ms\f[] template, if you use
1386\f[C]\-t\ ms\f[], or the \f[C]default.html5\f[] template, if you use
1387\f[C]\-t\ html5\f[]).
1388.IP \[bu] 2
1389\f[C]docx\f[] has no template (however, you can use
1390\f[C]\-\-reference\-doc\f[] to customize the output).
1391.PP
1392Templates contain \f[I]variables\f[], which allow for the inclusion of
1393arbitrary information at any point in the file.
1394Variables may be set within the document using YAML metadata blocks.
1395They may also be set at the command line using the
1396\f[C]\-V/\-\-variable\f[] option: variables set in this way override
1397metadata fields with the same name.
1398.SS Variables set by pandoc
1399.PP
1400Some variables are set automatically by pandoc.
1401These vary somewhat depending on the output format, but include metadata
1402fields as well as the following:
1403.TP
1404.B \f[C]sourcefile\f[], \f[C]outputfile\f[]
1405source and destination filenames, as given on the command line.
1406\f[C]sourcefile\f[] can also be a list if input comes from multiple
1407files, or empty if input is from stdin.
1408You can use the following snippet in your template to distinguish them:
1409.RS
1410.IP
1411.nf
1412\f[C]
1413$if(sourcefile)$
1414$for(sourcefile)$
1415$sourcefile$
1416$endfor$
1417$else$
1418(stdin)
1419$endif$
1420\f[]
1421.fi
1422.PP
1423Similarly, \f[C]outputfile\f[] can be \f[C]\-\f[] if output goes to the
1424terminal.
1425.RE
1426.TP
1427.B \f[C]title\f[], \f[C]author\f[], \f[C]date\f[]
1428allow identification of basic aspects of the document.
1429Included in PDF metadata through LaTeX and ConTeXt.
1430These can be set through a pandoc title block, which allows for multiple
1431authors, or through a YAML metadata block:
1432.RS
1433.IP
1434.nf
1435\f[C]
1436\-\-\-
1437author:
1438\-\ Aristotle
1439\-\ Peter\ Abelard
1440\&...
1441\f[]
1442.fi
1443.RE
1444.TP
1445.B \f[C]subtitle\f[]
1446document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word
1447docx; renders in LaTeX only when using a document class that supports
1448\f[C]\\subtitle\f[], such as \f[C]beamer\f[] or the KOMA\-Script series
1449(\f[C]scrartcl\f[], \f[C]scrreprt\f[], \f[C]scrbook\f[]).
1450.RS
1451.RE
1452.TP
1453.B \f[C]institute\f[]
1454author affiliations (in LaTeX and Beamer only).
1455Can be a list, when there are multiple authors.
1456.RS
1457.RE
1458.TP
1459.B \f[C]abstract\f[]
1460document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx
1461.RS
1462.RE
1463.TP
1464.B \f[C]keywords\f[]
1465list of keywords to be included in HTML, PDF, and AsciiDoc metadata; may
1466be repeated as for \f[C]author\f[], above
1467.RS
1468.RE
1469.TP
1470.B \f[C]header\-includes\f[]
1471contents specified by \f[C]\-H/\-\-include\-in\-header\f[] (may have
1472multiple values)
1473.RS
1474.RE
1475.TP
1476.B \f[C]toc\f[]
1477non\-null value if \f[C]\-\-toc/\-\-table\-of\-contents\f[] was
1478specified
1479.RS
1480.RE
1481.TP
1482.B \f[C]toc\-title\f[]
1483title of table of contents (works only with EPUB, opendocument, odt,
1484docx)
1485.RS
1486.RE
1487.TP
1488.B \f[C]include\-before\f[]
1489contents specified by \f[C]\-B/\-\-include\-before\-body\f[] (may have
1490multiple values)
1491.RS
1492.RE
1493.TP
1494.B \f[C]include\-after\f[]
1495contents specified by \f[C]\-A/\-\-include\-after\-body\f[] (may have
1496multiple values)
1497.RS
1498.RE
1499.TP
1500.B \f[C]body\f[]
1501body of document
1502.RS
1503.RE
1504.TP
1505.B \f[C]meta\-json\f[]
1506JSON representation of all of the document\[aq]s metadata.
1507Field values are transformed to the selected output format.
1508.RS
1509.RE
1510.SS Language variables
1511.TP
1512.B \f[C]lang\f[]
1513identifies the main language of the document, using a code according to
1514BCP 47 (e.g.
1515\f[C]en\f[] or \f[C]en\-GB\f[]).
1516For some output formats, pandoc will convert it to an appropriate format
1517stored in the additional variables \f[C]babel\-lang\f[],
1518\f[C]polyglossia\-lang\f[] (LaTeX) and \f[C]context\-lang\f[] (ConTeXt).
1519.RS
1520.PP
1521Native pandoc \f[C]span\f[]s and \f[C]div\f[]s with the lang attribute
1522(value in BCP 47) can be used to switch the language in that range.
1523.RE
1524.TP
1525.B \f[C]otherlangs\f[]
1526a list of other languages used in the document in the YAML metadata,
1527according to BCP 47.
1528For example: \f[C]otherlangs:\ [en\-GB,\ fr]\f[].
1529This is automatically generated from the \f[C]lang\f[] attributes in all
1530\f[C]span\f[]s and \f[C]div\f[]s but can be overridden.
1531Currently only used by LaTeX through the generated
1532\f[C]babel\-otherlangs\f[] and \f[C]polyglossia\-otherlangs\f[]
1533variables.
1534The LaTeX writer outputs polyglossia commands in the text but the
1535\f[C]babel\-newcommands\f[] variable contains mappings for them to the
1536corresponding babel.
1537.RS
1538.RE
1539.TP
1540.B \f[C]dir\f[]
1541the base direction of the document, either \f[C]rtl\f[]
1542(right\-to\-left) or \f[C]ltr\f[] (left\-to\-right).
1543.RS
1544.PP
1545For bidirectional documents, native pandoc \f[C]span\f[]s and
1546\f[C]div\f[]s with the \f[C]dir\f[] attribute (value \f[C]rtl\f[] or
1547\f[C]ltr\f[]) can be used to override the base direction in some output
1548formats.
1549This may not always be necessary if the final renderer (e.g.
1550the browser, when generating HTML) supports the Unicode Bidirectional
1551Algorithm.
1552.PP
1553When using LaTeX for bidirectional documents, only the \f[C]xelatex\f[]
1554engine is fully supported (use \f[C]\-\-pdf\-engine=xelatex\f[]).
1555.RE
1556.SS Variables for slides
1557.PP
1558Variables are available for producing slide shows with pandoc, including
1559all reveal.js configuration options.
1560.TP
1561.B \f[C]titlegraphic\f[]
1562title graphic for Beamer documents
1563.RS
1564.RE
1565.TP
1566.B \f[C]logo\f[]
1567logo for Beamer documents
1568.RS
1569.RE
1570.TP
1571.B \f[C]slidy\-url\f[]
1572base URL for Slidy documents (defaults to
1573\f[C]https://www.w3.org/Talks/Tools/Slidy2\f[])
1574.RS
1575.RE
1576.TP
1577.B \f[C]slideous\-url\f[]
1578base URL for Slideous documents (defaults to \f[C]slideous\f[])
1579.RS
1580.RE
1581.TP
1582.B \f[C]s5\-url\f[]
1583base URL for S5 documents (defaults to \f[C]s5/default\f[])
1584.RS
1585.RE
1586.TP
1587.B \f[C]revealjs\-url\f[]
1588base URL for reveal.js documents (defaults to \f[C]reveal.js\f[])
1589.RS
1590.RE
1591.TP
1592.B \f[C]theme\f[], \f[C]colortheme\f[], \f[C]fonttheme\f[], \f[C]innertheme\f[], \f[C]outertheme\f[]
1593themes for LaTeX \f[C]beamer\f[] documents
1594.RS
1595.RE
1596.TP
1597.B \f[C]themeoptions\f[]
1598options for LaTeX beamer themes (a list).
1599.RS
1600.RE
1601.TP
1602.B \f[C]navigation\f[]
1603controls navigation symbols in \f[C]beamer\f[] documents (default is
1604\f[C]empty\f[] for no navigation symbols; other valid values are
1605\f[C]frame\f[], \f[C]vertical\f[], and \f[C]horizontal\f[]).
1606.RS
1607.RE
1608.TP
1609.B \f[C]section\-titles\f[]
1610enables on "title pages" for new sections in \f[C]beamer\f[] documents
1611(default = true).
1612.RS
1613.RE
1614.TP
1615.B \f[C]beamerarticle\f[]
1616when true, the \f[C]beamerarticle\f[] package is loaded (for producing
1617an article from beamer slides).
1618.RS
1619.RE
1620.TP
1621.B \f[C]aspectratio\f[]
1622aspect ratio of slides (for beamer only, \f[C]1610\f[] for 16:10,
1623\f[C]169\f[] for 16:9, \f[C]149\f[] for 14:9, \f[C]141\f[] for 1.41:1,
1624\f[C]54\f[] for 5:4, \f[C]43\f[] for 4:3 which is the default, and
1625\f[C]32\f[] for 3:2).
1626.RS
1627.RE
1628.SS Variables for LaTeX
1629.PP
1630LaTeX variables are used when creating a PDF.
1631.TP
1632.B \f[C]papersize\f[]
1633paper size, e.g.
1634\f[C]letter\f[], \f[C]a4\f[]
1635.RS
1636.RE
1637.TP
1638.B \f[C]fontsize\f[]
1639font size for body text (e.g.
1640\f[C]10pt\f[], \f[C]12pt\f[])
1641.RS
1642.RE
1643.TP
1644.B \f[C]documentclass\f[]
1645document class, e.g.
1646\f[C]article\f[], \f[C]report\f[], \f[C]book\f[], \f[C]memoir\f[]
1647.RS
1648.RE
1649.TP
1650.B \f[C]classoption\f[]
1651option for document class, e.g.
1652\f[C]oneside\f[]; may be repeated for multiple options
1653.RS
1654.RE
1655.TP
1656.B \f[C]geometry\f[]
1657option for \f[C]geometry\f[] package, e.g.
1658\f[C]margin=1in\f[]; may be repeated for multiple options
1659.RS
1660.RE
1661.TP
1662.B \f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[], \f[C]margin\-bottom\f[]
1663sets margins, if \f[C]geometry\f[] is not used (otherwise
1664\f[C]geometry\f[] overrides these)
1665.RS
1666.RE
1667.TP
1668.B \f[C]linestretch\f[]
1669adjusts line spacing using the \f[C]setspace\f[] package, e.g.
1670\f[C]1.25\f[], \f[C]1.5\f[]
1671.RS
1672.RE
1673.TP
1674.B \f[C]fontfamily\f[]
1675font package for use with \f[C]pdflatex\f[]: TeX Live includes many
1676options, documented in the LaTeX Font Catalogue.
1677The default is Latin Modern.
1678.RS
1679.RE
1680.TP
1681.B \f[C]fontfamilyoptions\f[]
1682options for package used as \f[C]fontfamily\f[]: e.g.
1683\f[C]osf,sc\f[] with \f[C]fontfamily\f[] set to \f[C]mathpazo\f[]
1684provides Palatino with old\-style figures and true small caps; may be
1685repeated for multiple options
1686.RS
1687.RE
1688.TP
1689.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[]
1690font families for use with \f[C]xelatex\f[] or \f[C]lualatex\f[]: take
1691the name of any system font, using the \f[C]fontspec\f[] package.
1692Note that if \f[C]CJKmainfont\f[] is used, the \f[C]xecjk\f[] package
1693must be available.
1694.RS
1695.RE
1696.TP
1697.B \f[C]mainfontoptions\f[], \f[C]sansfontoptions\f[], \f[C]monofontoptions\f[], \f[C]mathfontoptions\f[], \f[C]CJKoptions\f[]
1698options to use with \f[C]mainfont\f[], \f[C]sansfont\f[],
1699\f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[] in
1700\f[C]xelatex\f[] and \f[C]lualatex\f[].
1701Allow for any choices available through \f[C]fontspec\f[], such as the
1702OpenType features \f[C]Numbers=OldStyle,Numbers=Proportional\f[].
1703May be repeated for multiple options.
1704.RS
1705.RE
1706.TP
1707.B \f[C]fontenc\f[]
1708allows font encoding to be specified through \f[C]fontenc\f[] package
1709(with \f[C]pdflatex\f[]); default is \f[C]T1\f[] (see guide to LaTeX
1710font encodings)
1711.RS
1712.RE
1713.TP
1714.B \f[C]microtypeoptions\f[]
1715options to pass to the microtype package
1716.RS
1717.RE
1718.TP
1719.B \f[C]colorlinks\f[]
1720add color to link text; automatically enabled if any of
1721\f[C]linkcolor\f[], \f[C]citecolor\f[], \f[C]urlcolor\f[], or
1722\f[C]toccolor\f[] are set
1723.RS
1724.RE
1725.TP
1726.B \f[C]linkcolor\f[], \f[C]citecolor\f[], \f[C]urlcolor\f[], \f[C]toccolor\f[]
1727color for internal links, citation links, external links, and links in
1728table of contents: uses options allowed by \f[C]xcolor\f[], including
1729the \f[C]dvipsnames\f[], \f[C]svgnames\f[], and \f[C]x11names\f[] lists
1730.RS
1731.RE
1732.TP
1733.B \f[C]links\-as\-notes\f[]
1734causes links to be printed as footnotes
1735.RS
1736.RE
1737.TP
1738.B \f[C]indent\f[]
1739uses document class settings for indentation (the default LaTeX template
1740otherwise removes indentation and adds space between paragraphs)
1741.RS
1742.RE
1743.TP
1744.B \f[C]subparagraph\f[]
1745disables default behavior of LaTeX template that redefines
1746(sub)paragraphs as sections, changing the appearance of nested headings
1747in some classes
1748.RS
1749.RE
1750.TP
1751.B \f[C]thanks\f[]
1752specifies contents of acknowledgments footnote after document title.
1753.RS
1754.RE
1755.TP
1756.B \f[C]toc\f[]
1757include table of contents (can also be set using
1758\f[C]\-\-toc/\-\-table\-of\-contents\f[])
1759.RS
1760.RE
1761.TP
1762.B \f[C]toc\-depth\f[]
1763level of section to include in table of contents
1764.RS
1765.RE
1766.TP
1767.B \f[C]secnumdepth\f[]
1768numbering depth for sections, if sections are numbered
1769.RS
1770.RE
1771.TP
1772.B \f[C]lof\f[], \f[C]lot\f[]
1773include list of figures, list of tables
1774.RS
1775.RE
1776.TP
1777.B \f[C]bibliography\f[]
1778bibliography to use for resolving references
1779.RS
1780.RE
1781.TP
1782.B \f[C]biblio\-style\f[]
1783bibliography style, when used with \f[C]\-\-natbib\f[] and
1784\f[C]\-\-biblatex\f[].
1785.RS
1786.RE
1787.TP
1788.B \f[C]biblio\-title\f[]
1789bibliography title, when used with \f[C]\-\-natbib\f[] and
1790\f[C]\-\-biblatex\f[].
1791.RS
1792.RE
1793.TP
1794.B \f[C]biblatexoptions\f[]
1795list of options for biblatex.
1796.RS
1797.RE
1798.TP
1799.B \f[C]natbiboptions\f[]
1800list of options for natbib.
1801.RS
1802.RE
1803.TP
1804.B \f[C]pagestyle\f[]
1805An option for LaTeX\[aq]s \f[C]\\pagestyle{}\f[].
1806The default article class supports \[aq]plain\[aq] (default),
1807\[aq]empty\[aq], and \[aq]headings\[aq]; headings puts section titles in
1808the header.
1809.RS
1810.RE
1811.SS Variables for ConTeXt
1812.TP
1813.B \f[C]papersize\f[]
1814paper size, e.g.
1815\f[C]letter\f[], \f[C]A4\f[], \f[C]landscape\f[] (see ConTeXt Paper
1816Setup); may be repeated for multiple options
1817.RS
1818.RE
1819.TP
1820.B \f[C]layout\f[]
1821options for page margins and text arrangement (see ConTeXt Layout); may
1822be repeated for multiple options
1823.RS
1824.RE
1825.TP
1826.B \f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[], \f[C]margin\-bottom\f[]
1827sets margins, if \f[C]layout\f[] is not used (otherwise \f[C]layout\f[]
1828overrides these)
1829.RS
1830.RE
1831.TP
1832.B \f[C]fontsize\f[]
1833font size for body text (e.g.
1834\f[C]10pt\f[], \f[C]12pt\f[])
1835.RS
1836.RE
1837.TP
1838.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[]
1839font families: take the name of any system font (see ConTeXt Font
1840Switching)
1841.RS
1842.RE
1843.TP
1844.B \f[C]linkcolor\f[], \f[C]contrastcolor\f[]
1845color for links outside and inside a page, e.g.
1846\f[C]red\f[], \f[C]blue\f[] (see ConTeXt Color)
1847.RS
1848.RE
1849.TP
1850.B \f[C]linkstyle\f[]
1851typeface style for links, e.g.
1852\f[C]normal\f[], \f[C]bold\f[], \f[C]slanted\f[], \f[C]boldslanted\f[],
1853\f[C]type\f[], \f[C]cap\f[], \f[C]small\f[]
1854.RS
1855.RE
1856.TP
1857.B \f[C]indenting\f[]
1858controls indentation of paragraphs, e.g.
1859\f[C]yes,small,next\f[] (see ConTeXt Indentation); may be repeated for
1860multiple options
1861.RS
1862.RE
1863.TP
1864.B \f[C]whitespace\f[]
1865spacing between paragraphs, e.g.
1866\f[C]none\f[], \f[C]small\f[] (using \f[C]setupwhitespace\f[])
1867.RS
1868.RE
1869.TP
1870.B \f[C]interlinespace\f[]
1871adjusts line spacing, e.g.
1872\f[C]4ex\f[] (using \f[C]setupinterlinespace\f[]); may be repeated for
1873multiple options
1874.RS
1875.RE
1876.TP
1877.B \f[C]headertext\f[], \f[C]footertext\f[]
1878text to be placed in running header or footer (see ConTeXt Headers and
1879Footers); may be repeated up to four times for different placement
1880.RS
1881.RE
1882.TP
1883.B \f[C]pagenumbering\f[]
1884page number style and location (using \f[C]setuppagenumbering\f[]); may
1885be repeated for multiple options
1886.RS
1887.RE
1888.TP
1889.B \f[C]toc\f[]
1890include table of contents (can also be set using
1891\f[C]\-\-toc/\-\-table\-of\-contents\f[])
1892.RS
1893.RE
1894.TP
1895.B \f[C]lof\f[], \f[C]lot\f[]
1896include list of figures, list of tables
1897.RS
1898.RE
1899.SS Variables for man pages
1900.TP
1901.B \f[C]section\f[]
1902section number in man pages
1903.RS
1904.RE
1905.TP
1906.B \f[C]header\f[]
1907header in man pages
1908.RS
1909.RE
1910.TP
1911.B \f[C]footer\f[]
1912footer in man pages
1913.RS
1914.RE
1915.TP
1916.B \f[C]adjusting\f[]
1917adjusts text to left (\f[C]l\f[]), right (\f[C]r\f[]), center
1918(\f[C]c\f[]), or both (\f[C]b\f[]) margins
1919.RS
1920.RE
1921.TP
1922.B \f[C]hyphenate\f[]
1923if \f[C]true\f[] (the default), hyphenation will be used
1924.RS
1925.RE
1926.SS Variables for ms
1927.TP
1928.B \f[C]pointsize\f[]
1929point size (e.g.
1930\f[C]10p\f[])
1931.RS
1932.RE
1933.TP
1934.B \f[C]lineheight\f[]
1935line height (e.g.
1936\f[C]12p\f[])
1937.RS
1938.RE
1939.TP
1940.B \f[C]fontfamily\f[]
1941font family (e.g.
1942\f[C]T\f[] or \f[C]P\f[])
1943.RS
1944.RE
1945.TP
1946.B \f[C]indent\f[]
1947paragraph indent (e.g.
1948\f[C]2m\f[])
1949.RS
1950.RE
1951.SS Using variables in templates
1952.PP
1953Variable names are sequences of alphanumerics, \f[C]\-\f[], and
1954\f[C]_\f[], starting with a letter.
1955A variable name surrounded by \f[C]$\f[] signs will be replaced by its
1956value.
1957For example, the string \f[C]$title$\f[] in
1958.IP
1959.nf
1960\f[C]
1961<title>$title$</title>
1962\f[]
1963.fi
1964.PP
1965will be replaced by the document title.
1966.PP
1967To write a literal \f[C]$\f[] in a template, use \f[C]$$\f[].
1968.PP
1969Templates may contain conditionals.
1970The syntax is as follows:
1971.IP
1972.nf
1973\f[C]
1974$if(variable)$
1976$else$
1978$endif$
1979\f[]
1980.fi
1981.PP
1982This will include \f[C]X\f[] in the template if \f[C]variable\f[] has a
1983non\-null value; otherwise it will include \f[C]Y\f[].
1984\f[C]X\f[] and \f[C]Y\f[] are placeholders for any valid template text,
1985and may include interpolated variables or other conditionals.
1986The \f[C]$else$\f[] section may be omitted.
1987.PP
1988When variables can have multiple values (for example, \f[C]author\f[] in
1989a multi\-author document), you can use the \f[C]$for$\f[] keyword:
1990.IP
1991.nf
1992\f[C]
1993$for(author)$
1994<meta\ name="author"\ content="$author$"\ />
1995$endfor$
1996\f[]
1997.fi
1998.PP
1999You can optionally specify a separator to be used between consecutive
2000items:
2001.IP
2002.nf
2003\f[C]
2004$for(author)$$author$$sep$,\ $endfor$
2005\f[]
2006.fi
2007.PP
2008A dot can be used to select a field of a variable that takes an object
2009as its value.
2010So, for example:
2011.IP
2012.nf
2013\f[C]
2014$author.name$\ ($author.affiliation$)
2015\f[]
2016.fi
2017.PP
2018If you use custom templates, you may need to revise them as pandoc
2019changes.
2020We recommend tracking the changes in the default templates, and
2021modifying your custom templates accordingly.
2022An easy way to do this is to fork the pandoc\-templates repository and
2023merge in changes after each pandoc release.
2024.PP
2025Templates may contain comments: anything on a line after \f[C]$\-\-\f[]
2026will be treated as a comment and ignored.
2027.SH EXTENSIONS
2028.PP
2029The behavior of some of the readers and writers can be adjusted by
2030enabling or disabling various extensions.
2031.PP
2032An extension can be enabled by adding \f[C]+EXTENSION\f[] to the format
2033name and disabled by adding \f[C]\-EXTENSION\f[].
2034For example, \f[C]\-\-from\ markdown_strict+footnotes\f[] is strict
2035Markdown with footnotes enabled, while
2036\f[C]\-\-from\ markdown\-footnotes\-pipe_tables\f[] is pandoc\[aq]s
2037Markdown without footnotes or pipe tables.
2038.PP
2039The markdown reader and writer make by far the most use of extensions.
2040Extensions only used by them are therefore covered in the section
2041Pandoc\[aq]s Markdown below (See Markdown variants for
2042\f[C]commonmark\f[] and \f[C]gfm\f[].) In the following, extensions that
2043also work for other formats are covered.
2044.SS Typography
2045.SS Extension: \f[C]smart\f[]
2046.PP
2047Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as
2048em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses.
2049Nonbreaking spaces are inserted after certain abbreviations, such as
2050"Mr."
2051.PP
2052This extension can be enabled/disabled for the following formats:
2053.TP
2054.B input formats
2055\f[C]markdown\f[], \f[C]commonmark\f[], \f[C]latex\f[],
2056\f[C]mediawiki\f[], \f[C]org\f[], \f[C]rst\f[], \f[C]twiki\f[]
2057.RS
2058.RE
2059.TP
2060.B output formats
2061\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[], \f[C]rst\f[]
2062.RS
2063.RE
2064.TP
2065.B enabled by default in
2066\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[] (both input and
2067output)
2068.RS
2069.RE
2070.PP
2071Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[]
2072extension has the reverse effect: what would have been curly quotes
2073comes out straight.
2074.PP
2075In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for
2076quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes,
2077\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes
2078(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash).
2079If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse
2080these characters literally.
2081In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the
2082ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use
2083unicode quotation mark and dash characters.
2084.SS Headers and sections
2085.SS Extension: \f[C]auto_identifiers\f[]
2086.PP
2087A header without an explicitly specified identifier will be
2088automatically assigned a unique identifier based on the header text.
2089.PP
2090This extension can be enabled/disabled for the following formats:
2091.TP
2092.B input formats
2093\f[C]markdown\f[], \f[C]latex\f[], \f[C]rst\f[], \f[C]mediawiki\f[],
2094\f[C]textile\f[]
2095.RS
2096.RE
2097.TP
2098.B output formats
2099\f[C]markdown\f[], \f[C]muse\f[]
2100.RS
2101.RE
2102.TP
2103.B enabled by default in
2104\f[C]markdown\f[], \f[C]muse\f[]
2105.RS
2106.RE
2107.PP
2108The algorithm used to derive the identifier from the header text is:
2109.IP \[bu] 2
2110Remove all formatting, links, etc.
2111.IP \[bu] 2
2112Remove all footnotes.
2113.IP \[bu] 2
2114Remove all punctuation, except underscores, hyphens, and periods.
2115.IP \[bu] 2
2116Replace all spaces and newlines with hyphens.
2117.IP \[bu] 2
2118Convert all alphabetic characters to lowercase.
2119.IP \[bu] 2
2120Remove everything up to the first letter (identifiers may not begin with
2121a number or punctuation mark).
2122.IP \[bu] 2
2123If nothing is left after this, use the identifier \f[C]section\f[].
2124.PP
2125Thus, for example,
2126.PP
2127.TS
2128tab(@);
2129l l.
2131Header
2132T}@T{
2133Identifier
2137\f[C]Header\ identifiers\ in\ HTML\f[]
2138T}@T{
2139\f[C]header\-identifiers\-in\-html\f[]
2142\f[C]*Dogs*?\-\-in\ *my*\ house?\f[]
2143T}@T{
2144\f[C]dogs\-\-in\-my\-house\f[]
2147\f[C][HTML],\ [S5],\ or\ [RTF]?\f[]
2148T}@T{
2149\f[C]html\-s5\-or\-rtf\f[]
2152\f[C]3.\ Applications\f[]
2153T}@T{
2154\f[C]applications\f[]
2157\f[C]33\f[]
2158T}@T{
2159\f[C]section\f[]
2161.TE
2162.PP
2163These rules should, in most cases, allow one to determine the identifier
2164from the header text.
2165The exception is when several headers have the same text; in this case,
2166the first will get an identifier as described above; the second will get
2167the same identifier with \f[C]\-1\f[] appended; the third with
2168\f[C]\-2\f[]; and so on.
2169.PP
2170These identifiers are used to provide link targets in the table of
2171contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[]
2172option.
2173They also make it easy to provide links from one section of a document
2174to another.
2175A link to this section, for example, might look like this:
2176.IP
2177.nf
2178\f[C]
2179See\ the\ section\ on
2180[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context).
2181\f[]
2182.fi
2183.PP
2184Note, however, that this method of providing links to sections works
2185only in HTML, LaTeX, and ConTeXt formats.
2186.PP
2187If the \f[C]\-\-section\-divs\f[] option is specified, then each section
2188will be wrapped in a \f[C]section\f[] (or a \f[C]div\f[], if
2189\f[C]html4\f[] was specified), and the identifier will be attached to
2190the enclosing \f[C]<section>\f[] (or \f[C]<div>\f[]) tag rather than the
2191header itself.
2192This allows entire sections to be manipulated using JavaScript or
2193treated differently in CSS.
2194.SS Extension: \f[C]ascii_identifiers\f[]
2195.PP
2196Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure
2197ASCII.
2198Accents are stripped off of accented Latin letters, and non\-Latin
2199letters are omitted.
2200.SS Math Input
2201.PP
2202The extensions \f[C]tex_math_dollars\f[],
2203\f[C]tex_math_single_backslash\f[], and
2204\f[C]tex_math_double_backslash\f[] are described in the section about
2205Pandoc\[aq]s Markdown.
2206.PP
2207However, they can also be used with HTML input.
2208This is handy for reading web pages formatted using MathJax, for
2209example.
2210.SS Raw HTML/TeX
2211.PP
2212The following extensions (especially how they affect Markdown
2213input/output) are also described in more detail in their respective
2214sections of Pandoc\[aq]s Markdown.
2215.SS Extension: \f[C]raw_html\f[]
2216.PP
2217When converting from HTML, parse elements to raw HTML which are not
2218representable in pandoc\[aq]s AST.
2219By default, this is disabled for HTML input.
2220.SS Extension: \f[C]raw_tex\f[]
2221.PP
2222Allows raw LaTeX, TeX, and ConTeXt to be included in a document.
2223.PP
2224This extension can be enabled/disabled for the following formats (in
2225addition to \f[C]markdown\f[]):
2226.TP
2227.B input formats
2228\f[C]latex\f[], \f[C]org\f[], \f[C]textile\f[]
2229.RS
2230.RE
2231.TP
2232.B output formats
2233\f[C]textile\f[]
2234.RS
2235.RE
2236.SS Extension: \f[C]native_divs\f[]
2237.PP
2238This extension is enabled by default for HTML input.
2239This means that \f[C]div\f[]s are parsed to pandoc native elements.
2240(Alternatively, you can parse them to raw HTML using
2241\f[C]\-f\ html\-native_divs+raw_html\f[].)
2242.PP
2243When converting HTML to Markdown, for example, you may want to drop all
2244\f[C]div\f[]s and \f[C]span\f[]s:
2245.IP
2246.nf
2247\f[C]
2248pandoc\ \-f\ html\-native_divs\-native_spans\ \-t\ markdown
2249\f[]
2250.fi
2251.SS Extension: \f[C]native_spans\f[]
2252.PP
2253Analogous to \f[C]native_divs\f[] above.
2254.SS Literate Haskell support
2255.SS Extension: \f[C]literate_haskell\f[]
2256.PP
2257Treat the document as literate Haskell source.
2258.PP
2259This extension can be enabled/disabled for the following formats:
2260.TP
2261.B input formats
2262\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[]
2263.RS
2264.RE
2265.TP
2266.B output formats
2267\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], \f[C]html\f[]
2268.RS
2269.RE
2270.PP
2271If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to one of
2272the formats above, pandoc will treat the document as literate Haskell
2273source.
2274This means that
2275.IP \[bu] 2
2276In Markdown input, "bird track" sections will be parsed as Haskell code
2277rather than block quotations.
2278Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also
2279be treated as Haskell code.
2280For ATX\-style headers the character \[aq]=\[aq] will be used instead of
2281\[aq]#\[aq].
2282.IP \[bu] 2
2283In Markdown output, code blocks with classes \f[C]haskell\f[] and
2284\f[C]literate\f[] will be rendered using bird tracks, and block
2285quotations will be indented one space, so they will not be treated as
2286Haskell code.
2287In addition, headers will be rendered setext\-style (with underlines)
2288rather than ATX\-style (with \[aq]#\[aq] characters).
2289(This is because ghc treats \[aq]#\[aq] characters in column 1 as
2290introducing line numbers.)
2291.IP \[bu] 2
2292In restructured text input, "bird track" sections will be parsed as
2293Haskell code.
2294.IP \[bu] 2
2295In restructured text output, code blocks with class \f[C]haskell\f[]
2296will be rendered using bird tracks.
2297.IP \[bu] 2
2298In LaTeX input, text in \f[C]code\f[] environments will be parsed as
2299Haskell code.
2300.IP \[bu] 2
2301In LaTeX output, code blocks with class \f[C]haskell\f[] will be
2302rendered inside \f[C]code\f[] environments.
2303.IP \[bu] 2
2304In HTML output, code blocks with class \f[C]haskell\f[] will be rendered
2305with class \f[C]literatehaskell\f[] and bird tracks.
2306.PP
2307Examples:
2308.IP
2309.nf
2310\f[C]
2311pandoc\ \-f\ markdown+lhs\ \-t\ html
2312\f[]
2313.fi
2314.PP
2315reads literate Haskell source formatted with Markdown conventions and
2316writes ordinary HTML (without bird tracks).
2317.IP
2318.nf
2319\f[C]
2320pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs
2321\f[]
2322.fi
2323.PP
2324writes HTML with the Haskell code in bird tracks, so it can be copied
2325and pasted as literate Haskell source.
2326.PP
2327Note that GHC expects the bird tracks in the first column, so indentend
2328literate code blocks (e.g.
2329inside an itemized environment) will not be picked up by the Haskell
2330compiler.
2331.SS Other extensions
2332.SS Extension: \f[C]empty_paragraphs\f[]
2333.PP
2334Allows empty paragraphs.
2335By default empty paragraphs are omitted.
2336.PP
2337This extension can be enabled/disabled for the following formats:
2338.TP
2339.B input formats
2340\f[C]docx\f[], \f[C]html\f[]
2341.RS
2342.RE
2343.TP
2344.B output formats
2345\f[C]markdown\f[], \f[C]docx\f[], \f[C]odt\f[], \f[C]opendocument\f[],
2346\f[C]html\f[]
2347.RS
2348.RE
2349.SS Extension: \f[C]amuse\f[]
2350.PP
2351In the \f[C]muse\f[] input format, this enables Text::Amuse extensions
2352to Emacs Muse markup.
2353.SS Extension: \f[C]citations\f[]
2354.PP
2355Some aspects of Pandoc\[aq]s Markdown citation syntax are also accepted
2356in \f[C]org\f[] input.
2357.SH PANDOC\[aq]S MARKDOWN
2358.PP
2359Pandoc understands an extended and slightly revised version of John
2360Gruber\[aq]s Markdown syntax.
2361This document explains the syntax, noting differences from standard
2362Markdown.
2363Except where noted, these differences can be suppressed by using the
2364\f[C]markdown_strict\f[] format instead of \f[C]markdown\f[].
2365Extensions can be enabled or disabled to specify the behavior more
2366granularly.
2367They are described in the following.
2368See also Extensions above, for extensions that work also on other
2369formats.
2370.SS Philosophy
2371.PP
2372Markdown is designed to be easy to write, and, even more importantly,
2373easy to read:
2374.RS
2375.PP
2376A Markdown\-formatted document should be publishable as\-is, as plain
2377text, without looking like it\[aq]s been marked up with tags or
2378formatting instructions.
2379\-\- John Gruber
2380.RE
2381.PP
2382This principle has guided pandoc\[aq]s decisions in finding syntax for
2383tables, footnotes, and other extensions.
2384.PP
2385There is, however, one respect in which pandoc\[aq]s aims are different
2386from the original aims of Markdown.
2387Whereas Markdown was originally designed with HTML generation in mind,
2388pandoc is designed for multiple output formats.
2389Thus, while pandoc allows the embedding of raw HTML, it discourages it,
2390and provides other, non\-HTMLish ways of representing important document
2391elements like definition lists, tables, mathematics, and footnotes.
2392.SS Paragraphs
2393.PP
2394A paragraph is one or more lines of text followed by one or more blank
2395lines.
2396Newlines are treated as spaces, so you can reflow your paragraphs as you
2397like.
2398If you need a hard line break, put two or more spaces at the end of a
2399line.
2400.SS Extension: \f[C]escaped_line_breaks\f[]
2401.PP
2402A backslash followed by a newline is also a hard line break.
2403Note: in multiline and grid table cells, this is the only way to create
2404a hard line break, since trailing spaces in the cells are ignored.
2405.SS Headers
2406.PP
2407There are two kinds of headers: Setext and ATX.
2408.SS Setext\-style headers
2409.PP
2410A setext\-style header is a line of text "underlined" with a row of
2411\f[C]=\f[] signs (for a level one header) or \f[C]\-\f[] signs (for a
2412level two header):
2413.IP
2414.nf
2415\f[C]
2416A\ level\-one\ header
2417==================
2419A\ level\-two\ header
2420\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2421\f[]
2422.fi
2423.PP
2424The header text can contain inline formatting, such as emphasis (see
2425Inline formatting, below).
2426.SS ATX\-style headers
2427.PP
2428An ATX\-style header consists of one to six \f[C]#\f[] signs and a line
2429of text, optionally followed by any number of \f[C]#\f[] signs.
2430The number of \f[C]#\f[] signs at the beginning of the line is the
2431header level:
2432.IP
2433.nf
2434\f[C]
2435##\ A\ level\-two\ header
2437###\ A\ level\-three\ header\ ###
2438\f[]
2439.fi
2440.PP
2441As with setext\-style headers, the header text can contain formatting:
2442.IP
2443.nf
2444\f[C]
2445#\ A\ level\-one\ header\ with\ a\ [link](/url)\ and\ *emphasis*
2446\f[]
2447.fi
2448.SS Extension: \f[C]blank_before_header\f[]
2449.PP
2450Standard Markdown syntax does not require a blank line before a header.
2451Pandoc does require this (except, of course, at the beginning of the
2452document).
2453The reason for the requirement is that it is all too easy for a
2454\f[C]#\f[] to end up at the beginning of a line by accident (perhaps
2455through line wrapping).
2456Consider, for example:
2457.IP
2458.nf
2459\f[C]
2460I\ like\ several\ of\ their\ flavors\ of\ ice\ cream:
2461#22,\ for\ example,\ and\ #5.
2462\f[]
2463.fi
2464.SS Extension: \f[C]space_in_atx_header\f[]
2465.PP
2466Many Markdown implementations do not require a space between the opening
2467\f[C]#\f[]s of an ATX header and the header text, so that
2468\f[C]#5\ bolt\f[] and \f[C]#hashtag\f[] count as headers.
2469With this extension, pandoc does require the space.
2470.SS Header identifiers
2471.PP
2472See also the \f[C]auto_identifiers\f[] extension above.
2473.SS Extension: \f[C]header_attributes\f[]
2474.PP
2475Headers can be assigned attributes using this syntax at the end of the
2476line containing the header text:
2477.IP
2478.nf
2479\f[C]
2480{#identifier\ .class\ .class\ key=value\ key=value}
2481\f[]
2482.fi
2483.PP
2484Thus, for example, the following headers will all be assigned the
2485identifier \f[C]foo\f[]:
2486.IP
2487.nf
2488\f[C]
2489#\ My\ header\ {#foo}
2491##\ My\ header\ ##\ \ \ \ {#foo}
2493My\ other\ header\ \ \ {#foo}
2494\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
2495\f[]
2496.fi
2497.PP
2498(This syntax is compatible with PHP Markdown Extra.)
2499.PP
2500Note that although this syntax allows assignment of classes and
2501key/value attributes, writers generally don\[aq]t use all of this
2502information.
2503Identifiers, classes, and key/value attributes are used in HTML and
2504HTML\-based formats such as EPUB and slidy.
2505Identifiers are used for labels and link anchors in the LaTeX, ConTeXt,
2506Textile, and AsciiDoc writers.
2507.PP
2508Headers with the class \f[C]unnumbered\f[] will not be numbered, even if
2509\f[C]\-\-number\-sections\f[] is specified.
2510A single hyphen (\f[C]\-\f[]) in an attribute context is equivalent to
2511\f[C]\&.unnumbered\f[], and preferable in non\-English documents.
2512So,
2513.IP
2514.nf
2515\f[C]
2516#\ My\ header\ {\-}
2517\f[]
2518.fi
2519.PP
2520is just the same as
2521.IP
2522.nf
2523\f[C]
2524#\ My\ header\ {.unnumbered}
2525\f[]
2526.fi
2527.SS Extension: \f[C]implicit_header_references\f[]
2528.PP
2529Pandoc behaves as if reference links have been defined for each header.
2530So, to link to a header
2531.IP
2532.nf
2533\f[C]
2534#\ Header\ identifiers\ in\ HTML
2535\f[]
2536.fi
2537.PP
2538you can simply write
2539.IP
2540.nf
2541\f[C]
2542[Header\ identifiers\ in\ HTML]
2543\f[]
2544.fi
2545.PP
2547.IP
2548.nf
2549\f[C]
2550[Header\ identifiers\ in\ HTML][]
2551\f[]
2552.fi
2553.PP
2555.IP
2556.nf
2557\f[C]
2558[the\ section\ on\ header\ identifiers][header\ identifiers\ in
2559HTML]
2560\f[]
2561.fi
2562.PP
2563instead of giving the identifier explicitly:
2564.IP
2565.nf
2566\f[C]
2567[Header\ identifiers\ in\ HTML](#header\-identifiers\-in\-html)
2568\f[]
2569.fi
2570.PP
2571If there are multiple headers with identical text, the corresponding
2572reference will link to the first one only, and you will need to use
2573explicit links to link to the others, as described above.
2574.PP
2575Like regular reference links, these references are case\-insensitive.
2576.PP
2577Explicit link reference definitions always take priority over implicit
2578header references.
2579So, in the following example, the link will point to \f[C]bar\f[], not
2580to \f[C]#foo\f[]:
2581.IP
2582.nf
2583\f[C]
2584#\ Foo
2586[foo]:\ bar
2588See\ [foo]
2589\f[]
2590.fi
2591.SS Block quotations
2592.PP
2593Markdown uses email conventions for quoting blocks of text.
2594A block quotation is one or more paragraphs or other block elements
2595(such as lists or headers), with each line preceded by a \f[C]>\f[]
2596character and an optional space.
2597(The \f[C]>\f[] need not start at the left margin, but it should not be
2598indented more than three spaces.)
2599.IP
2600.nf
2601\f[C]
2602>\ This\ is\ a\ block\ quote.\ This
2603>\ paragraph\ has\ two\ lines.
2605>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote.
2606>\ 2.\ Second\ item.
2607\f[]
2608.fi
2609.PP
2610A "lazy" form, which requires the \f[C]>\f[] character only on the first
2611line of each block, is also allowed:
2612.IP
2613.nf
2614\f[C]
2615>\ This\ is\ a\ block\ quote.\ This
2616paragraph\ has\ two\ lines.
2618>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote.
26192.\ Second\ item.
2620\f[]
2621.fi
2622.PP
2623Among the block elements that can be contained in a block quote are
2624other block quotes.
2625That is, block quotes can be nested:
2626.IP
2627.nf
2628\f[C]
2629>\ This\ is\ a\ block\ quote.
2631>\ >\ A\ block\ quote\ within\ a\ block\ quote.
2632\f[]
2633.fi
2634.PP
2635If the \f[C]>\f[] character is followed by an optional space, that space
2636will be considered part of the block quote marker and not part of the
2637indentation of the contents.
2638Thus, to put an indented code block in a block quote, you need five
2639spaces after the \f[C]>\f[]:
2640.IP
2641.nf
2642\f[C]
2643>\ \ \ \ \ code
2644\f[]
2645.fi
2646.SS Extension: \f[C]blank_before_blockquote\f[]
2647.PP
2648Standard Markdown syntax does not require a blank line before a block
2649quote.
2650Pandoc does require this (except, of course, at the beginning of the
2651document).
2652The reason for the requirement is that it is all too easy for a
2653\f[C]>\f[] to end up at the beginning of a line by accident (perhaps
2654through line wrapping).
2655So, unless the \f[C]markdown_strict\f[] format is used, the following
2656does not produce a nested block quote in pandoc:
2657.IP
2658.nf
2659\f[C]
2660>\ This\ is\ a\ block\ quote.
2661>>\ Nested.
2662\f[]
2663.fi
2664.SS Verbatim (code) blocks
2665.SS Indented code blocks
2666.PP
2667A block of text indented four spaces (or one tab) is treated as verbatim
2668text: that is, special characters do not trigger special formatting, and
2669all spaces and line breaks are preserved.
2670For example,
2671.IP
2672.nf
2673\f[C]
2674\ \ \ \ if\ (a\ >\ 3)\ {
2675\ \ \ \ \ \ moveShip(5\ *\ gravity,\ DOWN);
2676\ \ \ \ }
2677\f[]
2678.fi
2679.PP
2680The initial (four space or one tab) indentation is not considered part
2681of the verbatim text, and is removed in the output.
2682.PP
2683Note: blank lines in the verbatim text need not begin with four spaces.
2684.SS Fenced code blocks
2685.SS Extension: \f[C]fenced_code_blocks\f[]
2686.PP
2687In addition to standard indented code blocks, pandoc supports
2688\f[I]fenced\f[] code blocks.
2689These begin with a row of three or more tildes (\f[C]~\f[]) and end with
2690a row of tildes that must be at least as long as the starting row.
2691Everything between these lines is treated as code.
2692No indentation is necessary:
2693.IP
2694.nf
2695\f[C]
2696~~~~~~~
2697if\ (a\ >\ 3)\ {
2698\ \ moveShip(5\ *\ gravity,\ DOWN);
2700~~~~~~~
2701\f[]
2702.fi
2703.PP
2704Like regular code blocks, fenced code blocks must be separated from
2705surrounding text by blank lines.
2706.PP
2707If the code itself contains a row of tildes or backticks, just use a
2708longer row of tildes or backticks at the start and end:
2709.IP
2710.nf
2711\f[C]
2712~~~~~~~~~~~~~~~~
2713~~~~~~~~~~
2714code\ including\ tildes
2715~~~~~~~~~~
2716~~~~~~~~~~~~~~~~
2717\f[]
2718.fi
2719.SS Extension: \f[C]backtick_code_blocks\f[]
2720.PP
2721Same as \f[C]fenced_code_blocks\f[], but uses backticks (\f[C]`\f[])
2722instead of tildes (\f[C]~\f[]).
2723.SS Extension: \f[C]fenced_code_attributes\f[]
2724.PP
2725Optionally, you may attach attributes to fenced or backtick code block
2726using this syntax:
2727.IP
2728.nf
2729\f[C]
2730~~~~\ {#mycode\ .haskell\ .numberLines\ startFrom="100"}
2731qsort\ []\ \ \ \ \ =\ []
2732qsort\ (x:xs)\ =\ qsort\ (filter\ (<\ x)\ xs)\ ++\ [x]\ ++
2733\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ qsort\ (filter\ (>=\ x)\ xs)
2734~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2735\f[]
2736.fi
2737.PP
2738Here \f[C]mycode\f[] is an identifier, \f[C]haskell\f[] and
2739\f[C]numberLines\f[] are classes, and \f[C]startFrom\f[] is an attribute
2740with value \f[C]100\f[].
2741Some output formats can use this information to do syntax highlighting.
2742Currently, the only output formats that uses this information are HTML,
2743LaTeX, Docx, and Ms.
2744If highlighting is supported for your output format and language, then
2745the code block above will appear highlighted, with numbered lines.
2746(To see which languages are supported, type
2747\f[C]pandoc\ \-\-list\-highlight\-languages\f[].) Otherwise, the code
2748block above will appear as follows:
2749.IP
2750.nf
2751\f[C]
2752<pre\ id="mycode"\ class="haskell\ numberLines"\ startFrom="100">
2753\ \ <code>
2754\ \ ...
2755\ \ </code>
2756</pre>
2757\f[]
2758.fi
2759.PP
2760The \f[C]numberLines\f[] (or \f[C]number\-lines\f[]) class will cause
2761the lines of the code block to be numbered, starting with \f[C]1\f[] or
2762the value of the \f[C]startFrom\f[] attribute.
2763The \f[C]lineAnchors\f[] (or \f[C]line\-anchors\f[]) class will cause
2764the lines to be clickable anchors in HTML output.
2765.PP
2766A shortcut form can also be used for specifying the language of the code
2767block:
2768.IP
2769.nf
2770\f[C]
2771```haskell
2772qsort\ []\ =\ []
2773```
2774\f[]
2775.fi
2776.PP
2777This is equivalent to:
2778.IP
2779.nf
2780\f[C]
2781```\ {.haskell}
2782qsort\ []\ =\ []
2783```
2784\f[]
2785.fi
2786.PP
2787If the \f[C]fenced_code_attributes\f[] extension is disabled, but input
2788contains class attribute(s) for the code block, the first class
2789attribute will be printed after the opening fence as a bare word.
2790.PP
2791To prevent all highlighting, use the \f[C]\-\-no\-highlight\f[] flag.
2792To set the highlighting style, use \f[C]\-\-highlight\-style\f[].
2793For more information on highlighting, see Syntax highlighting, below.
2794.SS Line blocks
2795.SS Extension: \f[C]line_blocks\f[]
2796.PP
2797A line block is a sequence of lines beginning with a vertical bar
2798(\f[C]|\f[]) followed by a space.
2799The division into lines will be preserved in the output, as will any
2800leading spaces; otherwise, the lines will be formatted as Markdown.
2801This is useful for verse and addresses:
2802.IP
2803.nf
2804\f[C]
2805|\ The\ limerick\ packs\ laughs\ anatomical
2806|\ In\ space\ that\ is\ quite\ economical.
2807|\ \ \ \ But\ the\ good\ ones\ I\[aq]ve\ seen
2808|\ \ \ \ So\ seldom\ are\ clean
2809|\ And\ the\ clean\ ones\ so\ seldom\ are\ comical
2811|\ 200\ Main\ St.
2812|\ Berkeley,\ CA\ 94718
2813\f[]
2814.fi
2815.PP
2816The lines can be hard\-wrapped if needed, but the continuation line must
2817begin with a space.
2818.IP
2819.nf
2820\f[C]
2821|\ The\ Right\ Honorable\ Most\ Venerable\ and\ Righteous\ Samuel\ L.
2822\ \ Constable,\ Jr.
2823|\ 200\ Main\ St.
2824|\ Berkeley,\ CA\ 94718
2825\f[]
2826.fi
2827.PP
2828This syntax is borrowed from reStructuredText.
2829.SS Lists
2830.SS Bullet lists
2831.PP
2832A bullet list is a list of bulleted list items.
2833A bulleted list item begins with a bullet (\f[C]*\f[], \f[C]+\f[], or
2834\f[C]\-\f[]).
2835Here is a simple example:
2836.IP
2837.nf
2838\f[C]
2839*\ one
2840*\ two
2841*\ three
2842\f[]
2843.fi
2844.PP
2845This will produce a "compact" list.
2846If you want a "loose" list, in which each item is formatted as a
2847paragraph, put spaces between the items:
2848.IP
2849.nf
2850\f[C]
2851*\ one
2853*\ two
2855*\ three
2856\f[]
2857.fi
2858.PP
2859The bullets need not be flush with the left margin; they may be indented
2860one, two, or three spaces.
2861The bullet must be followed by whitespace.
2862.PP
2863List items look best if subsequent lines are flush with the first line
2864(after the bullet):
2865.IP
2866.nf
2867\f[C]
2868*\ here\ is\ my\ first
2869\ \ list\ item.
2870*\ and\ my\ second.
2871\f[]
2872.fi
2873.PP
2874But Markdown also allows a "lazy" format:
2875.IP
2876.nf
2877\f[C]
2878*\ here\ is\ my\ first
2879list\ item.
2880*\ and\ my\ second.
2881\f[]
2882.fi
2883.SS Block content in list items
2884.PP
2885A list item may contain multiple paragraphs and other block\-level
2886content.
2887However, subsequent paragraphs must be preceded by a blank line and
2888indented to line up with the first non\-space content after the list
2889marker.
2890.IP
2891.nf
2892\f[C]
2893\ \ *\ First\ paragraph.
2895\ \ \ \ Continued.
2897\ \ *\ Second\ paragraph.\ With\ a\ code\ block,\ which\ must\ be\ indented
2898\ \ \ \ eight\ spaces:
2900\ \ \ \ \ \ \ \ {\ code\ }
2901\f[]
2902.fi
2903.PP
2904Exception: if the list marker is followed by an indented code block,
2905which must begin 5 spaces after the list marker, then subsequent
2906paragraphs must begin two columns after the last character of the list
2907marker:
2908.IP
2909.nf
2910\f[C]
2911*\ \ \ \ \ code
2913\ \ continuation\ paragraph
2914\f[]
2915.fi
2916.PP
2917List items may include other lists.
2918In this case the preceding blank line is optional.
2919The nested list must be indented to line up with the first non\-space
2920character after the list marker of the containing list item.
2921.IP
2922.nf
2923\f[C]
2924*\ fruits
2925\ \ +\ apples
2926\ \ \ \ \-\ macintosh
2927\ \ \ \ \-\ red\ delicious
2928\ \ +\ pears
2929\ \ +\ peaches
2930*\ vegetables
2931\ \ +\ broccoli
2932\ \ +\ chard
2933\f[]
2934.fi
2935.PP
2936As noted above, Markdown allows you to write list items "lazily,"
2937instead of indenting continuation lines.
2938However, if there are multiple paragraphs or other blocks in a list
2939item, the first line of each must be indented.
2940.IP
2941.nf
2942\f[C]
2943+\ A\ lazy,\ lazy,\ list
2944item.
2946+\ Another\ one;\ this\ looks
2947bad\ but\ is\ legal.
2949\ \ \ \ Second\ paragraph\ of\ second
2950list\ item.
2951\f[]
2952.fi
2953.SS Ordered lists
2954.PP
2955Ordered lists work just like bulleted lists, except that the items begin
2956with enumerators rather than bullets.
2957.PP
2958In standard Markdown, enumerators are decimal numbers followed by a
2959period and a space.
2960The numbers themselves are ignored, so there is no difference between
2961this list:
2962.IP
2963.nf
2964\f[C]
29651.\ \ one
29662.\ \ two
29673.\ \ three
2968\f[]
2969.fi
2970.PP
2971and this one:
2972.IP
2973.nf
2974\f[C]
29755.\ \ one
29767.\ \ two
29771.\ \ three
2978\f[]
2979.fi
2980.SS Extension: \f[C]fancy_lists\f[]
2981.PP
2982Unlike standard Markdown, pandoc allows ordered list items to be marked
2983with uppercase and lowercase letters and roman numerals, in addition to
2984Arabic numerals.
2985List markers may be enclosed in parentheses or followed by a single
2986right\-parentheses or period.
2987They must be separated from the text that follows by at least one space,
2988and, if the list marker is a capital letter with a period, by at least
2989two spaces.
2990.PP
2991The \f[C]fancy_lists\f[] extension also allows \[aq]\f[C]#\f[]\[aq] to
2992be used as an ordered list marker in place of a numeral:
2993.IP
2994.nf
2995\f[C]
2996#.\ one
2997#.\ two
2998\f[]
2999.fi
3000.SS Extension: \f[C]startnum\f[]
3001.PP
3002Pandoc also pays attention to the type of list marker used, and to the
3003starting number, and both of these are preserved where possible in the
3004output format.
3005Thus, the following yields a list with numbers followed by a single
3006parenthesis, starting with 9, and a sublist with lowercase roman
3007numerals:
3008.IP
3009.nf
3010\f[C]
3011\ 9)\ \ Ninth
301210)\ \ Tenth
301311)\ \ Eleventh
3014\ \ \ \ \ \ \ i.\ subone
3015\ \ \ \ \ \ ii.\ subtwo
3016\ \ \ \ \ iii.\ subthree
3017\f[]
3018.fi
3019.PP
3020Pandoc will start a new list each time a different type of list marker
3021is used.
3022So, the following will create three lists:
3023.IP
3024.nf
3025\f[C]
3026(2)\ Two
3027(5)\ Three
30281.\ \ Four
3029*\ \ \ Five
3030\f[]
3031.fi
3032.PP
3033If default list markers are desired, use \f[C]#.\f[]:
3034.IP
3035.nf
3036\f[C]
3037#.\ \ one
3038#.\ \ two
3039#.\ \ three
3040\f[]
3041.fi
3042.SS Definition lists
3043.SS Extension: \f[C]definition_lists\f[]
3044.PP
3045Pandoc supports definition lists, using the syntax of PHP Markdown Extra
3046with some extensions.
3047.IP
3048.nf
3049\f[C]
3050Term\ 1
3052:\ \ \ Definition\ 1
3054Term\ 2\ with\ *inline\ markup*
3056:\ \ \ Definition\ 2
3058\ \ \ \ \ \ \ \ {\ some\ code,\ part\ of\ Definition\ 2\ }
3060\ \ \ \ Third\ paragraph\ of\ definition\ 2.
3061\f[]
3062.fi
3063.PP
3064Each term must fit on one line, which may optionally be followed by a
3065blank line, and must be followed by one or more definitions.
3066A definition begins with a colon or tilde, which may be indented one or
3067two spaces.
3068.PP
3069A term may have multiple definitions, and each definition may consist of
3070one or more block elements (paragraph, code block, list, etc.), each
3071indented four spaces or one tab stop.
3072The body of the definition (including the first line, aside from the
3073colon or tilde) should be indented four spaces.
3074However, as with other Markdown lists, you can "lazily" omit indentation
3075except at the beginning of a paragraph or other block element:
3076.IP
3077.nf
3078\f[C]
3079Term\ 1
3081:\ \ \ Definition
3082with\ lazy\ continuation.
3084\ \ \ \ Second\ paragraph\ of\ the\ definition.
3085\f[]
3086.fi
3087.PP
3088If you leave space before the definition (as in the example above), the
3089text of the definition will be treated as a paragraph.
3090In some output formats, this will mean greater spacing between
3091term/definition pairs.
3092For a more compact definition list, omit the space before the
3093definition:
3094.IP
3095.nf
3096\f[C]
3097Term\ 1
3098\ \ ~\ Definition\ 1
3100Term\ 2
3101\ \ ~\ Definition\ 2a
3102\ \ ~\ Definition\ 2b
3103\f[]
3104.fi
3105.PP
3106Note that space between items in a definition list is required.
3107(A variant that loosens this requirement, but disallows "lazy" hard
3108wrapping, can be activated with \f[C]compact_definition_lists\f[]: see
3109Non\-pandoc extensions, below.)
3110.SS Numbered example lists
3111.SS Extension: \f[C]example_lists\f[]
3112.PP
3113The special list marker \f[C]\@\f[] can be used for sequentially
3114numbered examples.
3115The first list item with a \f[C]\@\f[] marker will be numbered
3116\[aq]1\[aq], the next \[aq]2\[aq], and so on, throughout the document.
3117The numbered examples need not occur in a single list; each new list
3118using \f[C]\@\f[] will take up where the last stopped.
3119So, for example:
3120.IP
3121.nf
3122\f[C]
3123(\@)\ \ My\ first\ example\ will\ be\ numbered\ (1).
3124(\@)\ \ My\ second\ example\ will\ be\ numbered\ (2).
3126Explanation\ of\ examples.
3128(\@)\ \ My\ third\ example\ will\ be\ numbered\ (3).
3129\f[]
3130.fi
3131.PP
3132Numbered examples can be labeled and referred to elsewhere in the
3133document:
3134.IP
3135.nf
3136\f[C]
3137(\@good)\ \ This\ is\ a\ good\ example.
3139As\ (\@good)\ illustrates,\ ...
3140\f[]
3141.fi
3142.PP
3143The label can be any string of alphanumeric characters, underscores, or
3144hyphens.
3145.PP
3146Note: continuation paragraphs in example lists must always be indented
3147four spaces, regardless of the length of the list marker.
3148That is, example lists always behave as if the \f[C]four_space_rule\f[]
3149extension is set.
3150This is because example labels tend to be long, and indenting content to
3151the first non\-space character after the label would be awkward.
3152.SS Compact and loose lists
3153.PP
3154Pandoc behaves differently from \f[C]Markdown.pl\f[] on some "edge
3155cases" involving lists.
3156Consider this source:
3157.IP
3158.nf
3159\f[C]
3160+\ \ \ First
3161+\ \ \ Second:
3162\ \ \ \ \-\ \ \ Fee
3163\ \ \ \ \-\ \ \ Fie
3164\ \ \ \ \-\ \ \ Foe
3166+\ \ \ Third
3167\f[]
3168.fi
3169.PP
3170Pandoc transforms this into a "compact list" (with no \f[C]<p>\f[] tags
3171around "First", "Second", or "Third"), while Markdown puts \f[C]<p>\f[]
3172tags around "Second" and "Third" (but not "First"), because of the blank
3173space around "Third".
3174Pandoc follows a simple rule: if the text is followed by a blank line,
3175it is treated as a paragraph.
3176Since "Second" is followed by a list, and not a blank line, it isn\[aq]t
3177treated as a paragraph.
3178The fact that the list is followed by a blank line is irrelevant.
3179(Note: Pandoc works this way even when the \f[C]markdown_strict\f[]
3180format is specified.
3181This behavior is consistent with the official Markdown syntax
3182description, even though it is different from that of
3183\f[C]Markdown.pl\f[].)
3184.SS Ending a list
3185.PP
3186What if you want to put an indented code block after a list?
3187.IP
3188.nf
3189\f[C]
3190\-\ \ \ item\ one
3191\-\ \ \ item\ two
3193\ \ \ \ {\ my\ code\ block\ }
3194\f[]
3195.fi
3196.PP
3197Trouble! Here pandoc (like other Markdown implementations) will treat
3198\f[C]{\ my\ code\ block\ }\f[] as the second paragraph of item two, and
3199not as a code block.
3200.PP
3201To "cut off" the list after item two, you can insert some non\-indented
3202content, like an HTML comment, which won\[aq]t produce visible output in
3203any format:
3204.IP
3205.nf
3206\f[C]
3207\-\ \ \ item\ one
3208\-\ \ \ item\ two
3210<!\-\-\ end\ of\ list\ \-\->
3212\ \ \ \ {\ my\ code\ block\ }
3213\f[]
3214.fi
3215.PP
3216You can use the same trick if you want two consecutive lists instead of
3217one big list:
3218.IP
3219.nf
3220\f[C]
32211.\ \ one
32222.\ \ two
32233.\ \ three
3225<!\-\-\ \-\->
32271.\ \ uno
32282.\ \ dos
32293.\ \ tres
3230\f[]
3231.fi
3232.SS Horizontal rules
3233.PP
3234A line containing a row of three or more \f[C]*\f[], \f[C]\-\f[], or
3235\f[C]_\f[] characters (optionally separated by spaces) produces a
3236horizontal rule:
3237.IP
3238.nf
3239\f[C]
3240*\ \ *\ \ *\ \ *
3242\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3243\f[]
3244.fi
3245.SS Tables
3246.PP
3247Four kinds of tables may be used.
3248The first three kinds presuppose the use of a fixed\-width font, such as
3249Courier.
3250The fourth kind can be used with proportionally spaced fonts, as it does
3251not require lining up columns.
3252.SS Extension: \f[C]table_captions\f[]
3253.PP
3254A caption may optionally be provided with all 4 kinds of tables (as
3255illustrated in the examples below).
3256A caption is a paragraph beginning with the string \f[C]Table:\f[] (or
3257just \f[C]:\f[]), which will be stripped off.
3258It may appear either before or after the table.
3259.SS Extension: \f[C]simple_tables\f[]
3260.PP
3261Simple tables look like this:
3262.IP
3263.nf
3264\f[C]
3265\ \ Right\ \ \ \ \ Left\ \ \ \ \ Center\ \ \ \ \ Default
3266\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
3267\ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ 12
3268\ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ 123
3269\ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ 1
3271Table:\ \ Demonstration\ of\ simple\ table\ syntax.
3272\f[]
3273.fi
3274.PP
3275The headers and table rows must each fit on one line.
3276Column alignments are determined by the position of the header text
3277relative to the dashed line below it:
3278.IP \[bu] 2
3279If the dashed line is flush with the header text on the right side but
3280extends beyond it on the left, the column is right\-aligned.
3281.IP \[bu] 2
3282If the dashed line is flush with the header text on the left side but
3283extends beyond it on the right, the column is left\-aligned.
3284.IP \[bu] 2
3285If the dashed line extends beyond the header text on both sides, the
3286column is centered.
3287.IP \[bu] 2
3288If the dashed line is flush with the header text on both sides, the
3289default alignment is used (in most cases, this will be left).
3290.PP
3291The table must end with a blank line, or a line of dashes followed by a
3292blank line.
3293.PP
3294The column headers may be omitted, provided a dashed line is used to end
3295the table.
3296For example:
3297.IP
3298.nf
3299\f[C]
3300\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
3301\ \ \ \ \ 12\ \ \ \ \ 12\ \ \ \ \ \ \ \ 12\ \ \ \ \ \ \ \ \ \ \ \ \ 12
3302\ \ \ \ 123\ \ \ \ \ 123\ \ \ \ \ \ \ 123\ \ \ \ \ \ \ \ \ \ \ 123
3303\ \ \ \ \ \ 1\ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ 1
3304\-\-\-\-\-\-\-\ \ \ \ \ \-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\ \ \ \-\-\-\-\-\-\-
3305\f[]
3306.fi
3307.PP
3308When headers are omitted, column alignments are determined on the basis
3309of the first line of the table body.
3310So, in the tables above, the columns would be right, left, center, and
3311right aligned, respectively.
3312.SS Extension: \f[C]multiline_tables\f[]
3313.PP
3314Multiline tables allow headers and table rows to span multiple lines of
3315text (but cells that span multiple columns or rows of the table are not
3316supported).
3317Here is an example:
3318.IP
3319.nf
3320\f[C]
3321\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3322\ Centered\ \ \ Default\ \ \ \ \ \ \ \ \ \ \ Right\ Left
3323\ \ Header\ \ \ \ Aligned\ \ \ \ \ \ \ \ \ Aligned\ Aligned
3324\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3325\ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that
3326\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines.
3328\ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note
3329\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between
3330\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows.
3331\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3333Table:\ Here\[aq]s\ the\ caption.\ It,\ too,\ may\ span
3334multiple\ lines.
3335\f[]
3336.fi
3337.PP
3338These work like simple tables, but with the following differences:
3339.IP \[bu] 2
3340They must begin with a row of dashes, before the header text (unless the
3341headers are omitted).
3342.IP \[bu] 2
3343They must end with a row of dashes, then a blank line.
3344.IP \[bu] 2
3345The rows must be separated by blank lines.
3346.PP
3347In multiline tables, the table parser pays attention to the widths of
3348the columns, and the writers try to reproduce these relative widths in
3349the output.
3350So, if you find that one of the columns is too narrow in the output, try
3351widening it in the Markdown source.
3352.PP
3353Headers may be omitted in multiline tables as well as simple tables:
3354.IP
3355.nf
3356\f[C]
3357\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3358\ \ \ First\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 12.0\ Example\ of\ a\ row\ that
3359\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ spans\ multiple\ lines.
3361\ \ Second\ \ \ \ row\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 5.0\ Here\[aq]s\ another\ one.\ Note
3362\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ the\ blank\ line\ between
3363\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ rows.
3364\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\ \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
3366:\ Here\[aq]s\ a\ multiline\ table\ without\ headers.
3367\f[]
3368.fi
3369.PP
3370It is possible for a multiline table to have just one row, but the row
3371should be followed by a blank line (and then the row of dashes that ends
3372the table), or the table may be interpreted as a simple table.
3373.SS Extension: \f[C]grid_tables\f[]
3374.PP
3375Grid tables look like this:
3376.IP
3377.nf
3378\f[C]
3379:\ Sample\ grid\ table.
3381+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3382|\ Fruit\ \ \ \ \ \ \ \ \ |\ Price\ \ \ \ \ \ \ \ \ |\ Advantages\ \ \ \ \ \ \ \ \ |
3383+===============+===============+====================+
3384|\ Bananas\ \ \ \ \ \ \ |\ $1.34\ \ \ \ \ \ \ \ \ |\ \-\ built\-in\ wrapper\ |
3385|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ bright\ color\ \ \ \ \ |
3386+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3387|\ Oranges\ \ \ \ \ \ \ |\ $2.10\ \ \ \ \ \ \ \ \ |\ \-\ cures\ scurvy\ \ \ \ \ |
3388|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ |\ \-\ tasty\ \ \ \ \ \ \ \ \ \ \ \ |
3389+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3390\f[]
3391.fi
3392.PP
3393The row of \f[C]=\f[]s separates the header from the table body, and can
3394be omitted for a headerless table.
3395The cells of grid tables may contain arbitrary block elements (multiple
3396paragraphs, code blocks, lists, etc.).
3397Cells that span multiple columns or rows are not supported.
3398Grid tables can be created easily using Emacs table mode.
3399.PP
3400Alignments can be specified as with pipe tables, by putting colons at
3401the boundaries of the separator line after the header:
3402.IP
3403.nf
3404\f[C]
3405+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3406|\ Right\ \ \ \ \ \ \ \ \ |\ Left\ \ \ \ \ \ \ \ \ \ |\ Centered\ \ \ \ \ \ \ \ \ \ \ |
3407+==============:+:==============+:==================:+
3408|\ Bananas\ \ \ \ \ \ \ |\ $1.34\ \ \ \ \ \ \ \ \ |\ built\-in\ wrapper\ \ \ |
3409+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3410\f[]
3411.fi
3412.PP
3413For headerless tables, the colons go on the top line instead:
3414.IP
3415.nf
3416\f[C]
3417+\-\-\-\-\-\-\-\-\-\-\-\-\-\-:+:\-\-\-\-\-\-\-\-\-\-\-\-\-\-+:\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-:+
3418|\ Right\ \ \ \ \ \ \ \ \ |\ Left\ \ \ \ \ \ \ \ \ \ |\ Centered\ \ \ \ \ \ \ \ \ \ \ |
3419+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
3420\f[]
3421.fi
3422.SS Grid Table Limitations
3423.PP
3424Pandoc does not support grid tables with row spans or column spans.
3425This means that neither variable numbers of columns across rows nor
3426variable numbers of rows across columns are supported by Pandoc.
3427All grid tables must have the same number of columns in each row, and
3428the same number of rows in each column.
3429For example, the Docutils sample grid tables will not render as expected
3430with Pandoc.
3431.SS Extension: \f[C]pipe_tables\f[]
3432.PP
3433Pipe tables look like this:
3434.IP
3435.nf
3436\f[C]
3437|\ Right\ |\ Left\ |\ Default\ |\ Center\ |
3438|\-\-\-\-\-\-:|:\-\-\-\-\-|\-\-\-\-\-\-\-\-\-|:\-\-\-\-\-\-:|
3439|\ \ \ 12\ \ |\ \ 12\ \ |\ \ \ \ 12\ \ \ |\ \ \ \ 12\ \ |
3440|\ \ 123\ \ |\ \ 123\ |\ \ \ 123\ \ \ |\ \ \ 123\ \ |
3441|\ \ \ \ 1\ \ |\ \ \ \ 1\ |\ \ \ \ \ 1\ \ \ |\ \ \ \ \ 1\ \ |
3443\ \ :\ Demonstration\ of\ pipe\ table\ syntax.
3444\f[]
3445.fi
3446.PP
3447The syntax is identical to PHP Markdown Extra tables.
3448The beginning and ending pipe characters are optional, but pipes are
3449required between all columns.
3450The colons indicate column alignment as shown.
3451The header cannot be omitted.
3452To simulate a headerless table, include a header with blank cells.
3453.PP
3454Since the pipes indicate column boundaries, columns need not be
3455vertically aligned, as they are in the above example.
3456So, this is a perfectly legal (though ugly) pipe table:
3457.IP
3458.nf
3459\f[C]
3460fruit|\ price
3461\-\-\-\-\-|\-\-\-\-\-:
3462apple|2.05
3463pear|1.37
3464orange|3.09
3465\f[]
3466.fi
3467.PP
3468The cells of pipe tables cannot contain block elements like paragraphs
3469and lists, and cannot span multiple lines.
3470If a pipe table contains a row whose printable content is wider than the
3471column width (see \f[C]\-\-columns\f[]), then the cell contents will
3472wrap, with the relative cell widths determined by the widths of the
3473separator lines.
3474(In this case, the table will take up the full text width.) If no lines
3475are wider than column width, then cell contents will not be wrapped, and
3476the cells will be sized to their contents.
3477.PP
3478Note: pandoc also recognizes pipe tables of the following form, as can
3479be produced by Emacs\[aq] orgtbl\-mode:
3480.IP
3481.nf
3482\f[C]
3483|\ One\ |\ Two\ \ \ |
3484|\-\-\-\-\-+\-\-\-\-\-\-\-|
3485|\ my\ \ |\ table\ |
3486|\ is\ \ |\ nice\ \ |
3487\f[]
3488.fi
3489.PP
3490The difference is that \f[C]+\f[] is used instead of \f[C]|\f[].
3491Other orgtbl features are not supported.
3492In particular, to get non\-default column alignment, you\[aq]ll need to
3493add colons as above.
3494.SS Metadata blocks
3495.SS Extension: \f[C]pandoc_title_block\f[]
3496.PP
3497If the file begins with a title block
3498.IP
3499.nf
3500\f[C]
3501%\ title
3502%\ author(s)\ (separated\ by\ semicolons)
3503%\ date
3504\f[]
3505.fi
3506.PP
3507it will be parsed as bibliographic information, not regular text.
3508(It will be used, for example, in the title of standalone LaTeX or HTML
3509output.) The block may contain just a title, a title and an author, or
3510all three elements.
3511If you want to include an author but no title, or a title and a date but
3512no author, you need a blank line:
3513.IP
3514.nf
3515\f[C]
3517%\ Author
3519%\ My\ title
3521%\ June\ 15,\ 2006
3522\f[]
3523.fi
3524.PP
3525The title may occupy multiple lines, but continuation lines must begin
3526with leading space, thus:
3527.IP
3528.nf
3529\f[C]
3530%\ My\ title
3531\ \ on\ multiple\ lines
3532\f[]
3533.fi
3534.PP
3535If a document has multiple authors, the authors may be put on separate
3536lines with leading space, or separated by semicolons, or both.
3537So, all of the following are equivalent:
3538.IP
3539.nf
3540\f[C]
3541%\ Author\ One
3542\ \ Author\ Two
3544%\ Author\ One;\ Author\ Two
3546%\ Author\ One;
3547\ \ Author\ Two
3548\f[]
3549.fi
3550.PP
3551The date must fit on one line.
3552.PP
3553All three metadata fields may contain standard inline formatting
3554(italics, links, footnotes, etc.).
3555.PP
3556Title blocks will always be parsed, but they will affect the output only
3557when the \f[C]\-\-standalone\f[] (\f[C]\-s\f[]) option is chosen.
3558In HTML output, titles will appear twice: once in the document head \-\-
3559this is the title that will appear at the top of the window in a browser
3560\-\- and once at the beginning of the document body.
3561The title in the document head can have an optional prefix attached
3562(\f[C]\-\-title\-prefix\f[] or \f[C]\-T\f[] option).
3563The title in the body appears as an H1 element with class "title", so it
3564can be suppressed or reformatted with CSS.
3565If a title prefix is specified with \f[C]\-T\f[] and no title block
3566appears in the document, the title prefix will be used by itself as the
3567HTML title.
3568.PP
3569The man page writer extracts a title, man page section number, and other
3570header and footer information from the title line.
3571The title is assumed to be the first word on the title line, which may
3572optionally end with a (single\-digit) section number in parentheses.
3573(There should be no space between the title and the parentheses.)
3574Anything after this is assumed to be additional footer and header text.
3575A single pipe character (\f[C]|\f[]) should be used to separate the
3576footer text from the header text.
3577Thus,
3578.IP
3579.nf
3580\f[C]
3581%\ PANDOC(1)
3582\f[]
3583.fi
3584.PP
3585will yield a man page with the title \f[C]PANDOC\f[] and section 1.
3586.IP
3587.nf
3588\f[C]
3589%\ PANDOC(1)\ Pandoc\ User\ Manuals
3590\f[]
3591.fi
3592.PP
3593will also have "Pandoc User Manuals" in the footer.
3594.IP
3595.nf
3596\f[C]
3597%\ PANDOC(1)\ Pandoc\ User\ Manuals\ |\ Version\ 4.0
3598\f[]
3599.fi
3600.PP
3601will also have "Version 4.0" in the header.
3602.SS Extension: \f[C]yaml_metadata_block\f[]
3603.PP
3604A YAML metadata block is a valid YAML object, delimited by a line of
3605three hyphens (\f[C]\-\-\-\f[]) at the top and a line of three hyphens
3606(\f[C]\-\-\-\f[]) or three dots (\f[C]\&...\f[]) at the bottom.
3607A YAML metadata block may occur anywhere in the document, but if it is
3608not at the beginning, it must be preceded by a blank line.
3609(Note that, because of the way pandoc concatenates input files when
3610several are provided, you may also keep the metadata in a separate YAML
3611file and pass it to pandoc as an argument, along with your Markdown
3612files:
3613.IP
3614.nf
3615\f[C]
3616pandoc\ chap1.md\ chap2.md\ chap3.md\ metadata.yaml\ \-s\ \-o\ book.html
3617\f[]
3618.fi
3619.PP
3620Just be sure that the YAML file begins with \f[C]\-\-\-\f[] and ends
3621with \f[C]\-\-\-\f[] or \f[C]\&...\f[].)
3622.PP
3623Metadata will be taken from the fields of the YAML object and added to
3624any existing document metadata.
3625Metadata can contain lists and objects (nested arbitrarily), but all
3626string scalars will be interpreted as Markdown.
3627Fields with names ending in an underscore will be ignored by pandoc.
3628(They may be given a role by external processors.)
3629.PP
3630A document may contain multiple metadata blocks.
3631The metadata fields will be combined through a \f[I]left\-biased
3632union\f[]: if two metadata blocks attempt to set the same field, the
3633value from the first block will be taken.
3634.PP
3635When pandoc is used with \f[C]\-t\ markdown\f[] to create a Markdown
3636document, a YAML metadata block will be produced only if the
3637\f[C]\-s/\-\-standalone\f[] option is used.
3638All of the metadata will appear in a single block at the beginning of
3639the document.
3640.PP
3641Note that YAML escaping rules must be followed.
3642Thus, for example, if a title contains a colon, it must be quoted.
3643The pipe character (\f[C]|\f[]) can be used to begin an indented block
3644that will be interpreted literally, without need for escaping.
3645This form is necessary when the field contains blank lines or
3646block\-level formatting:
3647.IP
3648.nf
3649\f[C]
3650\-\-\-
3651title:\ \ \[aq]This\ is\ the\ title:\ it\ contains\ a\ colon\[aq]
3652author:
3653\-\ Author\ One
3654\-\ Author\ Two
3655tags:\ [nothing,\ nothingness]
3656abstract:\ |
3657\ \ This\ is\ the\ abstract.
3659\ \ It\ consists\ of\ two\ paragraphs.
3660\&...
3661\f[]
3662.fi
3663.PP
3664Template variables will be set automatically from the metadata.
3665Thus, for example, in writing HTML, the variable \f[C]abstract\f[] will
3666be set to the HTML equivalent of the Markdown in the \f[C]abstract\f[]
3667field:
3668.IP
3669.nf
3670\f[C]
3671<p>This\ is\ the\ abstract.</p>
3672<p>It\ consists\ of\ two\ paragraphs.</p>
3673\f[]
3674.fi
3675.PP
3676Variables can contain arbitrary YAML structures, but the template must
3677match this structure.
3678The \f[C]author\f[] variable in the default templates expects a simple
3679list or string, but can be changed to support more complicated
3680structures.
3681The following combination, for example, would add an affiliation to the
3682author if one is given:
3683.IP
3684.nf
3685\f[C]
3686\-\-\-
3687title:\ The\ document\ title
3688author:
3689\-\ name:\ Author\ One
3690\ \ affiliation:\ University\ of\ Somewhere
3691\-\ name:\ Author\ Two
3692\ \ affiliation:\ University\ of\ Nowhere
3693\&...
3694\f[]
3695.fi
3696.PP
3697To use the structured authors in the example above, you would need a
3698custom template:
3699.IP
3700.nf
3701\f[C]
3702$for(author)$
3703$if(author.name)$
3704$author.name$$if(author.affiliation)$\ ($author.affiliation$)$endif$
3705$else$
3706$author$
3707$endif$
3708$endfor$
3709\f[]
3710.fi
3711.SS Backslash escapes
3712.SS Extension: \f[C]all_symbols_escapable\f[]
3713.PP
3714Except inside a code block or inline code, any punctuation or space
3715character preceded by a backslash will be treated literally, even if it
3716would normally indicate formatting.
3717Thus, for example, if one writes
3718.IP
3719.nf
3720\f[C]
3721*\\*hello\\**
3722\f[]
3723.fi
3724.PP
3725one will get
3726.IP
3727.nf
3728\f[C]
3729<em>*hello*</em>
3730\f[]
3731.fi
3732.PP
3733instead of
3734.IP
3735.nf
3736\f[C]
3737<strong>hello</strong>
3738\f[]
3739.fi
3740.PP
3741This rule is easier to remember than standard Markdown\[aq]s rule, which
3742allows only the following characters to be backslash\-escaped:
3743.IP
3744.nf
3745\f[C]
3746\\`*_{}[]()>#+\-.!
3747\f[]
3748.fi
3749.PP
3750(However, if the \f[C]markdown_strict\f[] format is used, the standard
3751Markdown rule will be used.)
3752.PP
3753A backslash\-escaped space is parsed as a nonbreaking space.
3754It will appear in TeX output as \f[C]~\f[] and in HTML and XML as
3755\f[C]\\&#160;\f[] or \f[C]\\&nbsp;\f[].
3756.PP
3757A backslash\-escaped newline (i.e.
3758a backslash occurring at the end of a line) is parsed as a hard line
3759break.
3760It will appear in TeX output as \f[C]\\\\\f[] and in HTML as
3761\f[C]<br\ />\f[].
3762This is a nice alternative to Markdown\[aq]s "invisible" way of
3763indicating hard line breaks using two trailing spaces on a line.
3764.PP
3765Backslash escapes do not work in verbatim contexts.
3766.SS Inline formatting
3767.SS Emphasis
3768.PP
3769To \f[I]emphasize\f[] some text, surround it with \f[C]*\f[]s or
3770\f[C]_\f[], like this:
3771.IP
3772.nf
3773\f[C]
3774This\ text\ is\ _emphasized\ with\ underscores_,\ and\ this
3775is\ *emphasized\ with\ asterisks*.
3776\f[]
3777.fi
3778.PP
3779Double \f[C]*\f[] or \f[C]_\f[] produces \f[B]strong emphasis\f[]:
3780.IP
3781.nf
3782\f[C]
3783This\ is\ **strong\ emphasis**\ and\ __with\ underscores__.
3784\f[]
3785.fi
3786.PP
3787A \f[C]*\f[] or \f[C]_\f[] character surrounded by spaces, or
3788backslash\-escaped, will not trigger emphasis:
3789.IP
3790.nf
3791\f[C]
3792This\ is\ *\ not\ emphasized\ *,\ and\ \\*neither\ is\ this\\*.
3793\f[]
3794.fi
3795.SS Extension: \f[C]intraword_underscores\f[]
3796.PP
3797Because \f[C]_\f[] is sometimes used inside words and identifiers,
3798pandoc does not interpret a \f[C]_\f[] surrounded by alphanumeric
3799characters as an emphasis marker.
3800If you want to emphasize just part of a word, use \f[C]*\f[]:
3801.IP
3802.nf
3803\f[C]
3804feas*ible*,\ not\ feas*able*.
3805\f[]
3806.fi
3807.SS Strikeout
3808.SS Extension: \f[C]strikeout\f[]
3809.PP
3810To strikeout a section of text with a horizontal line, begin and end it
3811with \f[C]~~\f[].
3812Thus, for example,
3813.IP
3814.nf
3815\f[C]
3816This\ ~~is\ deleted\ text.~~
3817\f[]
3818.fi
3819.SS Superscripts and subscripts
3820.SS Extension: \f[C]superscript\f[], \f[C]subscript\f[]
3821.PP
3822Superscripts may be written by surrounding the superscripted text by
3823\f[C]^\f[] characters; subscripts may be written by surrounding the
3824subscripted text by \f[C]~\f[] characters.
3825Thus, for example,
3826.IP
3827.nf
3828\f[C]
3829H~2~O\ is\ a\ liquid.\ \ 2^10^\ is\ 1024.
3830\f[]
3831.fi
3832.PP
3833If the superscripted or subscripted text contains spaces, these spaces
3834must be escaped with backslashes.
3835(This is to prevent accidental superscripting and subscripting through
3836the ordinary use of \f[C]~\f[] and \f[C]^\f[].) Thus, if you want the
3837letter P with \[aq]a cat\[aq] in subscripts, use \f[C]P~a\\\ cat~\f[],
3838not \f[C]P~a\ cat~\f[].
3839.SS Verbatim
3840.PP
3841To make a short span of text verbatim, put it inside backticks:
3842.IP
3843.nf
3844\f[C]
3845What\ is\ the\ difference\ between\ `>>=`\ and\ `>>`?
3846\f[]
3847.fi
3848.PP
3849If the verbatim text includes a backtick, use double backticks:
3850.IP
3851.nf
3852\f[C]
3853Here\ is\ a\ literal\ backtick\ ``\ `\ ``.
3854\f[]
3855.fi
3856.PP
3857(The spaces after the opening backticks and before the closing backticks
3858will be ignored.)
3859.PP
3860The general rule is that a verbatim span starts with a string of
3861consecutive backticks (optionally followed by a space) and ends with a
3862string of the same number of backticks (optionally preceded by a space).
3863.PP
3864Note that backslash\-escapes (and other Markdown constructs) do not work
3865in verbatim contexts:
3866.IP
3867.nf
3868\f[C]
3869This\ is\ a\ backslash\ followed\ by\ an\ asterisk:\ `\\*`.
3870\f[]
3871.fi
3872.SS Extension: \f[C]inline_code_attributes\f[]
3873.PP
3874Attributes can be attached to verbatim text, just as with fenced code
3875blocks:
3876.IP
3877.nf
3878\f[C]
3879`<$>`{.haskell}
3880\f[]
3881.fi
3882.SS Small caps
3883.PP
3884To write small caps, use the \f[C]smallcaps\f[] class:
3885.IP
3886.nf
3887\f[C]
3888[Small\ caps]{.smallcaps}
3889\f[]
3890.fi
3891.PP
3892Or, without the \f[C]bracketed_spans\f[] extension:
3893.IP
3894.nf
3895\f[C]
3896<span\ class="smallcaps">Small\ caps</span>
3897\f[]
3898.fi
3899.PP
3900For compatibility with other Markdown flavors, CSS is also supported:
3901.IP
3902.nf
3903\f[C]
3904<span\ style="font\-variant:small\-caps;">Small\ caps</span>
3905\f[]
3906.fi
3907.PP
3908This will work in all output formats that support small caps.
3909.SS Math
3910.SS Extension: \f[C]tex_math_dollars\f[]
3911.PP
3912Anything between two \f[C]$\f[] characters will be treated as TeX math.
3913The opening \f[C]$\f[] must have a non\-space character immediately to
3914its right, while the closing \f[C]$\f[] must have a non\-space character
3915immediately to its left, and must not be followed immediately by a
3916digit.
3917Thus, \f[C]$20,000\ and\ $30,000\f[] won\[aq]t parse as math.
3918If for some reason you need to enclose text in literal \f[C]$\f[]
3919characters, backslash\-escape them and they won\[aq]t be treated as math
3920delimiters.
3921.PP
3922TeX math will be printed in all output formats.
3923How it is rendered depends on the output format:
3924.TP
3925.B Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWiki
3926It will appear verbatim between \f[C]$\f[] characters.
3927.RS
3928.RE
3929.TP
3930.B reStructuredText
3931It will be rendered using an interpreted text role \f[C]:math:\f[].
3932.RS
3933.RE
3934.TP
3935.B AsciiDoc
3936It will be rendered as \f[C]latexmath:[...]\f[].
3937.RS
3938.RE
3939.TP
3940.B Texinfo
3941It will be rendered inside a \f[C]\@math\f[] command.
3942.RS
3943.RE
3944.TP
3945.B groff man
3946It will be rendered verbatim without \f[C]$\f[]\[aq]s.
3947.RS
3948.RE
3949.TP
3950.B MediaWiki, DokuWiki
3951It will be rendered inside \f[C]<math>\f[] tags.
3952.RS
3953.RE
3954.TP
3955.B Textile
3956It will be rendered inside \f[C]<span\ class="math">\f[] tags.
3957.RS
3958.RE
3959.TP
3960.B RTF, OpenDocument
3961It will be rendered, if possible, using Unicode characters, and will
3962otherwise appear verbatim.
3963.RS
3964.RE
3965.TP
3966.B ODT
3967It will be rendered, if possible, using MathML.
3968.RS
3969.RE
3970.TP
3971.B DocBook
3972If the \f[C]\-\-mathml\f[] flag is used, it will be rendered using
3973MathML in an \f[C]inlineequation\f[] or \f[C]informalequation\f[] tag.
3974Otherwise it will be rendered, if possible, using Unicode characters.
3975.RS
3976.RE
3977.TP
3978.B Docx
3979It will be rendered using OMML math markup.
3980.RS
3981.RE
3982.TP
3983.B FictionBook2
3984If the \f[C]\-\-webtex\f[] option is used, formulas are rendered as
3985images using CodeCogs or other compatible web service, downloaded and
3986embedded in the e\-book.
3987Otherwise, they will appear verbatim.
3988.RS
3989.RE
3990.TP
3991.B HTML, Slidy, DZSlides, S5, EPUB
3992The way math is rendered in HTML will depend on the command\-line
3993options selected.
3994Therefore see Math rendering in HTML above.
3995.RS
3996.RE
3997.SS Raw HTML
3998.SS Extension: \f[C]raw_html\f[]
3999.PP
4000Markdown allows you to insert raw HTML (or DocBook) anywhere in a
4001document (except verbatim contexts, where \f[C]<\f[], \f[C]>\f[], and
4002\f[C]&\f[] are interpreted literally).
4003(Technically this is not an extension, since standard Markdown allows
4004it, but it has been made an extension so that it can be disabled if
4005desired.)
4006.PP
4007The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
4008DZSlides, EPUB, Markdown, Emacs Org mode, and Textile output, and
4009suppressed in other formats.
4010.SS Extension: \f[C]markdown_in_html_blocks\f[]
4011.PP
4012Standard Markdown allows you to include HTML "blocks": blocks of HTML
4013between balanced tags that are separated from the surrounding text with
4014blank lines, and start and end at the left margin.
4015Within these blocks, everything is interpreted as HTML, not Markdown; so
4016(for example), \f[C]*\f[] does not signify emphasis.
4017.PP
4018Pandoc behaves this way when the \f[C]markdown_strict\f[] format is
4019used; but by default, pandoc interprets material between HTML block tags
4020as Markdown.
4021Thus, for example, pandoc will turn
4022.IP
4023.nf
4024\f[C]
4025<table>
4026<tr>
4027<td>*one*</td>
4028<td>[a\ link](http://google.com)</td>
4029</tr>
4030</table>
4031\f[]
4032.fi
4033.PP
4034into
4035.IP
4036.nf
4037\f[C]
4038<table>
4039<tr>
4040<td><em>one</em></td>
4041<td><a\ href="http://google.com">a\ link</a></td>
4042</tr>
4043</table>
4044\f[]
4045.fi
4046.PP
4047whereas \f[C]Markdown.pl\f[] will preserve it as is.
4048.PP
4049There is one exception to this rule: text between \f[C]<script>\f[] and
4050\f[C]<style>\f[] tags is not interpreted as Markdown.
4051.PP
4052This departure from standard Markdown should make it easier to mix
4053Markdown with HTML block elements.
4054For example, one can surround a block of Markdown text with
4055\f[C]<div>\f[] tags without preventing it from being interpreted as
4056Markdown.
4057.SS Extension: \f[C]native_divs\f[]
4058.PP
4059Use native pandoc \f[C]Div\f[] blocks for content inside \f[C]<div>\f[]
4060tags.
4061For the most part this should give the same output as
4062\f[C]markdown_in_html_blocks\f[], but it makes it easier to write pandoc
4063filters to manipulate groups of blocks.
4064.SS Extension: \f[C]native_spans\f[]
4065.PP
4066Use native pandoc \f[C]Span\f[] blocks for content inside
4067\f[C]<span>\f[] tags.
4068For the most part this should give the same output as \f[C]raw_html\f[],
4069but it makes it easier to write pandoc filters to manipulate groups of
4070inlines.
4071.SS Extension: \f[C]fenced_divs\f[]
4072.PP
4073Allow special fenced syntax for native \f[C]Div\f[] blocks.
4074A Div starts with a fence containing at least three consecutive colons
4075plus some attributes.
4076The attributes may optionally be followed by another string of
4077consecutive colons.
4078The attribute syntax is exactly as in fenced code blocks (see Extension:
4079\f[C]fenced_code_attributes\f[]).
4080As with fenced code blocks, one can use either attributes in curly
4081braces or a single unbraced word, which will be treated as a class name.
4082The Div ends with another line containing a string of at least three
4083consecutive colons.
4084The fenced Div should be separated by blank lines from preceding and
4085following blocks.
4086.PP
4087Example:
4088.IP
4089.nf
4090\f[C]
4091:::::\ {#special\ .sidebar}
4092Here\ is\ a\ paragraph.
4094And\ another.
4095:::::
4096\f[]
4097.fi
4098.PP
4099Fenced divs can be nested.
4100Opening fences are distinguished because they \f[I]must\f[] have
4101attributes:
4102.IP
4103.nf
4104\f[C]
4105:::\ Warning\ ::::::
4106This\ is\ a\ warning.
4108:::\ Danger
4109This\ is\ a\ warning\ within\ a\ warning.
4110:::
4111::::::::::::::::::
4112\f[]
4113.fi
4114.PP
4115Fences without attributes are always closing fences.
4116Unlike with fenced code blocks, the number of colons in the closing
4117fence need not match the number in the opening fence.
4118However, it can be helpful for visual clarity to use fences of different
4119lengths to distinguish nested divs from their parents.
4120.SS Extension: \f[C]raw_tex\f[]
4121.PP
4122In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
4123included in a document.
4124Inline TeX commands will be preserved and passed unchanged to the LaTeX
4125and ConTeXt writers.
4126Thus, for example, you can use LaTeX to include BibTeX citations:
4127.IP
4128.nf
4129\f[C]
4130This\ result\ was\ proved\ in\ \\cite{jones.1967}.
4131\f[]
4132.fi
4133.PP
4134Note that in LaTeX environments, like
4135.IP
4136.nf
4137\f[C]
4138\\begin{tabular}{|l|l|}\\hline
4139Age\ &\ Frequency\ \\\\\ \\hline
414018\-\-25\ \ &\ 15\ \\\\
414126\-\-35\ \ &\ 33\ \\\\
414236\-\-45\ \ &\ 22\ \\\\\ \\hline
4143\\end{tabular}
4144\f[]
4145.fi
4146.PP
4147the material between the begin and end tags will be interpreted as raw
4148LaTeX, not as Markdown.
4149.PP
4150Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
4151Emacs Org mode, and ConTeXt.
4152.SS Generic raw attribute
4153.SS Extension: \f[C]raw_attribute\f[]
4154.PP
4155Inline spans and fenced code blocks with a special kind of attribute
4156will be parsed as raw content with the designated format.
4157For example, the following produces a raw groff \f[C]ms\f[] block:
4158.IP
4159.nf
4160\f[C]
4161```{=ms}
4162\&.MYMACRO
4163blah\ blah
4164```
4165\f[]
4166.fi
4167.PP
4168And the following produces a raw \f[C]html\f[] inline element:
4169.IP
4170.nf
4171\f[C]
4172This\ is\ `<a>html</a>`{=html}
4173\f[]
4174.fi
4175.PP
4176The format name should match the target format name (see
4177\f[C]\-t/\-\-to\f[], above, for a list, or use
4178\f[C]pandoc\ \-\-list\-output\-formats\f[]).
4179.PP
4180This extension presupposes that the relevant kind of inline code or
4181fenced code block is enabled.
4182Thus, for example, to use a raw attribute with a backtick code block,
4183\f[C]backtick_code_blocks\f[] must be enabled.
4184.PP
4185The raw attribute cannot be combined with regular attributes.
4186.SS LaTeX macros
4187.SS Extension: \f[C]latex_macros\f[]
4188.PP
4189For output formats other than LaTeX, pandoc will parse LaTeX macro
4190definitions and apply the resulting macros to all LaTeX math and raw
4191LaTeX.
4192So, for example, the following will work in all output formats, not just
4193LaTeX:
4194.IP
4195.nf
4196\f[C]
4197\\newcommand{\\tuple}[1]{\\langle\ #1\ \\rangle}
4199$\\tuple{a,\ b,\ c}$
4200\f[]
4201.fi
4202.PP
4203In LaTeX output, the macro definitions will not be passed through as raw
4204LaTeX.
4205.PP
4206When \f[C]latex_macros\f[] is disabled, the macro definitions will be
4207passed through as raw LaTeX, and the raw LaTeX and math will not have
4208macros applied.
4209This is usually a better approach when you are targeting LaTeX or PDF.
4210.SS Links
4211.PP
4212Markdown allows links to be specified in several ways.
4213.SS Automatic links
4214.PP
4215If you enclose a URL or email address in pointy brackets, it will become
4216a link:
4217.IP
4218.nf
4219\f[C]
4220<http://google.com>
4221<sam\@green.eggs.ham>
4222\f[]
4223.fi
4224.SS Inline links
4225.PP
4226An inline link consists of the link text in square brackets, followed by
4227the URL in parentheses.
4228(Optionally, the URL can be followed by a link title, in quotes.)
4229.IP
4230.nf
4231\f[C]
4232This\ is\ an\ [inline\ link](/url),\ and\ here\[aq]s\ [one\ with
4233a\ title](http://fsf.org\ "click\ here\ for\ a\ good\ time!").
4234\f[]
4235.fi
4236.PP
4237There can be no space between the bracketed part and the parenthesized
4238part.
4239The link text can contain formatting (such as emphasis), but the title
4240cannot.
4241.PP
4242Email addresses in inline links are not autodetected, so they have to be
4243prefixed with \f[C]mailto\f[]:
4244.IP
4245.nf
4246\f[C]
4247[Write\ me!](mailto:sam\@green.eggs.ham)
4248\f[]
4249.fi
4250.SS Reference links
4251.PP
4252An \f[I]explicit\f[] reference link has two parts, the link itself and
4253the link definition, which may occur elsewhere in the document (either
4254before or after the link).
4255.PP
4256The link consists of link text in square brackets, followed by a label
4257in square brackets.
4258(There cannot be space between the two unless the
4259\f[C]spaced_reference_links\f[] extension is enabled.) The link
4260definition consists of the bracketed label, followed by a colon and a
4261space, followed by the URL, and optionally (after a space) a link title
4262either in quotes or in parentheses.
4263The label must not be parseable as a citation (assuming the
4264\f[C]citations\f[] extension is enabled): citations take precedence over
4265link labels.
4266.PP
4267Here are some examples:
4268.IP
4269.nf
4270\f[C]
4271[my\ label\ 1]:\ /foo/bar.html\ \ "My\ title,\ optional"
4272[my\ label\ 2]:\ /foo
4273[my\ label\ 3]:\ http://fsf.org\ (The\ free\ software\ foundation)
4274[my\ label\ 4]:\ /bar#special\ \ \[aq]A\ title\ in\ single\ quotes\[aq]
4275\f[]
4276.fi
4277.PP
4278The URL may optionally be surrounded by angle brackets:
4279.IP
4280.nf
4281\f[C]
4282[my\ label\ 5]:\ <http://foo.bar.baz>
4283\f[]
4284.fi
4285.PP
4286The title may go on the next line:
4287.IP
4288.nf
4289\f[C]
4290[my\ label\ 3]:\ http://fsf.org
4291\ \ "The\ free\ software\ foundation"
4292\f[]
4293.fi
4294.PP
4295Note that link labels are not case sensitive.
4296So, this will work:
4297.IP
4298.nf
4299\f[C]
4300Here\ is\ [my\ link][FOO]
4302[Foo]:\ /bar/baz
4303\f[]
4304.fi
4305.PP
4306In an \f[I]implicit\f[] reference link, the second pair of brackets is
4307empty:
4308.IP
4309.nf
4310\f[C]
4311See\ [my\ website][].
4313[my\ website]:\ http://foo.bar.baz
4314\f[]
4315.fi
4316.PP
4317Note: In \f[C]Markdown.pl\f[] and most other Markdown implementations,
4318reference link definitions cannot occur in nested constructions such as
4319list items or block quotes.
4320Pandoc lifts this arbitrary seeming restriction.
4321So the following is fine in pandoc, though not in most other
4322implementations:
4323.IP
4324.nf
4325\f[C]
4326>\ My\ block\ [quote].
4328>\ [quote]:\ /foo
4329\f[]
4330.fi
4331.SS Extension: \f[C]shortcut_reference_links\f[]
4332.PP
4333In a \f[I]shortcut\f[] reference link, the second pair of brackets may
4334be omitted entirely:
4335.IP
4336.nf
4337\f[C]
4338See\ [my\ website].
4340[my\ website]:\ http://foo.bar.baz
4341\f[]
4342.fi
4343.SS Internal links
4344.PP
4345To link to another section of the same document, use the automatically
4346generated identifier (see Header identifiers).
4347For example:
4348.IP
4349.nf
4350\f[C]
4351See\ the\ [Introduction](#introduction).
4352\f[]
4353.fi
4354.PP
4356.IP
4357.nf
4358\f[C]
4359See\ the\ [Introduction].
4361[Introduction]:\ #introduction
4362\f[]
4363.fi
4364.PP
4365Internal links are currently supported for HTML formats (including HTML
4366slide shows and EPUB), LaTeX, and ConTeXt.
4367.SS Images
4368.PP
4369A link immediately preceded by a \f[C]!\f[] will be treated as an image.
4370The link text will be used as the image\[aq]s alt text:
4371.IP
4372.nf
4373\f[C]
4374![la\ lune](lalune.jpg\ "Voyage\ to\ the\ moon")
4376![movie\ reel]
4378[movie\ reel]:\ movie.gif
4379\f[]
4380.fi
4381.SS Extension: \f[C]implicit_figures\f[]
4382.PP
4383An image with nonempty alt text, occurring by itself in a paragraph,
4384will be rendered as a figure with a caption.
4385The image\[aq]s alt text will be used as the caption.
4386.IP
4387.nf
4388\f[C]
4389![This\ is\ the\ caption](/url/of/image.png)
4390\f[]
4391.fi
4392.PP
4393How this is rendered depends on the output format.
4394Some output formats (e.g.
4395RTF) do not yet support figures.
4396In those formats, you\[aq]ll just get an image in a paragraph by itself,
4397with no caption.
4398.PP
4399If you just want a regular inline image, just make sure it is not the
4400only thing in the paragraph.
4401One way to do this is to insert a nonbreaking space after the image:
4402.IP
4403.nf
4404\f[C]
4405![This\ image\ won\[aq]t\ be\ a\ figure](/url/of/image.png)\\\
4406\f[]
4407.fi
4408.PP
4409Note that in reveal.js slide shows, an image in a paragraph by itself
4410that has the \f[C]stretch\f[] class will fill the screen, and the
4411caption and figure tags will be omitted.
4412.SS Extension: \f[C]link_attributes\f[]
4413.PP
4414Attributes can be set on links and images:
4415.IP
4416.nf
4417\f[C]
4418An\ inline\ ![image](foo.jpg){#id\ .class\ width=30\ height=20px}
4419and\ a\ reference\ ![image][ref]\ with\ attributes.
4421[ref]:\ foo.jpg\ "optional\ title"\ {#id\ .class\ key=val\ key2="val\ 2"}
4422\f[]
4423.fi
4424.PP
4425(This syntax is compatible with PHP Markdown Extra when only
4426\f[C]#id\f[] and \f[C]\&.class\f[] are used.)
4427.PP
4428For HTML and EPUB, all attributes except \f[C]width\f[] and
4429\f[C]height\f[] (but including \f[C]srcset\f[] and \f[C]sizes\f[]) are
4430passed through as is.
4431The other writers ignore attributes that are not supported by their
4432output format.
4433.PP
4434The \f[C]width\f[] and \f[C]height\f[] attributes on images are treated
4435specially.
4436When used without a unit, the unit is assumed to be pixels.
4437However, any of the following unit identifiers can be used: \f[C]px\f[],
4438\f[C]cm\f[], \f[C]mm\f[], \f[C]in\f[], \f[C]inch\f[] and \f[C]%\f[].
4439There must not be any spaces between the number and the unit.
4440For example:
4441.IP
4442.nf
4443\f[C]
4444![](file.jpg){\ width=50%\ }
4445\f[]
4446.fi
4447.IP \[bu] 2
4448Dimensions are converted to inches for output in page\-based formats
4449like LaTeX.
4450Dimensions are converted to pixels for output in HTML\-like formats.
4451Use the \f[C]\-\-dpi\f[] option to specify the number of pixels per
4452inch.
4453The default is 96dpi.
4454.IP \[bu] 2
4455The \f[C]%\f[] unit is generally relative to some available space.
4456For example the above example will render to
4457\f[C]<img\ href="file.jpg"\ style="width:\ 50%;"\ />\f[] (HTML),
4458\f[C]\\includegraphics[width=0.5\\textwidth]{file.jpg}\f[] (LaTeX), or
4459\f[C]\\externalfigure[file.jpg][width=0.5\\textwidth]\f[] (ConTeXt).
4460.IP \[bu] 2
4461Some output formats have a notion of a class (ConTeXt) or a unique
4462identifier (LaTeX \f[C]\\caption\f[]), or both (HTML).
4463.IP \[bu] 2
4464When no \f[C]width\f[] or \f[C]height\f[] attributes are specified, the
4465fallback is to look at the image resolution and the dpi metadata
4466embedded in the image file.
4467.SS Spans
4468.SS Extension: \f[C]bracketed_spans\f[]
4469.PP
4470A bracketed sequence of inlines, as one would use to begin a link, will
4471be treated as a span with attributes if it is followed immediately by
4472attributes:
4473.IP
4474.nf
4475\f[C]
4476[This\ is\ *some\ text*]{.class\ key="val"}
4477\f[]
4478.fi
4479.SS Footnotes
4480.SS Extension: \f[C]footnotes\f[]
4481.PP
4482Pandoc\[aq]s Markdown allows footnotes, using the following syntax:
4483.IP
4484.nf
4485\f[C]
4486Here\ is\ a\ footnote\ reference,[^1]\ and\ another.[^longnote]
4488[^1]:\ Here\ is\ the\ footnote.
4490[^longnote]:\ Here\[aq]s\ one\ with\ multiple\ blocks.
4492\ \ \ \ Subsequent\ paragraphs\ are\ indented\ to\ show\ that\ they
4493belong\ to\ the\ previous\ footnote.
4495\ \ \ \ \ \ \ \ {\ some.code\ }
4497\ \ \ \ The\ whole\ paragraph\ can\ be\ indented,\ or\ just\ the\ first
4498\ \ \ \ line.\ \ In\ this\ way,\ multi\-paragraph\ footnotes\ work\ like
4499\ \ \ \ multi\-paragraph\ list\ items.
4501This\ paragraph\ won\[aq]t\ be\ part\ of\ the\ note,\ because\ it
4502isn\[aq]t\ indented.
4503\f[]
4504.fi
4505.PP
4506The identifiers in footnote references may not contain spaces, tabs, or
4507newlines.
4508These identifiers are used only to correlate the footnote reference with
4509the note itself; in the output, footnotes will be numbered sequentially.
4510.PP
4511The footnotes themselves need not be placed at the end of the document.
4512They may appear anywhere except inside other block elements (lists,
4513block quotes, tables, etc.).
4514Each footnote should be separated from surrounding content (including
4515other footnotes) by blank lines.
4516.SS Extension: \f[C]inline_notes\f[]
4517.PP
4518Inline footnotes are also allowed (though, unlike regular notes, they
4519cannot contain multiple paragraphs).
4520The syntax is as follows:
4521.IP
4522.nf
4523\f[C]
4524Here\ is\ an\ inline\ note.^[Inlines\ notes\ are\ easier\ to\ write,\ since
4525you\ don\[aq]t\ have\ to\ pick\ an\ identifier\ and\ move\ down\ to\ type\ the
4526note.]
4527\f[]
4528.fi
4529.PP
4530Inline and regular footnotes may be mixed freely.
4531.SS Citations
4532.SS Extension: \f[C]citations\f[]
4533.PP
4534Using an external filter, \f[C]pandoc\-citeproc\f[], pandoc can
4535automatically generate citations and a bibliography in a number of
4536styles.
4537Basic usage is
4538.IP
4539.nf
4540\f[C]
4541pandoc\ \-\-filter\ pandoc\-citeproc\ myinput.txt
4542\f[]
4543.fi
4544.PP
4545In order to use this feature, you will need to specify a bibliography
4546file using the \f[C]bibliography\f[] metadata field in a YAML metadata
4547section, or \f[C]\-\-bibliography\f[] command line argument.
4548You can supply multiple \f[C]\-\-bibliography\f[] arguments or set
4549\f[C]bibliography\f[] metadata field to YAML array, if you want to use
4550multiple bibliography files.
4551The bibliography may have any of these formats:
4552.PP
4553.TS
4554tab(@);
4555l l.
4557Format
4558T}@T{
4559File extension
4563BibLaTeX
4564T}@T{
4565\&.bib
4568BibTeX
4569T}@T{
4570\&.bibtex
4573Copac
4574T}@T{
4575\&.copac
4578CSL JSON
4579T}@T{
4580\&.json
4583CSL YAML
4584T}@T{
4585\&.yaml
4588EndNote
4589T}@T{
4590\&.enl
4593EndNote XML
4594T}@T{
4595\&.xml
4598ISI
4599T}@T{
4600\&.wos
4603MEDLINE
4604T}@T{
4605\&.medline
4608MODS
4609T}@T{
4610\&.mods
4613RIS
4614T}@T{
4615\&.ris
4617.TE
4618.PP
4619Note that \f[C]\&.bib\f[] can be used with both BibTeX and BibLaTeX
4620files; use \f[C]\&.bibtex\f[] to force BibTeX.
4621.PP
4622Note that \f[C]pandoc\-citeproc\ \-\-bib2json\f[] and
4623\f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce \f[C]\&.json\f[] and
4624\f[C]\&.yaml\f[] files from any of the supported formats.
4625.PP
4626In\-field markup: In BibTeX and BibLaTeX databases, pandoc\-citeproc
4627parses a subset of LaTeX markup; in CSL YAML databases, pandoc Markdown;
4628and in CSL JSON databases, an HTML\-like markup:
4629.TP
4630.B \f[C]<i>...</i>\f[]
4631italics
4632.RS
4633.RE
4634.TP
4635.B \f[C]<b>...</b>\f[]
4636bold
4637.RS
4638.RE
4639.TP
4640.B \f[C]<span\ style="font\-variant:small\-caps;">...</span>\f[] or \f[C]<sc>...</sc>\f[]
4641small capitals
4642.RS
4643.RE
4644.TP
4645.B \f[C]<sub>...</sub>\f[]
4646subscript
4647.RS
4648.RE
4649.TP
4650.B \f[C]<sup>...</sup>\f[]
4651superscript
4652.RS
4653.RE
4654.TP
4655.B \f[C]<span\ class="nocase">...</span>\f[]
4656prevent a phrase from being capitalized as title case
4657.RS
4658.RE
4659.PP
4660\f[C]pandoc\-citeproc\ \-j\f[] and \f[C]\-y\f[] interconvert the CSL
4661JSON and CSL YAML formats as far as possible.
4662.PP
4663As an alternative to specifying a bibliography file using
4664\f[C]\-\-bibliography\f[] or the YAML metadata field
4665\f[C]bibliography\f[], you can include the citation data directly in the
4666\f[C]references\f[] field of the document\[aq]s YAML metadata.
4667The field should contain an array of YAML\-encoded references, for
4668example:
4669.IP
4670.nf
4671\f[C]
4672\-\-\-
4673references:
4674\-\ type:\ article\-journal
4675\ \ id:\ WatsonCrick1953
4676\ \ author:
4677\ \ \-\ family:\ Watson
4678\ \ \ \ given:\ J.\ D.
4679\ \ \-\ family:\ Crick
4680\ \ \ \ given:\ F.\ H.\ C.
4681\ \ issued:
4682\ \ \ \ date\-parts:
4683\ \ \ \ \-\ \-\ 1953
4684\ \ \ \ \ \ \-\ 4
4685\ \ \ \ \ \ \-\ 25
4686\ \ title:\ \[aq]Molecular\ structure\ of\ nucleic\ acids:\ a\ structure\ for\ deoxyribose
4687\ \ \ \ nucleic\ acid\[aq]
4688\ \ title\-short:\ Molecular\ structure\ of\ nucleic\ acids
4689\ \ container\-title:\ Nature
4690\ \ volume:\ 171
4691\ \ issue:\ 4356
4692\ \ page:\ 737\-738
4693\ \ DOI:\ 10.1038/171737a0
4694\ \ URL:\ http://www.nature.com/nature/journal/v171/n4356/abs/171737a0.html
4695\ \ language:\ en\-GB
4696\&...
4697\f[]
4698.fi
4699.PP
4700(\f[C]pandoc\-citeproc\ \-\-bib2yaml\f[] can produce these from a
4701bibliography file in one of the supported formats.)
4702.PP
4703Citations and references can be formatted using any style supported by
4704the Citation Style Language, listed in the Zotero Style Repository.
4705These files are specified using the \f[C]\-\-csl\f[] option or the
4706\f[C]csl\f[] metadata field.
4707By default, \f[C]pandoc\-citeproc\f[] will use the Chicago Manual of
4708Style author\-date format.
4709The CSL project provides further information on finding and editing
4710styles.
4711.PP
4712To make your citations hyperlinks to the corresponding bibliography
4713entries, add \f[C]link\-citations:\ true\f[] to your YAML metadata.
4714.PP
4715Citations go inside square brackets and are separated by semicolons.
4716Each citation must have a key, composed of \[aq]\@\[aq] + the citation
4717identifier from the database, and may optionally have a prefix, a
4718locator, and a suffix.
4719The citation key must begin with a letter, digit, or \f[C]_\f[], and may
4720contain alphanumerics, \f[C]_\f[], and internal punctuation characters
4721(\f[C]:.#$%&\-+?<>~/\f[]).
4722Here are some examples:
4723.IP
4724.nf
4725\f[C]
4726Blah\ blah\ [see\ \@doe99,\ pp.\ 33\-35;\ also\ \@smith04,\ chap.\ 1].
4728Blah\ blah\ [\@doe99,\ pp.\ 33\-35,\ 38\-39\ and\ *passim*].
4730Blah\ blah\ [\@smith04;\ \@doe99].
4731\f[]
4732.fi
4733.PP
4734\f[C]pandoc\-citeproc\f[] detects locator terms in the CSL locale files.
4735Either abbreviated or unabbreviated forms are accepted.
4736In the \f[C]en\-US\f[] locale, locator terms can be written in either
4737singular or plural forms, as \f[C]book\f[], \f[C]bk.\f[]/\f[C]bks.\f[];
4738\f[C]chapter\f[], \f[C]chap.\f[]/\f[C]chaps.\f[]; \f[C]column\f[],
4739\f[C]col.\f[]/\f[C]cols.\f[]; \f[C]figure\f[],
4740\f[C]fig.\f[]/\f[C]figs.\f[]; \f[C]folio\f[],
4741\f[C]fol.\f[]/\f[C]fols.\f[]; \f[C]number\f[],
4742\f[C]no.\f[]/\f[C]nos.\f[]; \f[C]line\f[], \f[C]l.\f[]/\f[C]ll.\f[];
4743\f[C]note\f[], \f[C]n.\f[]/\f[C]nn.\f[]; \f[C]opus\f[],
4744\f[C]op.\f[]/\f[C]opp.\f[]; \f[C]page\f[], \f[C]p.\f[]/\f[C]pp.\f[];
4745\f[C]paragraph\f[], \f[C]para.\f[]/\f[C]paras.\f[]; \f[C]part\f[],
4746\f[C]pt.\f[]/\f[C]pts.\f[]; \f[C]section\f[],
4747\f[C]sec.\f[]/\f[C]secs.\f[]; \f[C]sub\ verbo\f[],
4748\f[C]s.v.\f[]/\f[C]s.vv.\f[]; \f[C]verse\f[], \f[C]v.\f[]/\f[C]vv.\f[];
4749\f[C]volume\f[], \f[C]vol.\f[]/\f[C]vols.\f[]; \f[C]¶\f[]/\f[C]¶¶\f[];
4750\f[C]§\f[]/\f[C]§§\f[].
4751If no locator term is used, "page" is assumed.
4752.PP
4753A minus sign (\f[C]\-\f[]) before the \f[C]\@\f[] will suppress mention
4754of the author in the citation.
4755This can be useful when the author is already mentioned in the text:
4756.IP
4757.nf
4758\f[C]
4759Smith\ says\ blah\ [\-\@smith04].
4760\f[]
4761.fi
4762.PP
4763You can also write an in\-text citation, as follows:
4764.IP
4765.nf
4766\f[C]
4767\@smith04\ says\ blah.
4769\@smith04\ [p.\ 33]\ says\ blah.
4770\f[]
4771.fi
4772.PP
4773If the style calls for a list of works cited, it will be placed at the
4774end of the document.
4775Normally, you will want to end your document with an appropriate header:
4776.IP
4777.nf
4778\f[C]
4779last\ paragraph...
4781#\ References
4782\f[]
4783.fi
4784.PP
4785The bibliography will be inserted after this header.
4786Note that the \f[C]unnumbered\f[] class will be added to this header, so
4787that the section will not be numbered.
4788.PP
4789If you want to include items in the bibliography without actually citing
4790them in the body text, you can define a dummy \f[C]nocite\f[] metadata
4791field and put the citations there:
4792.IP
4793.nf
4794\f[C]
4795\-\-\-
4796nocite:\ |
4797\ \ \@item1,\ \@item2
4798\&...
4800\@item3
4801\f[]
4802.fi
4803.PP
4804In this example, the document will contain a citation for \f[C]item3\f[]
4805only, but the bibliography will contain entries for \f[C]item1\f[],
4806\f[C]item2\f[], and \f[C]item3\f[].
4807.PP
4808It is possible to create a bibliography with all the citations, whether
4809or not they appear in the document, by using a wildcard:
4810.IP
4811.nf
4812\f[C]
4813\-\-\-
4814nocite:\ |
4815\ \ \@*
4816\&...
4817\f[]
4818.fi
4819.PP
4820For LaTeX or PDF output, you can also use \f[C]natbib\f[] or
4821\f[C]biblatex\f[] to render bibliography.
4822In order to do so, specify bibliography files as outlined above, and add
4823\f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] argument to \f[C]pandoc\f[]
4824invocation.
4825Bear in mind that bibliography files have to be in respective format
4826(either BibTeX or BibLaTeX).
4827.PP
4828For more information, see the pandoc\-citeproc man page.
4829.SS Non\-pandoc extensions
4830.PP
4831The following Markdown syntax extensions are not enabled by default in
4832pandoc, but may be enabled by adding \f[C]+EXTENSION\f[] to the format
4833name, where \f[C]EXTENSION\f[] is the name of the extension.
4834Thus, for example, \f[C]markdown+hard_line_breaks\f[] is Markdown with
4835hard line breaks.
4836.SS Extension: \f[C]old_dashes\f[]
4837.PP
4838Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
4839\f[C]\-\f[] before a numeral is an en\-dash, and \f[C]\-\-\f[] is an
4840em\-dash.
4841This option only has an effect if \f[C]smart\f[] is enabled.
4842It is selected automatically for \f[C]textile\f[] input.
4843.SS Extension: \f[C]angle_brackets_escapable\f[]
4844.PP
4845Allow \f[C]<\f[] and \f[C]>\f[] to be backslash\-escaped, as they can be
4846in GitHub flavored Markdown but not original Markdown.
4847This is implied by pandoc\[aq]s default \f[C]all_symbols_escapable\f[].
4848.SS Extension: \f[C]lists_without_preceding_blankline\f[]
4849.PP
4850Allow a list to occur right after a paragraph, with no intervening blank
4851space.
4852.SS Extension: \f[C]four_space_rule\f[]
4853.PP
4854Selects the pandoc <= 2.0 behavior for parsing lists, so that four
4855spaces indent are needed for list item continuation paragraphs.
4856.SS Extension: \f[C]spaced_reference_links\f[]
4857.PP
4858Allow whitespace between the two components of a reference link, for
4859example,
4860.IP
4861.nf
4862\f[C]
4863[foo]\ [bar].
4864\f[]
4865.fi
4866.SS Extension: \f[C]hard_line_breaks\f[]
4867.PP
4868Causes all newlines within a paragraph to be interpreted as hard line
4869breaks instead of spaces.
4870.SS Extension: \f[C]ignore_line_breaks\f[]
4871.PP
4872Causes newlines within a paragraph to be ignored, rather than being
4873treated as spaces or as hard line breaks.
4874This option is intended for use with East Asian languages where spaces
4875are not used between words, but text is divided into lines for
4876readability.
4877.SS Extension: \f[C]east_asian_line_breaks\f[]
4878.PP
4879Causes newlines within a paragraph to be ignored, rather than being
4880treated as spaces or as hard line breaks, when they occur between two
4881East Asian wide characters.
4882This is a better choice than \f[C]ignore_line_breaks\f[] for texts that
4883include a mix of East Asian wide characters and other characters.
4884.SS Extension: \f[C]emoji\f[]
4885.PP
4886Parses textual emojis like \f[C]:smile:\f[] as Unicode emoticons.
4887.SS Extension: \f[C]tex_math_single_backslash\f[]
4888.PP
4889Causes anything between \f[C]\\(\f[] and \f[C]\\)\f[] to be interpreted
4890as inline TeX math, and anything between \f[C]\\[\f[] and \f[C]\\]\f[]
4891to be interpreted as display TeX math.
4892Note: a drawback of this extension is that it precludes escaping
4893\f[C](\f[] and \f[C][\f[].
4894.SS Extension: \f[C]tex_math_double_backslash\f[]
4895.PP
4896Causes anything between \f[C]\\\\(\f[] and \f[C]\\\\)\f[] to be
4897interpreted as inline TeX math, and anything between \f[C]\\\\[\f[] and
4898\f[C]\\\\]\f[] to be interpreted as display TeX math.
4899.SS Extension: \f[C]markdown_attribute\f[]
4900.PP
4901By default, pandoc interprets material inside block\-level tags as
4902Markdown.
4903This extension changes the behavior so that Markdown is only parsed
4904inside block\-level tags if the tags have the attribute
4905\f[C]markdown=1\f[].
4906.SS Extension: \f[C]mmd_title_block\f[]
4907.PP
4908Enables a MultiMarkdown style title block at the top of the document,
4909for example:
4910.IP
4911.nf
4912\f[C]
4913Title:\ \ \ My\ title
4914Author:\ \ John\ Doe
4915Date:\ \ \ \ September\ 1,\ 2008
4916Comment:\ This\ is\ a\ sample\ mmd\ title\ block,\ with
4917\ \ \ \ \ \ \ \ \ a\ field\ spanning\ multiple\ lines.
4918\f[]
4919.fi
4920.PP
4921See the MultiMarkdown documentation for details.
4922If \f[C]pandoc_title_block\f[] or \f[C]yaml_metadata_block\f[] is
4923enabled, it will take precedence over \f[C]mmd_title_block\f[].
4924.SS Extension: \f[C]abbreviations\f[]
4925.PP
4926Parses PHP Markdown Extra abbreviation keys, like
4927.IP
4928.nf
4929\f[C]
4930*[HTML]:\ Hypertext\ Markup\ Language
4931\f[]
4932.fi
4933.PP
4934Note that the pandoc document model does not support abbreviations, so
4935if this extension is enabled, abbreviation keys are simply skipped (as
4936opposed to being parsed as paragraphs).
4937.SS Extension: \f[C]autolink_bare_uris\f[]
4938.PP
4939Makes all absolute URIs into links, even when not surrounded by pointy
4940braces \f[C]<...>\f[].
4941.SS Extension: \f[C]mmd_link_attributes\f[]
4942.PP
4943Parses multimarkdown style key\-value attributes on link and image
4944references.
4945This extension should not be confused with the \f[C]link_attributes\f[]
4946extension.
4947.IP
4948.nf
4949\f[C]
4950This\ is\ a\ reference\ ![image][ref]\ with\ multimarkdown\ attributes.
4952[ref]:\ http://path.to/image\ "Image\ title"\ width=20px\ height=30px
4953\ \ \ \ \ \ \ id=myId\ class="myClass1\ myClass2"
4954\f[]
4955.fi
4956.SS Extension: \f[C]mmd_header_identifiers\f[]
4957.PP
4958Parses multimarkdown style header identifiers (in square brackets, after
4959the header but before any trailing \f[C]#\f[]s in an ATX header).
4960.SS Extension: \f[C]compact_definition_lists\f[]
4961.PP
4962Activates the definition list syntax of pandoc 1.12.x and earlier.
4963This syntax differs from the one described above under Definition lists
4964in several respects:
4965.IP \[bu] 2
4966No blank line is required between consecutive items of the definition
4967list.
4968.IP \[bu] 2
4969To get a "tight" or "compact" list, omit space between consecutive
4970items; the space between a term and its definition does not affect
4971anything.
4972.IP \[bu] 2
4973Lazy wrapping of paragraphs is not allowed: the entire definition must
4974be indented four spaces.
4975.SS Markdown variants
4976.PP
4977In addition to pandoc\[aq]s extended Markdown, the following Markdown
4978variants are supported:
4979.TP
4980.B \f[C]markdown_phpextra\f[] (PHP Markdown Extra)
4981\f[C]footnotes\f[], \f[C]pipe_tables\f[], \f[C]raw_html\f[],
4982\f[C]markdown_attribute\f[], \f[C]fenced_code_blocks\f[],
4983\f[C]definition_lists\f[], \f[C]intraword_underscores\f[],
4984\f[C]header_attributes\f[], \f[C]link_attributes\f[],
4985\f[C]abbreviations\f[], \f[C]shortcut_reference_links\f[],
4986\f[C]spaced_reference_links\f[].
4987.RS
4988.RE
4989.TP
4990.B \f[C]markdown_github\f[] (deprecated GitHub\-Flavored Markdown)
4991\f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
4992\f[C]gfm_auto_identifiers\f[], \f[C]ascii_identifiers\f[],
4993\f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[],
4994\f[C]space_in_atx_header\f[], \f[C]intraword_underscores\f[],
4995\f[C]strikeout\f[], \f[C]emoji\f[], \f[C]shortcut_reference_links\f[],
4996\f[C]angle_brackets_escapable\f[],
4997\f[C]lists_without_preceding_blankline\f[].
4998.RS
4999.RE
5000.TP
5001.B \f[C]markdown_mmd\f[] (MultiMarkdown)
5002\f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]markdown_attribute\f[],
5003\f[C]mmd_link_attributes\f[], \f[C]tex_math_double_backslash\f[],
5004\f[C]intraword_underscores\f[], \f[C]mmd_title_block\f[],
5005\f[C]footnotes\f[], \f[C]definition_lists\f[],
5006\f[C]all_symbols_escapable\f[], \f[C]implicit_header_references\f[],
5007\f[C]auto_identifiers\f[], \f[C]mmd_header_identifiers\f[],
5008\f[C]shortcut_reference_links\f[], \f[C]implicit_figures\f[],
5009\f[C]superscript\f[], \f[C]subscript\f[], \f[C]backtick_code_blocks\f[],
5010\f[C]spaced_reference_links\f[], \f[C]raw_attribute\f[].
5011.RS
5012.RE
5013.TP
5014.B \f[C]markdown_strict\f[] (Markdown.pl)
5015\f[C]raw_html\f[], \f[C]shortcut_reference_links\f[],
5016\f[C]spaced_reference_links\f[].
5017.RS
5018.RE
5019.PP
5020We also support \f[C]commonmark\f[] and \f[C]gfm\f[] (GitHub\-Flavored
5021Markdown, which is implemented as a set of extensions on
5022\f[C]commonmark\f[]).
5023.PP
5024Note, however, that \f[C]commonmark\f[] and \f[C]gfm\f[] have limited
5025support for extensions.
5026Only those listed below (and \f[C]smart\f[] and \f[C]raw_tex\f[]) will
5027work.
5028The extensions can, however, all be individually disabled.
5029Also, \f[C]raw_tex\f[] only affects \f[C]gfm\f[] output, not input.
5030.TP
5031.B \f[C]gfm\f[] (GitHub\-Flavored Markdown)
5032\f[C]pipe_tables\f[], \f[C]raw_html\f[], \f[C]fenced_code_blocks\f[],
5033\f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[],
5034\f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[],
5035\f[C]intraword_underscores\f[], \f[C]strikeout\f[],
5036\f[C]hard_line_breaks\f[], \f[C]emoji\f[],
5037\f[C]shortcut_reference_links\f[], \f[C]angle_brackets_escapable\f[].
5038.RS
5039.RE
5040.SH PRODUCING SLIDE SHOWS WITH PANDOC
5041.PP
5042You can use pandoc to produce an HTML + JavaScript slide presentation
5043that can be viewed via a web browser.
5044There are five ways to do this, using S5, DZSlides, Slidy, Slideous, or
5045reveal.js.
5046You can also produce a PDF slide show using LaTeX \f[C]beamer\f[], or
5047slides shows in Microsoft PowerPoint format.
5048.PP
5049Here\[aq]s the Markdown source for a simple slide show,
5050\f[C]habits.txt\f[]:
5051.IP
5052.nf
5053\f[C]
5054%\ Habits
5055%\ John\ Doe
5056%\ March\ 22,\ 2005
5058#\ In\ the\ morning
5060##\ Getting\ up
5062\-\ Turn\ off\ alarm
5063\-\ Get\ out\ of\ bed
5065##\ Breakfast
5067\-\ Eat\ eggs
5068\-\ Drink\ coffee
5070#\ In\ the\ evening
5072##\ Dinner
5074\-\ Eat\ spaghetti
5075\-\ Drink\ wine
5077\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
5079![picture\ of\ spaghetti](images/spaghetti.jpg)
5081##\ Going\ to\ sleep
5083\-\ Get\ in\ bed
5084\-\ Count\ sheep
5085\f[]
5086.fi
5087.PP
5088To produce an HTML/JavaScript slide show, simply type
5089.IP
5090.nf
5091\f[C]
5092pandoc\ \-t\ FORMAT\ \-s\ habits.txt\ \-o\ habits.html
5093\f[]
5094.fi
5095.PP
5096where \f[C]FORMAT\f[] is either \f[C]s5\f[], \f[C]slidy\f[],
5097\f[C]slideous\f[], \f[C]dzslides\f[], or \f[C]revealjs\f[].
5098.PP
5099For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with
5100the \f[C]\-s/\-\-standalone\f[] option embeds a link to JavaScript and
5101CSS files, which are assumed to be available at the relative path
5102\f[C]s5/default\f[] (for S5), \f[C]slideous\f[] (for Slideous),
5103\f[C]reveal.js\f[] (for reveal.js), or at the Slidy website at
5104\f[C]w3.org\f[] (for Slidy).
5105(These paths can be changed by setting the \f[C]slidy\-url\f[],
5106\f[C]slideous\-url\f[], \f[C]revealjs\-url\f[], or \f[C]s5\-url\f[]
5107variables; see Variables for slides, above.) For DZSlides, the
5108(relatively short) JavaScript and CSS are included in the file by
5109default.
5110.PP
5111With all HTML slide formats, the \f[C]\-\-self\-contained\f[] option can
5112be used to produce a single file that contains all of the data necessary
5113to display the slide show, including linked scripts, stylesheets,
5114images, and videos.
5115.PP
5116To produce a PDF slide show using beamer, type
5117.IP
5118.nf
5119\f[C]
5120pandoc\ \-t\ beamer\ habits.txt\ \-o\ habits.pdf
5121\f[]
5122.fi
5123.PP
5124Note that a reveal.js slide show can also be converted to a PDF by
5125printing it to a file from the browser.
5126.PP
5127To produce a Powerpoint slide show, type
5128.IP
5129.nf
5130\f[C]
5131pandoc\ habits.txt\ \-o\ habits.pptx
5132\f[]
5133.fi
5134.SS Structuring the slide show
5135.PP
5136By default, the \f[I]slide level\f[] is the highest header level in the
5137hierarchy that is followed immediately by content, and not another
5138header, somewhere in the document.
5139In the example above, level 1 headers are always followed by level 2
5140headers, which are followed by content, so 2 is the slide level.
5141This default can be overridden using the \f[C]\-\-slide\-level\f[]
5142option.
5143.PP
5144The document is carved up into slides according to the following rules:
5145.IP \[bu] 2
5146A horizontal rule always starts a new slide.
5147.IP \[bu] 2
5148A header at the slide level always starts a new slide.
5149.IP \[bu] 2
5150Headers \f[I]below\f[] the slide level in the hierarchy create headers
5151\f[I]within\f[] a slide.
5152.IP \[bu] 2
5153Headers \f[I]above\f[] the slide level in the hierarchy create "title
5154slides," which just contain the section title and help to break the
5155slide show into sections.
5156.IP \[bu] 2
5157Content \f[I]above\f[] the slide level will not appear in the slide
5158show.
5159.IP \[bu] 2
5160A title page is constructed automatically from the document\[aq]s title
5161block, if present.
5162(In the case of beamer, this can be disabled by commenting out some
5163lines in the default template.)
5164.PP
5165These rules are designed to support many different styles of slide show.
5166If you don\[aq]t care about structuring your slides into sections and
5167subsections, you can just use level 1 headers for all each slide.
5168(In that case, level 1 will be the slide level.) But you can also
5169structure the slide show into sections, as in the example above.
5170.PP
5171Note: in reveal.js slide shows, if slide level is 2, a two\-dimensional
5172layout will be produced, with level 1 headers building horizontally and
5173level 2 headers building vertically.
5174It is not recommended that you use deeper nesting of section levels with
5175reveal.js.
5176.SS Incremental lists
5177.PP
5178By default, these writers produce lists that display "all at once." If
5179you want your lists to display incrementally (one item at a time), use
5180the \f[C]\-i\f[] option.
5181If you want a particular list to depart from the default (that is, to
5182display incrementally without the \f[C]\-i\f[] option and all at once
5183with the \f[C]\-i\f[] option), put it in a block quote:
5184.IP
5185.nf
5186\f[C]
5187>\ \-\ Eat\ spaghetti
5188>\ \-\ Drink\ wine
5189\f[]
5190.fi
5191.PP
5192In this way incremental and nonincremental lists can be mixed in a
5193single document.
5194.SS Inserting pauses
5195.PP
5196You can add "pauses" within a slide by including a paragraph containing
5197three dots, separated by spaces:
5198.IP
5199.nf
5200\f[C]
5201#\ Slide\ with\ a\ pause
5203content\ before\ the\ pause
5205\&.\ .\ .
5207content\ after\ the\ pause
5208\f[]
5209.fi
5210.SS Styling the slides
5211.PP
5212You can change the style of HTML slides by putting customized CSS files
5213in \f[C]$DATADIR/s5/default\f[] (for S5), \f[C]$DATADIR/slidy\f[] (for
5214Slidy), or \f[C]$DATADIR/slideous\f[] (for Slideous), where
5215\f[C]$DATADIR\f[] is the user data directory (see
5216\f[C]\-\-data\-dir\f[], above).
5217The originals may be found in pandoc\[aq]s system data directory
5218(generally \f[C]$CABALDIR/pandoc\-VERSION/s5/default\f[]).
5219Pandoc will look there for any files it does not find in the user data
5220directory.
5221.PP
5222For dzslides, the CSS is included in the HTML file itself, and may be
5223modified there.
5224.PP
5225All reveal.js configuration options can be set through variables.
5226For example, themes can be used by setting the \f[C]theme\f[] variable:
5227.IP
5228.nf
5229\f[C]
5230\-V\ theme=moon
5231\f[]
5232.fi
5233.PP
5234Or you can specify a custom stylesheet using the \f[C]\-\-css\f[]
5235option.
5236.PP
5237To style beamer slides, you can specify a \f[C]theme\f[],
5238\f[C]colortheme\f[], \f[C]fonttheme\f[], \f[C]innertheme\f[], and
5239\f[C]outertheme\f[], using the \f[C]\-V\f[] option:
5240.IP
5241.nf
5242\f[C]
5243pandoc\ \-t\ beamer\ habits.txt\ \-V\ theme:Warsaw\ \-o\ habits.pdf
5244\f[]
5245.fi
5246.PP
5247Note that header attributes will turn into slide attributes (on a
5248\f[C]<div>\f[] or \f[C]<section>\f[]) in HTML slide formats, allowing
5249you to style individual slides.
5250In beamer, the only header attribute that affects slides is the
5251\f[C]allowframebreaks\f[] class, which sets the
5252\f[C]allowframebreaks\f[] option, causing multiple slides to be created
5253if the content overfills the frame.
5254This is recommended especially for bibliographies:
5255.IP
5256.nf
5257\f[C]
5258#\ References\ {.allowframebreaks}
5259\f[]
5260.fi
5261.SS Speaker notes
5262.PP
5263reveal.js has good support for speaker notes.
5264You can add notes to your Markdown document thus:
5265.IP
5266.nf
5267\f[C]
5268:::\ notes
5270This\ is\ my\ note.
5272\-\ It\ can\ contain\ Markdown
5273\-\ like\ this\ list
5275:::
5276\f[]
5277.fi
5278.PP
5279To show the notes window, press \f[C]s\f[] while viewing the
5280presentation.
5281Notes are not yet supported for other slide formats, but the notes will
5282not appear on the slides themselves.
5283.SS Columns
5284.PP
5285To put material in side by side columns, you can use a native div
5286container with class \f[C]columns\f[], containing two or more div
5287containers with class \f[C]column\f[] and a \f[C]width\f[] attribute:
5288.IP
5289.nf
5290\f[C]
5291::::::::::::::\ {.columns}
5292:::\ {.column\ width="40%"}
5293contents...
5294:::
5295:::\ {.column\ width="60%"}
5296contents...
5297:::
5298::::::::::::::
5299\f[]
5300.fi
5301.SS Frame attributes in beamer
5302.PP
5303Sometimes it is necessary to add the LaTeX \f[C][fragile]\f[] option to
5304a frame in beamer (for example, when using the \f[C]minted\f[]
5305environment).
5306This can be forced by adding the \f[C]fragile\f[] class to the header
5307introducing the slide:
5308.IP
5309.nf
5310\f[C]
5311#\ Fragile\ slide\ {.fragile}
5312\f[]
5313.fi
5314.PP
5315All of the other frame attributes described in Section 8.1 of the Beamer
5316User\[aq]s Guide may also be used: \f[C]allowdisplaybreaks\f[],
5317\f[C]allowframebreaks\f[], \f[C]b\f[], \f[C]c\f[], \f[C]t\f[],
5318\f[C]environment\f[], \f[C]label\f[], \f[C]plain\f[], \f[C]shrink\f[].
5319.SH CREATING EPUBS WITH PANDOC
5320.SS EPUB Metadata
5321.PP
5322EPUB metadata may be specified using the \f[C]\-\-epub\-metadata\f[]
5323option, but if the source document is Markdown, it is better to use a
5324YAML metadata block.
5325Here is an example:
5326.IP
5327.nf
5328\f[C]
5329\-\-\-
5330title:
5331\-\ type:\ main
5332\ \ text:\ My\ Book
5333\-\ type:\ subtitle
5334\ \ text:\ An\ investigation\ of\ metadata
5335creator:
5336\-\ role:\ author
5337\ \ text:\ John\ Smith
5338\-\ role:\ editor
5339\ \ text:\ Sarah\ Jones
5340identifier:
5341\-\ scheme:\ DOI
5342\ \ text:\ doi:10.234234.234/33
5343publisher:\ \ My\ Press
5344rights:\ ©\ 2007\ John\ Smith,\ CC\ BY\-NC
5345ibooks:
5346\ \ version:\ 1.3.4
5347\&...
5348\f[]
5349.fi
5350.PP
5351The following fields are recognized:
5352.TP
5353.B \f[C]identifier\f[]
5354Either a string value or an object with fields \f[C]text\f[] and
5355\f[C]scheme\f[].
5356Valid values for \f[C]scheme\f[] are \f[C]ISBN\-10\f[],
5357\f[C]GTIN\-13\f[], \f[C]UPC\f[], \f[C]ISMN\-10\f[], \f[C]DOI\f[],
5358\f[C]LCCN\f[], \f[C]GTIN\-14\f[], \f[C]ISBN\-13\f[],
5359\f[C]Legal\ deposit\ number\f[], \f[C]URN\f[], \f[C]OCLC\f[],
5360\f[C]ISMN\-13\f[], \f[C]ISBN\-A\f[], \f[C]JP\f[], \f[C]OLCC\f[].
5361.RS
5362.RE
5363.TP
5364.B \f[C]title\f[]
5365Either a string value, or an object with fields \f[C]file\-as\f[] and
5366\f[C]type\f[], or a list of such objects.
5367Valid values for \f[C]type\f[] are \f[C]main\f[], \f[C]subtitle\f[],
5368\f[C]short\f[], \f[C]collection\f[], \f[C]edition\f[],
5369\f[C]extended\f[].
5370.RS
5371.RE
5372.TP
5373.B \f[C]creator\f[]
5374Either a string value, or an object with fields \f[C]role\f[],
5375\f[C]file\-as\f[], and \f[C]text\f[], or a list of such objects.
5376Valid values for \f[C]role\f[] are MARC relators, but pandoc will
5377attempt to translate the human\-readable versions (like "author" and
5378"editor") to the appropriate marc relators.
5379.RS
5380.RE
5381.TP
5382.B \f[C]contributor\f[]
5383Same format as \f[C]creator\f[].
5384.RS
5385.RE
5386.TP
5387.B \f[C]date\f[]
5388A string value in \f[C]YYYY\-MM\-DD\f[] format.
5389(Only the year is necessary.) Pandoc will attempt to convert other
5390common date formats.
5391.RS
5392.RE
5393.TP
5394.B \f[C]lang\f[] (or legacy: \f[C]language\f[])
5395A string value in BCP 47 format.
5396Pandoc will default to the local language if nothing is specified.
5397.RS
5398.RE
5399.TP
5400.B \f[C]subject\f[]
5401A string value or a list of such values.
5402.RS
5403.RE
5404.TP
5405.B \f[C]description\f[]
5406A string value.
5407.RS
5408.RE
5409.TP
5410.B \f[C]type\f[]
5411A string value.
5412.RS
5413.RE
5414.TP
5415.B \f[C]format\f[]
5416A string value.
5417.RS
5418.RE
5419.TP
5420.B \f[C]relation\f[]
5421A string value.
5422.RS
5423.RE
5424.TP
5425.B \f[C]coverage\f[]
5426A string value.
5427.RS
5428.RE
5429.TP
5430.B \f[C]rights\f[]
5431A string value.
5432.RS
5433.RE
5434.TP
5435.B \f[C]cover\-image\f[]
5436A string value (path to cover image).
5437.RS
5438.RE
5439.TP
5440.B \f[C]stylesheet\f[]
5441A string value (path to CSS stylesheet).
5442.RS
5443.RE
5444.TP
5445.B \f[C]page\-progression\-direction\f[]
5446Either \f[C]ltr\f[] or \f[C]rtl\f[].
5447Specifies the \f[C]page\-progression\-direction\f[] attribute for the
5448\f[C]spine\f[] element.
5449.RS
5450.RE
5451.TP
5452.B \f[C]ibooks\f[]
5453iBooks\-specific metadata, with the following fields:
5454.RS
5455.IP \[bu] 2
5456\f[C]version\f[]: (string)
5457.IP \[bu] 2
5458\f[C]specified\-fonts\f[]: \f[C]true\f[]|\f[C]false\f[] (default
5459\f[C]false\f[])
5460.IP \[bu] 2
5461\f[C]ipad\-orientation\-lock\f[]:
5462\f[C]portrait\-only\f[]|\f[C]landscape\-only\f[]
5463.IP \[bu] 2
5464\f[C]iphone\-orientation\-lock\f[]:
5465\f[C]portrait\-only\f[]|\f[C]landscape\-only\f[]
5466.IP \[bu] 2
5467\f[C]binding\f[]: \f[C]true\f[]|\f[C]false\f[] (default \f[C]true\f[])
5468.IP \[bu] 2
5469\f[C]scroll\-axis\f[]:
5470\f[C]vertical\f[]|\f[C]horizontal\f[]|\f[C]default\f[]
5471.RE
5472.SS Linked media
5473.PP
5474By default, pandoc will download linked media (including audio and
5475video) and include it in the EPUB container, yielding a completely
5476self\-contained EPUB.
5477If you want to link to external media resources instead, use raw HTML in
5478your source and add \f[C]data\-external="1"\f[] to the tag with the
5479\f[C]src\f[] attribute.
5480For example:
5481.IP
5482.nf
5483\f[C]
5484<audio\ controls="1">
5485\ \ <source\ src="http://example.com/music/toccata.mp3"
5486\ \ \ \ \ \ \ \ \ \ data\-external="1"\ type="audio/mpeg">
5487\ \ </source>
5488</audio>
5489\f[]
5490.fi
5491.SH SYNTAX HIGHLIGHTING
5492.PP
5493Pandoc will automatically highlight syntax in fenced code blocks that
5494are marked with a language name.
5495The Haskell library skylighting is used for highlighting, which works in
5496HTML, Docx, Ms, and LaTeX/PDF output.
5497To see a list of language names that pandoc will recognize, type
5498\f[C]pandoc\ \-\-list\-highlight\-languages\f[].
5499.PP
5500The color scheme can be selected using the \f[C]\-\-highlight\-style\f[]
5501option.
5502The default color scheme is \f[C]pygments\f[], which imitates the
5503default color scheme used by the Python library pygments (though
5504pygments is not actually used to do the highlighting).
5505To see a list of highlight styles, type
5506\f[C]pandoc\ \-\-list\-highlight\-styles\f[].
5507.PP
5508To disable highlighting, use the \f[C]\-\-no\-highlight\f[] option.
5509.SH CUSTOM STYLES IN DOCX OUTPUT
5510.PP
5511By default, pandoc\[aq]s docx output applies a predefined set of styles
5512for blocks such as paragraphs and block quotes, and uses largely default
5513formatting (italics, bold) for inlines.
5514This will work for most purposes, especially alongside a
5515\f[C]reference.docx\f[] file.
5516However, if you need to apply your own styles to blocks, or match a
5517preexisting set of styles, pandoc allows you to define custom styles for
5518blocks and text using \f[C]div\f[]s and \f[C]span\f[]s, respectively.
5519.PP
5520If you define a \f[C]div\f[] or \f[C]span\f[] with the attribute
5521\f[C]custom\-style\f[], pandoc will apply your specified style to the
5522contained elements.
5523So, for example using the \f[C]bracketed_spans\f[] syntax,
5524.IP
5525.nf
5526\f[C]
5527[Get\ out]{custom\-style="Emphatically"},\ he\ said.
5528\f[]
5529.fi
5530.PP
5531would produce a docx file with "Get out" styled with character style
5532\f[C]Emphatically\f[].
5533Similarly, using the \f[C]fenced_divs\f[] syntax,
5534.IP
5535.nf
5536\f[C]
5537Dickinson\ starts\ the\ poem\ simply:
5539:::\ {custom\-style="Poetry"}
5540|\ A\ Bird\ came\ down\ the\ Walk\-\-\-
5541|\ He\ did\ not\ know\ I\ saw\-\-\-
5542:::
5543\f[]
5544.fi
5545.PP
5546would style the two contained lines with the \f[C]Poetry\f[] paragraph
5547style.
5548.PP
5549If the styles are not yet in your reference.docx, they will be defined
5550in the output file as inheriting from normal text.
5551If they are already defined, pandoc will not alter the definition.
5552.PP
5553This feature allows for greatest customization in conjunction with
5554pandoc filters.
5555If you want all paragraphs after block quotes to be indented, you can
5556write a filter to apply the styles necessary.
5557If you want all italics to be transformed to the \f[C]Emphasis\f[]
5558character style (perhaps to change their color), you can write a filter
5559which will transform all italicized inlines to inlines within an
5560\f[C]Emphasis\f[] custom\-style \f[C]span\f[].
5561.SH CUSTOM WRITERS
5562.PP
5563Pandoc can be extended with custom writers written in lua.
5564(Pandoc includes a lua interpreter, so lua need not be installed
5565separately.)
5566.PP
5567To use a custom writer, simply specify the path to the lua script in
5568place of the output format.
5569For example:
5570.IP
5571.nf
5572\f[C]
5573pandoc\ \-t\ data/sample.lua
5574\f[]
5575.fi
5576.PP
5577Creating a custom writer requires writing a lua function for each
5578possible element in a pandoc document.
5579To get a documented example which you can modify according to your
5580needs, do
5581.IP
5582.nf
5583\f[C]
5584pandoc\ \-\-print\-default\-data\-file\ sample.lua
5585\f[]
5586.fi
5587.SH AUTHORS
5588.PP
5589Copyright 2006\-2017 John MacFarlane (jgm\@berkeley.edu).
5590Released under the GPL, version 2 or greater.
5591This software carries no warranty of any kind.
5592(See COPYRIGHT for full copyright and warranty notices.) For a full list
5593of contributors, see the file AUTHORS.md in the pandoc source code.
5594.PP
5595The Pandoc source code and all documentation may be downloaded
5596from <http://pandoc.org>.