git.iko.soy/typeable/pandoc
on commonmark-github help sign in
typeable/pandoc/MANUAL.txt
4416 lines 153 kB history raw
1% Pandoc User's Guide
2% John MacFarlane
3% March 26, 2017
5Synopsis
6========
8`pandoc` [*options*] [*input-file*]...
10Description
11===========
13Pandoc is a [Haskell] library for converting from one markup format to
14another, and a command-line tool that uses this library. It can read
15[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored
16Markdown], [MultiMarkdown], and (subsets of) [Textile],
17[reStructuredText], [HTML], [LaTeX], [MediaWiki markup], [TWiki markup],
18[TikiWiki markup], [Haddock markup], [OPML], [Emacs Org mode], [DocBook],
19[Muse], [txt2tags], [Vimwiki], [EPUB], [ODT], and [Word docx]; and it can
20write plain text, [Markdown], [CommonMark], [PHP Markdown
21Extra], [GitHub-Flavored Markdown], [MultiMarkdown],
22[reStructuredText], [XHTML], [HTML5], [LaTeX] \(including
23[`beamer`] slide shows\), [ConTeXt], [RTF], [OPML], [DocBook],
24[OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki
25markup], [DokuWiki markup], [ZimWiki markup], [Haddock markup],
26[EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man],
27[groff ms], [Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI
28Simple], [Muse] and [Slidy], [Slideous], [DZSlides], [reveal.js]
29or [S5] HTML slide shows. It can also produce [PDF] output on
30systems where LaTeX, ConTeXt, `pdfroff`, or `wkhtmltopdf` is
31installed.
33Pandoc's enhanced version of Markdown includes syntax for [footnotes],
34[tables], flexible [ordered lists], [definition lists], [fenced code
35blocks], [superscripts and subscripts], [strikeout], [metadata blocks],
36automatic tables of contents, embedded LaTeX [math], [citations], and
37[Markdown inside HTML block elements][Extension:
38`markdown_in_html_blocks`]. (These enhancements, described further under
39[Pandoc's Markdown], can be disabled using the `markdown_strict` input
40or output format.)
42In contrast to most existing tools for converting Markdown to HTML, which
43use regex substitutions, pandoc has a modular design: it consists of a
44set of readers, which parse text in a given format and produce a native
45representation of the document, and a set of writers, which convert
46this native representation into a target format. Thus, adding an input
47or output format requires only adding a reader or writer.
49Because pandoc's intermediate representation of a document is less
50expressive than many of the formats it converts between, one should
51not expect perfect conversions between every format and every other.
52Pandoc attempts to preserve the structural elements of a document, but
53not formatting details such as margin size. And some document elements,
54such as complex tables, may not fit into pandoc's simple document
55model. While conversions from pandoc's Markdown to all formats aspire
56to be perfect, conversions from formats more expressive than pandoc's
57Markdown can be expected to be lossy.
59[Markdown]: http://daringfireball.net/projects/markdown/
60[CommonMark]: http://commonmark.org
61[PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/
62[GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/
63[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/
64[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
65[S5]: http://meyerweb.com/eric/tools/s5/
66[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
67[Slideous]: http://goessner.net/articles/slideous/
68[HTML]: http://www.w3.org/html/
69[HTML5]: http://www.w3.org/TR/html5/
70[polyglot markup]: https://www.w3.org/TR/html-polyglot/
71[XHTML]: http://www.w3.org/TR/xhtml1/
72[LaTeX]: http://latex-project.org
73[`beamer`]: https://ctan.org/pkg/beamer
74[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf
75[ConTeXt]: http://www.contextgarden.net/
76[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
77[DocBook]: http://docbook.org
78[txt2tags]: http://txt2tags.org
79[EPUB]: http://idpf.org/epub
80[OPML]: http://dev.opml.org/spec2.html
81[OpenDocument]: http://opendocument.xml.org
82[ODT]: http://en.wikipedia.org/wiki/OpenDocument
83[Textile]: http://redcloth.org/textile
84[MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting
85[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki
86[ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html
87[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules
88[TikiWiki markup]: https://doc.tiki.org/Wiki-Syntax-Text#The_Markup_Language_Wiki-Syntax
89[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html
90[groff man]: http://man7.org/linux/man-pages/man7/groff_man.7.html
91[groff ms]: http://man7.org/linux/man-pages/man7/groff_ms.7.html
92[Haskell]: https://www.haskell.org
93[GNU Texinfo]: http://www.gnu.org/software/texinfo/
94[Emacs Org mode]: http://orgmode.org
95[AsciiDoc]: http://www.methods.co.nz/asciidoc/
96[DZSlides]: http://paulrouget.com/dzslides/
97[Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML
98[PDF]: https://www.adobe.com/pdf/
99[reveal.js]: http://lab.hakim.se/reveal-js/
100[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
101[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf
102[TEI Simple]: https://github.com/TEIC/TEI-Simple
103[Muse]: https://amusewiki.org/library/manual
104[Vimwiki]: https://vimwiki.github.io
106Using `pandoc`
107--------------
109If no *input-file* is specified, input is read from *stdin*.
110Otherwise, the *input-files* are concatenated (with a blank
111line between each) and used as input. Output goes to *stdout* by
112default (though output to *stdout* is disabled for the `odt`, `docx`,
113`epub2`, and `epub3` output formats). For output to a file, use the
114`-o` option:
116 pandoc -o output.html input.txt
118By default, pandoc produces a document fragment, not a standalone
119document with a proper header and footer. To produce a standalone
120document, use the `-s` or `--standalone` flag:
122 pandoc -s -o output.html input.txt
124For more information on how standalone documents are produced, see
125[Templates], below.
127Instead of a file, an absolute URI may be given. In this case
128pandoc will fetch the content using HTTP:
130 pandoc -f html -t markdown http://www.fsf.org
132It is possible to supply a custom User-Agent string when requesting a
133document from a URL, by setting an environment variable:
135 USER_AGENT="Mozilla/5.0" pandoc -f html -t markdown http://www.fsf.org
137If multiple input files are given, `pandoc` will concatenate them all (with
138blank lines between them) before parsing. This feature is disabled for
139 binary input formats such as `EPUB`, `odt`, and `docx`.
141The format of the input and output can be specified explicitly using
142command-line options. The input format can be specified using the
143`-r/--read` or `-f/--from` options, the output format using the
144`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
145Markdown to LaTeX, you could type:
147 pandoc -f markdown -t latex hello.txt
149To convert `hello.html` from HTML to Markdown:
151 pandoc -f html -t markdown hello.html
153Supported output formats are listed below under the `-t/--to` option.
154Supported input formats are listed below under the `-f/--from` option. Note
155that the `rst`, `textile`, `latex`, and `html` readers are not complete;
156there are some constructs that they do not parse.
158If the input or output format is not specified explicitly, `pandoc`
159will attempt to guess it from the extensions of
160the input and output filenames. Thus, for example,
162 pandoc -o hello.tex hello.txt
164will convert `hello.txt` from Markdown to LaTeX. If no output file
165is specified (so that output goes to *stdout*), or if the output file's
166extension is unknown, the output format will default to HTML.
167If no input file is specified (so that input comes from *stdin*), or
168if the input files' extensions are unknown, the input format will
169be assumed to be Markdown unless explicitly specified.
171Pandoc uses the UTF-8 character encoding for both input and output.
172If your local character encoding is not UTF-8, you
173should pipe input and output through [`iconv`]:
175 iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
177Note that in some output formats (such as HTML, LaTeX, ConTeXt,
178RTF, OPML, DocBook, and Texinfo), information about
179the character encoding is included in the document header, which
180will only be included if you use the `-s/--standalone` option.
182[`iconv`]: http://www.gnu.org/software/libiconv/
184Creating a PDF
185--------------
187To produce a PDF, specify an output file with a `.pdf` extension.
188By default, pandoc will use LaTeX to convert it to PDF:
190 pandoc test.txt -o test.pdf
192Production of a PDF requires that a LaTeX engine be installed (see
193`--latex-engine`, below), and assumes that the following LaTeX packages
194are available: [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
195[`ifxetex`], [`ifluatex`], [`eurosym`], [`listings`] (if the
196`--listings` option is used), [`fancyvrb`], [`longtable`],
197[`booktabs`], [`graphicx`] and [`grffile`] (if the document
198contains images), [`hyperref`], [`ulem`], [`geometry`] (with the
199`geometry` variable set), [`setspace`] (with `linestretch`), and
200[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as
201the LaTeX engine requires [`fontspec`]. `xelatex` uses
202[`polyglossia`] (with `lang`), [`xecjk`], and [`bidi`] (with the
203`dir` variable set). If the `mathspec` variable is set,
204`xelatex` will use [`mathspec`] instead of [`unicode-math`].
205The [`upquote`] and [`microtype`] packages are used if
206available, and [`csquotes`] will be used for [smart punctuation]
207if added to the template or included in any header file. The
208[`natbib`], [`biblatex`], [`bibtex`], and [`biber`] packages can
209optionally be used for [citation rendering]. These are included
210with all recent versions of [TeX Live].
212Alternatively, pandoc can use ConTeXt, `wkhtmltopdf`, or
213`pdfroff` to create a PDF. To do this, specify an output file
214with a `.pdf` extension, as before, but add `-t context`, `-t
215html5`, or `-t ms` to the command line.
217PDF output can be controlled using [variables for LaTeX] (if
218LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used).
219If `wkhtmltopdf` is used, then the variables `margin-left`,
220`margin-right`, `margin-top`, `margin-bottom`, and `papersize`
221will affect the output, as will `--css`.
223[`amsfonts`]: https://ctan.org/pkg/amsfonts
224[`amsmath`]: https://ctan.org/pkg/amsmath
225[`lm`]: https://ctan.org/pkg/lm
226[`ifxetex`]: https://ctan.org/pkg/ifxetex
227[`ifluatex`]: https://ctan.org/pkg/ifluatex
228[`eurosym`]: https://ctan.org/pkg/eurosym
229[`listings`]: https://ctan.org/pkg/listings
230[`fancyvrb`]: https://ctan.org/pkg/fancyvrb
231[`longtable`]: https://ctan.org/pkg/longtable
232[`booktabs`]: https://ctan.org/pkg/booktabs
233[`graphicx`]: https://ctan.org/pkg/graphicx
234[`grffile`]: https://ctan.org/pkg/grffile
235[`geometry`]: https://ctan.org/pkg/geometry
236[`setspace`]: https://ctan.org/pkg/setspace
237[`xecjk`]: https://ctan.org/pkg/xecjk
238[`hyperref`]: https://ctan.org/pkg/hyperref
239[`ulem`]: https://ctan.org/pkg/ulem
240[`babel`]: https://ctan.org/pkg/babel
241[`bidi`]: https://ctan.org/pkg/bidi
242[`mathspec`]: https://ctan.org/pkg/mathspec
243[`unicode-math`]: https://ctan.org/pkg/unicode-math
244[`polyglossia`]: https://ctan.org/pkg/polyglossia
245[`fontspec`]: https://ctan.org/pkg/fontspec
246[`upquote`]: https://ctan.org/pkg/upquote
247[`microtype`]: https://ctan.org/pkg/microtype
248[`csquotes`]: https://ctan.org/pkg/csquotes
249[`natbib`]: https://ctan.org/pkg/natbib
250[`biblatex`]: https://ctan.org/pkg/biblatex
251[`bibtex`]: https://ctan.org/pkg/bibtex
252[`biber`]: https://ctan.org/pkg/biber
253[TeX Live]: http://www.tug.org/texlive/
255Options
256=======
258General options
259---------------
261`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
263: Specify input format. *FORMAT* can be `native` (native Haskell),
264 `json` (JSON version of native AST), `markdown` (pandoc's
265 extended Markdown), `markdown_strict` (original unextended
266 Markdown), `markdown_phpextra` (PHP Markdown Extra), `markdown_github`
267 (GitHub-Flavored Markdown), `markdown_mmd` (MultiMarkdown),
268 `commonmark` (CommonMark Markdown), `textile` (Textile), `rst`
269 (reStructuredText), `html` (HTML), `docbook` (DocBook), `t2t`
270 (txt2tags), `docx` (docx), `odt` (ODT), `epub` (EPUB), `opml` (OPML),
271 `org` (Emacs Org mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki
272 markup), `tikiwiki` (TikiWiki markup), `haddock` (Haddock markup), or
273 `latex` (LaTeX). If `+lhs` is appended to `markdown`, `rst`, `latex`, or
274 `html`, the input will be treated as literate Haskell source: see
275 [Literate Haskell support], below. Markdown
276 syntax extensions can be individually enabled or disabled by
277 appending `+EXTENSION` or `-EXTENSION` to the format name. So, for
278 example, `markdown_strict+footnotes+definition_lists` is strict
279 Markdown with footnotes and definition lists enabled, and
280 `markdown-pipe_tables+hard_line_breaks` is pandoc's Markdown
281 without pipe tables and with hard line breaks. See [Pandoc's
282 Markdown], below, for a list of extensions and
283 their names. See `--list-input-formats` and `--list-extensions`,
284 below.
286`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
288: Specify output format. *FORMAT* can be `native` (native Haskell),
289 `json` (JSON version of native AST), `plain` (plain text),
290 `markdown` (pandoc's extended Markdown), `markdown_strict`
291 (original unextended Markdown), `markdown_phpextra` (PHP Markdown
292 Extra), `markdown_github` (GitHub-Flavored Markdown), `markdown_mmd`
293 (MultiMarkdown), `commonmark` (CommonMark Markdown), `rst`
294 (reStructuredText), `html4` (XHTML 1.0 Transitional), `html`
295 or `html5` (HTML5/XHTML [polyglot markup]), `latex`
296 (LaTeX), `beamer` (LaTeX beamer slide show), `context` (ConTeXt),
297 `man` (groff man), `mediawiki` (MediaWiki markup),
298 `dokuwiki` (DokuWiki markup), `zimwiki` (ZimWiki markup),
299 `textile` (Textile), `org` (Emacs Org mode), `texinfo` (GNU Texinfo),
300 `opml` (OPML), `docbook` or `docbook4` (DocBook 4), `docbook5`
301 (DocBook 5), `jats` (JATS XML), `opendocument` (OpenDocument),
302 `odt` (OpenOffice text document), `docx` (Word docx), `haddock`
303 (Haddock markup), `rtf` (rich text format), `epub2` (EPUB v2 book),
304 `epub` or `epub3` (EPUB v3), `fb2` (FictionBook2 e-book),
305 `asciidoc` (AsciiDoc), `icml` (InDesign ICML), `tei` (TEI
306 Simple), `slidy` (Slidy HTML and JavaScript slide show),
307 `slideous` (Slideous HTML and JavaScript slide show),
308 `dzslides` (DZSlides HTML5 + JavaScript slide show),
309 `revealjs` (reveal.js HTML5 + JavaScript slide show), `s5`
310 (S5 HTML and JavaScript slide show), or the path of a custom
311 lua writer (see [Custom writers], below). Note that `odt`,
312 `epub`, and `epub3` output will not be directed to *stdout*;
313 an output filename must be specified using the `-o/--output`
314 option. If `+lhs` is appended to `markdown`, `rst`, `latex`,
315 `beamer`, `html4`, or `html5`, the output will be rendered as
316 literate Haskell source: see [Literate Haskell support],
317 below. Markdown syntax extensions can be individually
318 enabled or disabled by appending `+EXTENSION` or
319 `-EXTENSION` to the format name, as described above under `-f`.
320 See `--list-output-formats` and `--list-extensions`, below.
322`-o` *FILE*, `--output=`*FILE*
324: Write output to *FILE* instead of *stdout*. If *FILE* is
325 `-`, output will go to *stdout*. (Exception: if the output
326 format is `odt`, `docx`, `epub`, or `epub3`, output to stdout is disabled.)
328`--data-dir=`*DIRECTORY*
330: Specify the user data directory to search for pandoc data files.
331 If this option is not specified, the default user data directory
332 will be used. This is, in Unix:
334 $HOME/.pandoc
336 in Windows XP:
338 C:\Documents And Settings\USERNAME\Application Data\pandoc
340 and in Windows Vista or later:
342 C:\Users\USERNAME\AppData\Roaming\pandoc
344 You can find the default user data directory on your system by
345 looking at the output of `pandoc --version`.
346 A `reference.odt`, `reference.docx`, `epub.css`, `templates`,
347 `slidy`, `slideous`, or `s5` directory
348 placed in this directory will override pandoc's normal defaults.
350`--bash-completion`
352: Generate a bash completion script. To enable bash completion
353 with pandoc, add this to your `.bashrc`:
355 eval "$(pandoc --bash-completion)"
357`--verbose`
359: Give verbose debugging output. Currently this only has an effect
360 with PDF output.
362`--quiet`
364: Suppress warning messages.
366`--fail-if-warnings`
368: Exit with error status if there are any warnings.
370`--log=`*FILE*
372: Write log messages in machine-readable JSON format to
373 *FILE*. All messages above DEBUG level will be written,
374 regardless of verbosity settings (`--verbose`, `--quiet`).
376`--list-input-formats`
378: List supported input formats, one per line.
380`--list-output-formats`
382: List supported output formats, one per line.
384`--list-extensions`
386: List supported Markdown extensions, one per line, followed
387 by a `+` or `-` indicating whether it is enabled by default
388 in pandoc's Markdown.
390`--list-highlight-languages`
392: List supported languages for syntax highlighting, one per
393 line.
395`--list-highlight-styles`
397: List supported styles for syntax highlighting, one per line.
398 See `--highlight-style`.
400`-v`, `--version`
402: Print version.
404`-h`, `--help`
406: Show usage message.
408Reader options
409--------------
411`--base-header-level=`*NUMBER*
413: Specify the base level for headers (defaults to 1).
415`--indented-code-classes=`*CLASSES*
417: Specify classes to use for indented code blocks--for example,
418 `perl,numberLines` or `haskell`. Multiple classes may be separated
419 by spaces or commas.
421`--default-image-extension=`*EXTENSION*
423: Specify a default extension to use when image paths/URLs have no
424 extension. This allows you to use the same source for formats that
425 require different kinds of images. Currently this option only affects
426 the Markdown and LaTeX readers.
428`--file-scope`
430: Parse each file individually before combining for multifile
431 documents. This will allow footnotes in different files with the
432 same identifiers to work as expected. If this option is set,
433 footnotes and links will not work across files. Reading binary
434 files (docx, odt, epub) implies `--file-scope`.
436`--filter=`*PROGRAM*
438: Specify an executable to be used as a filter transforming the
439 pandoc AST after the input is parsed and before the output is
440 written. The executable should read JSON from stdin and write
441 JSON to stdout. The JSON must be formatted like pandoc's own
442 JSON input and output. The name of the output format will be
443 passed to the filter as the first argument. Hence,
445 pandoc --filter ./caps.py -t latex
447 is equivalent to
449 pandoc -t json | ./caps.py latex | pandoc -f json -t latex
451 The latter form may be useful for debugging filters.
453 Filters may be written in any language. `Text.Pandoc.JSON`
454 exports `toJSONFilter` to facilitate writing filters in Haskell.
455 Those who would prefer to write filters in python can use the
456 module [`pandocfilters`], installable from PyPI. There are also
457 pandoc filter libraries in [PHP], [perl], and
458 [javascript/node.js].
460 In order of preference, pandoc will look for filters in
462 1. a specified full or relative path (executable or
463 non-executable)
465 2. `$DATADIR/filters` (executable or non-executable)
467 3. `$PATH` (executable only)
469`--lua-filter=`*SCRIPT*
471: Transform the document in a similar fashion as JSON filters (see
472 `--filter`), but use pandoc's build-in lua filtering system. The given
473 lua script is expected to return a list of lua filters which will be
474 applied in order. Each lua filter must contain element-transforming
475 functions indexed by the name of the AST element on which the filter
476 function should be applied.
478 The `pandoc` lua module provides helper functions for element
479 creation. It is always loaded into the script's lua environment.
481 The following is an example lua script for macro-expansion:
483 function expand_hello_world(inline)
484 if inline.c == '{{helloworld}}' then
485 return pandoc.Emph{ pandoc.Str "Hello, World" }
486 else
487 return inline
488 end
489 end
491 return {{Str = expand_hello_world}}
494`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
496: Set the metadata field *KEY* to the value *VAL*. A value specified
497 on the command line overrides a value specified in the document.
498 Values will be parsed as YAML boolean or string values. If no value is
499 specified, the value will be treated as Boolean true. Like
500 `--variable`, `--metadata` causes template variables to be set.
501 But unlike `--variable`, `--metadata` affects the metadata of the
502 underlying document (which is accessible from filters and may be
503 printed in some output formats).
505`-p`, `--preserve-tabs`
507: Preserve tabs instead of converting them to spaces (the default).
508 Note that this will only affect tabs in literal code spans and code
509 blocks; tabs in regular text will be treated as spaces.
511`--tab-stop=`*NUMBER*
513: Specify the number of spaces per tab (default is 4).
515`--track-changes=accept`|`reject`|`all`
517: Specifies what to do with insertions, deletions, and comments
518 produced by the MS Word "Track Changes" feature. `accept` (the
519 default), inserts all insertions, and ignores all
520 deletions. `reject` inserts all deletions and ignores
521 insertions. Both `accept` and `reject` ignore comments. `all` puts
522 in insertions, deletions, and comments, wrapped in spans with
523 `insertion`, `deletion`, `comment-start`, and `comment-end`
524 classes, respectively. The author and time of change is
525 included. `all` is useful for scripting: only accepting changes
526 from a certain reviewer, say, or before a certain date. This
527 option only affects the docx reader.
529`--extract-media=`*DIR*
531: Extract images and other media contained in or linked from
532 the source document to the path *DIR*, creating it if
533 necessary, and adjust the images references in the document
534 so they point to the extracted files. If the source format is
535 a binary container (docx, epub, or odt), the media is
536 extracted from the container and the original
537 filenames are used. Otherwise the media is read from the
538 file system or downloaded, and new filenames are constructed
539 based on SHA1 hashes of the contents.
541`--abbreviations=`*FILE*
543: Specifies a custom abbreviations file, with abbreviations
544 one to a line. If this option is not specified, pandoc will
545 read the data file `abbreviations` from the user data
546 directory or fall back on a system default. To see the
547 system default, use
548 `pandoc --print-default-data-file=abbreviations`. The only
549 use pandoc makes of this list is in the Markdown reader.
550 Strings ending in a period that are found in this list will
551 be followed by a nonbreaking space, so that the period will
552 not produce sentence-ending space in formats like LaTeX.
554[`pandocfilters`]: https://github.com/jgm/pandocfilters
555[PHP]: https://github.com/vinai/pandocfilters-php
556[perl]: https://metacpan.org/pod/Pandoc::Filter
557[javascript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
559General writer options
560----------------------
562`-s`, `--standalone`
564: Produce output with an appropriate header and footer (e.g. a
565 standalone HTML, LaTeX, TEI, or RTF file, not a fragment). This option
566 is set automatically for `pdf`, `epub`, `epub3`, `fb2`, `docx`, and `odt`
567 output.
569`--template=`*FILE*
571: Use *FILE* as a custom template for the generated document. Implies
572 `--standalone`. See [Templates], below, for a description
573 of template syntax. If no extension is specified, an extension
574 corresponding to the writer will be added, so that `--template=special`
575 looks for `special.html` for HTML output. If the template is not
576 found, pandoc will search for it in the `templates` subdirectory of
577 the user data directory (see `--data-dir`). If this option is not used,
578 a default template appropriate for the output format will be used (see
579 `-D/--print-default-template`).
581`-V` *KEY*[`=`*VAL*], `--variable=`*KEY*[`:`*VAL*]
583: Set the template variable *KEY* to the value *VAL* when rendering the
584 document in standalone mode. This is generally only useful when the
585 `--template` option is used to specify a custom template, since
586 pandoc automatically sets the variables used in the default
587 templates. If no *VAL* is specified, the key will be given the
588 value `true`.
590`-D` *FORMAT*, `--print-default-template=`*FORMAT*
592: Print the system default template for an output *FORMAT*. (See `-t`
593 for a list of possible *FORMAT*s.) Templates in the user data
594 directory are ignored.
596`--print-default-data-file=`*FILE*
598: Print a system default data file. Files in the user data directory
599 are ignored.
601`--eol=crlf`|`lf`|`native`
603: Manually specify line endings: `crlf` (Windows), `lf`
604 (MacOS/linux/unix), or `native` (line endings appropriate
605 to the OS on which pandoc is being run). The default is
606 `native`.
608`--dpi`=*NUMBER*
610: Specify the dpi (dots per inch) value for conversion from pixels
611 to inch/centimeters and vice versa. The default is 96dpi.
612 Technically, the correct term would be ppi (pixels per inch).
614`--wrap=auto`|`none`|`preserve`
616: Determine how text is wrapped in the output (the source
617 code, not the rendered version). With `auto` (the default),
618 pandoc will attempt to wrap lines to the column width specified by
619 `--columns` (default 72). With `none`, pandoc will not wrap
620 lines at all. With `preserve`, pandoc will attempt to
621 preserve the wrapping from the source document (that is,
622 where there are nonsemantic newlines in the source, there
623 will be nonsemantic newlines in the output as well).
624 Automatic wrapping does not currently work in HTML output.
626`--columns=`*NUMBER*
628: Specify length of lines in characters. This affects text wrapping
629 in the generated source code (see `--wrap`). It also affects
630 calculation of column widths for plain text tables (see [Tables] below).
632`--toc`, `--table-of-contents`
634: Include an automatically generated table of contents (or, in
635 the case of `latex`, `context`, `docx`, `odt`,
636 `opendocument`, `rst`, or `ms`, an instruction to create
637 one) in the output document. This option has no effect on
638 `man`, `docbook4`, `docbook5`, or `jats` output.
640`--toc-depth=`*NUMBER*
642: Specify the number of section levels to include in the table
643 of contents. The default is 3 (which means that level 1, 2, and 3
644 headers will be listed in the contents).
646`--no-highlight`
648: Disables syntax highlighting for code blocks and inlines, even when
649 a language attribute is given.
651`--highlight-style=`*STYLE*|*FILE*
653: Specifies the coloring style to be used in highlighted source code.
654 Options are `pygments` (the default), `kate`, `monochrome`,
655 `breezeDark`, `espresso`, `zenburn`, `haddock`, and `tango`.
656 For more information on syntax highlighting in pandoc, see
657 [Syntax highlighting], below. See also
658 `--list-highlight-styles`.
660 Instead of a *STYLE* name, a JSON file with extension
661 `.theme` may be supplied. This will be parsed as a KDE
662 syntax highlighting theme and (if valid) used as the
663 highlighting style. To see a sample theme that can be
664 modified, `pandoc --print-default-data-file default.theme`.
666`--syntax-definition=`*FILE*
668: Instructs pandoc to load a KDE XML syntax definition file,
669 which will be used for syntax highlighting of appropriately
670 marked code blocks. This can be used to add support for
671 new languages or to use altered syntax definitions for
672 existing languages.
674`-H` *FILE*, `--include-in-header=`*FILE*
676: Include contents of *FILE*, verbatim, at the end of the header.
677 This can be used, for example, to include special
678 CSS or JavaScript in HTML documents. This option can be used
679 repeatedly to include multiple files in the header. They will be
680 included in the order specified. Implies `--standalone`.
682`-B` *FILE*, `--include-before-body=`*FILE*
684: Include contents of *FILE*, verbatim, at the beginning of the
685 document body (e.g. after the `<body>` tag in HTML, or the
686 `\begin{document}` command in LaTeX). This can be used to include
687 navigation bars or banners in HTML documents. This option can be
688 used repeatedly to include multiple files. They will be included in
689 the order specified. Implies `--standalone`.
691`-A` *FILE*, `--include-after-body=`*FILE*
693: Include contents of *FILE*, verbatim, at the end of the document
694 body (before the `</body>` tag in HTML, or the
695 `\end{document}` command in LaTeX). This option can be used
696 repeatedly to include multiple files. They will be included in the
697 order specified. Implies `--standalone`.
699`--resource-path=`*SEARCHPATH*
701: List of paths to search for images and other resources.
702 The paths should be separated by `:` on linux, unix, and
703 MacOS systems, and by `;` on Windows. If `--resource-path`
704 is not specified, the default resource path is the working
705 directory. Note that, if `--resource-path` is specified,
706 the working directory must be explicitly listed or it
707 will not be searched. For example:
708 `--resource-path=.:test` will search the working directory
709 and the `test` subdirectory, in that order.
711Options affecting specific writers
712----------------------------------
714`--self-contained`
716: Produce a standalone HTML file with no external dependencies, using
717 `data:` URIs to incorporate the contents of linked scripts, stylesheets,
718 images, and videos. The resulting file should be "self-contained,"
719 in the sense that it needs no external files and no net access to be
720 displayed properly by a browser. This option works only with HTML output
721 formats, including `html4`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
722 `slidy`, `slideous`, `dzslides`, and `revealjs`. Scripts, images, and
723 stylesheets at absolute URLs will be downloaded; those at relative URLs
724 will be sought relative to the working directory (if the first source
725 file is local) or relative to the base URL (if the first source
726 file is remote). Elements with the attribute
727 `data-external="1"` will be left alone; the documents they
728 link to will not be incorporated in the document.
729 Limitation: resources that are loaded dynamically through
730 JavaScript cannot be incorporated; as a result,
731 `--self-contained` does not work with `--mathjax`, and some
732 advanced features (e.g. zoom or speaker notes) may not work
733 in an offline "self-contained" `reveal.js` slide show.
735`--html-q-tags`
737: Use `<q>` tags for quotes in HTML.
739`--ascii`
741: Use only ASCII characters in output. Currently supported only for
742 HTML and DocBook output (which uses numerical entities instead of
743 UTF-8 when this option is selected).
745`--reference-links`
747: Use reference-style links, rather than inline links, in writing Markdown
748 or reStructuredText. By default inline links are used. The
749 placement of link references is affected by the
750 `--reference-location` option.
752`--reference-location = block`|`section`|`document`
754: Specify whether footnotes (and references, if `reference-links` is
755 set) are placed at the end of the current (top-level) block, the
756 current section, or the document. The default is
757 `document`. Currently only affects the markdown writer.
759`--atx-headers`
761: Use ATX-style headers in Markdown and AsciiDoc output. The default is
762 to use setext-style headers for levels 1-2, and then ATX headers.
764`--top-level-division=[default|section|chapter|part]`
766: Treat top-level headers as the given division type in LaTeX, ConTeXt,
767 DocBook, and TEI output. The hierarchy order is part, chapter, then section;
768 all headers are shifted such that the top-level header becomes the specified
769 type. The default behavior is to determine the best division type via
770 heuristics: unless other conditions apply, `section` is chosen. When the
771 LaTeX document class is set to `report`, `book`, or `memoir` (unless the
772 `article` option is specified), `chapter` is implied as the setting for this
773 option. If `beamer` is the output format, specifying either `chapter` or
774 `part` will cause top-level headers to become `\part{..}`, while
775 second-level headers remain as their default type.
777`-N`, `--number-sections`
779: Number section headings in LaTeX, ConTeXt, HTML, or EPUB output.
780 By default, sections are not numbered. Sections with class
781 `unnumbered` will never be numbered, even if `--number-sections`
782 is specified.
784`--number-offset=`*NUMBER*[`,`*NUMBER*`,`*...*]
786: Offset for section headings in HTML output (ignored in other
787 output formats). The first number is added to the section number for
788 top-level headers, the second for second-level headers, and so on.
789 So, for example, if you want the first top-level header in your
790 document to be numbered "6", specify `--number-offset=5`.
791 If your document starts with a level-2 header which you want to
792 be numbered "1.5", specify `--number-offset=1,4`.
793 Offsets are 0 by default. Implies `--number-sections`.
795`--listings`
797: Use the [`listings`] package for LaTeX code blocks
799`-i`, `--incremental`
801: Make list items in slide shows display incrementally (one by one).
802 The default is for lists to be displayed all at once.
804`--slide-level=`*NUMBER*
806: Specifies that headers with the specified level create
807 slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers
808 above this level in the hierarchy are used to divide the
809 slide show into sections; headers below this level create
810 subheads within a slide. Note that content that is
811 not contained under slide-level headers will not appear in
812 the slide show. The default is to set the slide level based
813 on the contents of the document; see [Structuring the slide
814 show].
816`--section-divs`
818: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
819 and attach identifiers to the enclosing `<div>` (or `<section>`)
820 rather than the header itself. See
821 [Header identifiers], below.
823`--email-obfuscation=none`|`javascript`|`references`
825: Specify a method for obfuscating `mailto:` links in HTML documents.
826 `none` leaves `mailto:` links as they are. `javascript` obfuscates
827 them using JavaScript. `references` obfuscates them by printing their
828 letters as decimal or hexadecimal character references. The default
829 is `none`.
831`--id-prefix=`*STRING*
833: Specify a prefix to be added to all identifiers and internal links
834 in HTML and DocBook output, and to footnote numbers in Markdown
835 and Haddock output. This is useful for preventing duplicate
836 identifiers when generating fragments to be included in other pages.
838`-T` *STRING*, `--title-prefix=`*STRING*
840: Specify *STRING* as a prefix at the beginning of the title
841 that appears in the HTML header (but not in the title as it
842 appears at the beginning of the HTML body). Implies
843 `--standalone`.
845`-c` *URL*, `--css=`*URL*
847: Link to a CSS style sheet. This option can be used repeatedly to
848 include multiple files. They will be included in the order specified.
850 A stylesheet is required for generating EPUB. If none is
851 provided using this option (or the `stylesheet` metadata
852 field), pandoc will look for a file `epub.css` in the
853 user data directory (see `--data-dir`). If it is not
854 found there, sensible defaults will be used.
856`--reference-doc=`*FILE*
858: Use the specified file as a style reference in producing a
859 docx or ODT file.
861 Docx
863 : For best results, the reference docx should be a modified
864 version of a docx file produced using pandoc. The contents
865 of the reference docx are ignored, but its stylesheets and
866 document properties (including margins, page size, header,
867 and footer) are used in the new docx. If no reference docx
868 is specified on the command line, pandoc will look for a
869 file `reference.docx` in the user data directory (see
870 `--data-dir`). If this is not found either, sensible
871 defaults will be used.
873 To produce a custom `reference.docx`, first get a copy of
874 the default `reference.docx`: `pandoc
875 --print-default-data-file reference.docx >
876 custom-reference.docx`. Then open `custom-reference.docx`
877 in Word, modify the styles as you wish, and save the file.
878 For best results, do not make changes to this file other
879 than modifying the styles used by pandoc: [paragraph]
880 Normal, Body Text, First Paragraph, Compact, Title,
881 Subtitle, Author, Date, Abstract, Bibliography, Heading 1,
882 Heading 2, Heading 3, Heading 4, Heading 5, Heading 6,
883 Heading 7, Heading 8, Heading 9, Block Text, Footnote Text,
884 Definition Term, Definition, Caption, Table Caption,
885 Image Caption, Figure, Captioned Figure, TOC Heading;
886 [character] Default Paragraph Font, Body Text Char,
887 Verbatim Char, Footnote Reference, Hyperlink; [table]
888 Table.
890 ODT
892 : For best results, the reference ODT should be a modified
893 version of an ODT produced using pandoc. The contents of
894 the reference ODT are ignored, but its stylesheets are used
895 in the new ODT. If no reference ODT is specified on the
896 command line, pandoc will look for a file `reference.odt` in
897 the user data directory (see `--data-dir`). If this is not
898 found either, sensible defaults will be used.
900 To produce a custom `reference.odt`, first get a copy of
901 the default `reference.odt`: `pandoc
902 --print-default-data-file reference.odt >
903 custom-reference.odt`. Then open `custom-reference.odt` in
904 LibreOffice, modify the styles as you wish, and save the
905 file.
907`--epub-cover-image=`*FILE*
909: Use the specified image as the EPUB cover. It is recommended
910 that the image be less than 1000px in width and height. Note that
911 in a Markdown source document you can also specify `cover-image`
912 in a YAML metadata block (see [EPUB Metadata], below).
914`--epub-metadata=`*FILE*
916: Look in the specified XML file for metadata for the EPUB.
917 The file should contain a series of [Dublin Core elements].
918 For example:
920 <dc:rights>Creative Commons</dc:rights>
921 <dc:language>es-AR</dc:language>
923 By default, pandoc will include the following metadata elements:
924 `<dc:title>` (from the document title), `<dc:creator>` (from the
925 document authors), `<dc:date>` (from the document date, which should
926 be in [ISO 8601 format]), `<dc:language>` (from the `lang`
927 variable, or, if is not set, the locale), and `<dc:identifier
928 id="BookId">` (a randomly generated UUID). Any of these may be
929 overridden by elements in the metadata file.
931 Note: if the source document is Markdown, a YAML metadata block
932 in the document can be used instead. See below under
933 [EPUB Metadata].
935`--epub-embed-font=`*FILE*
937: Embed the specified font in the EPUB. This option can be repeated
938 to embed multiple fonts. Wildcards can also be used: for example,
939 `DejaVuSans-*.ttf`. However, if you use wildcards on the command
940 line, be sure to escape them or put the whole filename in single quotes,
941 to prevent them from being interpreted by the shell. To use the
942 embedded fonts, you will need to add declarations like the following
943 to your CSS (see `--css`):
945 @font-face {
946 font-family: DejaVuSans;
947 font-style: normal;
948 font-weight: normal;
949 src:url("DejaVuSans-Regular.ttf");
950 }
951 @font-face {
952 font-family: DejaVuSans;
953 font-style: normal;
954 font-weight: bold;
955 src:url("DejaVuSans-Bold.ttf");
956 }
957 @font-face {
958 font-family: DejaVuSans;
959 font-style: italic;
960 font-weight: normal;
961 src:url("DejaVuSans-Oblique.ttf");
962 }
963 @font-face {
964 font-family: DejaVuSans;
965 font-style: italic;
966 font-weight: bold;
967 src:url("DejaVuSans-BoldOblique.ttf");
968 }
969 body { font-family: "DejaVuSans"; }
971`--epub-chapter-level=`*NUMBER*
973: Specify the header level at which to split the EPUB into separate
974 "chapter" files. The default is to split into chapters at level 1
975 headers. This option only affects the internal composition of the
976 EPUB, not the way chapters and sections are displayed to users. Some
977 readers may be slow if the chapter files are too large, so for large
978 documents with few level 1 headers, one might want to use a chapter
979 level of 2 or 3.
981`--epub-subdirectory=`*DIRNAME*
983: Specify the subdirectory in the OCF container that is to hold
984 the EPUB-specific contents. The default is `EPUB`. To put
985 the EPUB contents in the top level, use an empty string.
987`--latex-engine=pdflatex`|`lualatex`|`xelatex`
989: Use the specified LaTeX engine when producing PDF output.
990 The default is `pdflatex`. If the engine is not in your PATH,
991 the full path of the engine may be specified here.
993`--latex-engine-opt=`*STRING*
995: Use the given string as a command-line argument to the `latex-engine`.
996 If used multiple times, the arguments are provided with spaces between
997 them. Note that no check for duplicate options is done.
999[Dublin Core elements]: http://dublincore.org/documents/dces/
1000[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime
1002Citation rendering
1003------------------
1005`--bibliography=`*FILE*
1007: Set the `bibliography` field in the document's metadata to *FILE*,
1008 overriding any value set in the metadata, and process citations
1009 using `pandoc-citeproc`. (This is equivalent to
1010 `--metadata bibliography=FILE --filter pandoc-citeproc`.)
1011 If `--natbib` or `--biblatex` is also supplied, `pandoc-citeproc` is not
1012 used, making this equivalent to `--metadata bibliography=FILE`.
1013 If you supply this argument multiple times, each *FILE* will be added
1014 to bibliography.
1016`--csl=`*FILE*
1018: Set the `csl` field in the document's metadata to *FILE*,
1019 overriding any value set in the metadata. (This is equivalent to
1020 `--metadata csl=FILE`.)
1021 This option is only relevant with `pandoc-citeproc`.
1023`--citation-abbreviations=`*FILE*
1025: Set the `citation-abbreviations` field in the document's metadata to
1026 *FILE*, overriding any value set in the metadata. (This is equivalent to
1027 `--metadata citation-abbreviations=FILE`.)
1028 This option is only relevant with `pandoc-citeproc`.
1030`--natbib`
1032: Use [`natbib`] for citations in LaTeX output. This option is not for use
1033 with the `pandoc-citeproc` filter or with PDF output. It is intended for
1034 use in producing a LaTeX file that can be processed with [`bibtex`].
1036`--biblatex`
1038: Use [`biblatex`] for citations in LaTeX output. This option is not for use
1039 with the `pandoc-citeproc` filter or with PDF output. It is intended for
1040 use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`].
1042Math rendering in HTML
1043----------------------
1045`-m` [*URL*], `--latexmathml`[`=`*URL*]
1047: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
1048 To insert a link to a local copy of the `LaTeXMathML.js` script,
1049 provide a *URL*. If no *URL* is provided, the contents of the
1050 script will be inserted directly into the HTML header, preserving
1051 portability at the price of efficiency. If you plan to use math on
1052 several pages, it is much better to link to a copy of the script,
1053 so it can be cached.
1055`--mathml`
1057: Convert TeX math to [MathML] (in `docbook4`, `docbook5`, `jats`,
1058 `html4` and `html5`). This is the default in `odt` output.
1060`--jsmath`[`=`*URL*]
1062: Use [jsMath] to display embedded TeX math in HTML output.
1063 The *URL* should point to the jsMath load script (e.g.
1064 `jsMath/easy/load.js`); if provided, it will be linked to in
1065 the header of standalone HTML documents. If a *URL* is not provided,
1066 no link to the jsMath load script will be inserted; it is then
1067 up to the author to provide such a link in the HTML template.
1069`--mathjax`[`=`*URL*]
1071: Use [MathJax] to display embedded TeX math in HTML output.
1072 The *URL* should point to the `MathJax.js` load script.
1073 If a *URL* is not provided, a link to the MathJax CDN will
1074 be inserted.
1076`--gladtex`
1078: Enclose TeX math in `<eq>` tags in HTML output. These can then
1079 be processed by [gladTeX] to produce links to images of the typeset
1080 formulas.
1082`--mimetex`[`=`*URL*]
1084: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
1085 specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
1087`--webtex`[`=`*URL*]
1089: Render TeX formulas using an external script that converts TeX
1090 formulas to images. The formula will be concatenated with the URL
1091 provided. If *URL* is not specified, the CodeCogs will be used.
1092 Note: the `--webtex` option will affect Markdown output
1093 as well as HTML, which is useful if you're targeting a
1094 version of Markdown without native math support.
1096`--katex`[`=`*URL*]
1098: Use [KaTeX] to display embedded TeX math in HTML output.
1099 The *URL* should point to the `katex.js` load script. If a *URL* is
1100 not provided, a link to the KaTeX CDN will be inserted.
1101 Note: [KaTeX] seems to work best with `html5` output.
1103`--katex-stylesheet=`*URL*
1105: The *URL* should point to the `katex.css` stylesheet. If this option is
1106 not specified, a link to the KaTeX CDN will be inserted. Note that this
1107 option does not imply `--katex`.
1109[MathML]: http://www.w3.org/Math/
1110[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
1111[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
1112[MathJax]: https://www.mathjax.org
1113[gladTeX]: http://ans.hsh.no/home/mgg/gladtex/
1114[mimeTeX]: http://www.forkosh.com/mimetex.html
1115[KaTeX]: https://github.com/Khan/KaTeX
1117Options for wrapper scripts
1118---------------------------
1120`--dump-args`
1122: Print information about command-line arguments to *stdout*, then exit.
1123 This option is intended primarily for use in wrapper scripts.
1124 The first line of output contains the name of the output file specified
1125 with the `-o` option, or `-` (for *stdout*) if no output file was
1126 specified. The remaining lines contain the command-line arguments,
1127 one per line, in the order they appear. These do not include regular
1128 pandoc options and their arguments, but do include any options appearing
1129 after a `--` separator at the end of the line.
1131`--ignore-args`
1133: Ignore command-line arguments (for use in wrapper scripts).
1134 Regular pandoc options are not ignored. Thus, for example,
1136 pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
1138 is equivalent to
1140 pandoc -o foo.html -s
1142Templates
1143=========
1145When the `-s/--standalone` option is used, pandoc uses a template to
1146add header and footer material that is needed for a self-standing
1147document. To see the default template that is used, just type
1149 pandoc -D *FORMAT*
1151where *FORMAT* is the name of the output format. A custom template
1152can be specified using the `--template` option. You can also override
1153the system default templates for a given output format *FORMAT*
1154by putting a file `templates/default.*FORMAT*` in the user data
1155directory (see `--data-dir`, above). *Exceptions:*
1157- For `odt` output, customize the `default.opendocument`
1158 template.
1159- For `pdf` output, customize the `default.latex` template
1160 (or the `default.beamer` template, if you use `-t beamer`,
1161 or the `default.context` template, if you use `-t context`).
1162- `docx` has no template (however, you can use
1163 `--reference-doc` to customize the output).
1165Templates contain *variables*, which allow for the inclusion of
1166arbitrary information at any point in the file. Variables may be set
1167within the document using [YAML metadata blocks][Extension:
1168`yaml_metadata_block`]. They may also be set at the
1169command line using the `-V/--variable` option: variables set in this
1170way override metadata fields with the same name.
1172Variables set by pandoc
1173-----------------------
1175Some variables are set automatically by pandoc. These vary somewhat
1176depending on the output format, but include metadata fields as well
1177as the following:
1179`sourcefile`, `outputfile`
1180: source and destination filenames, as given on the command line.
1181 `sourcefile` can also be a list if input comes from multiple files, or empty
1182 if input is from stdin. You can use the following snippet in your template
1183 to distinguish them:
1185 $if(sourcefile)$
1186 $for(sourcefile)$
1187 $sourcefile$
1188 $endfor$
1189 $else$
1190 (stdin)
1191 $endif$
1193 Similarly, `outputfile` can be `-` if output goes to the terminal.
1195`title`, `author`, `date`
1196: allow identification of basic aspects of the document. Included
1197 in PDF metadata through LaTeX and ConTeXt. These can be set
1198 through a [pandoc title block][Extension: `pandoc_title_block`],
1199 which allows for multiple authors, or through a YAML metadata block:
1201 ---
1202 author:
1203 - Aristotle
1204 - Peter Abelard
1205 ...
1207`subtitle`
1208: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word docx;
1209 renders in LaTeX only when using a document class that supports
1210 `\subtitle`, such as `beamer` or the [KOMA-Script] series (`scrartcl`,
1211 `scrreprt`, `scrbook`).[^subtitle]
1213`institute`
1214: author affiliations (in LaTeX and Beamer only). Can be a
1215 list, when there are multiple authors.
1217`abstract`
1218: document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx
1220`keywords`
1221: list of keywords to be included in HTML, PDF, and AsciiDoc metadata;
1222 may be repeated as for `author`, above
1224`header-includes`
1225: contents specified by `-H/--include-in-header` (may have multiple
1226 values)
1228`toc`
1229: non-null value if `--toc/--table-of-contents` was specified
1231`toc-title`
1232: title of table of contents (works only with EPUB,
1233 opendocument, odt, docx)
1235`include-before`
1236: contents specified by `-B/--include-before-body` (may have
1237 multiple values)
1239`include-after`
1240: contents specified by `-A/--include-after-body` (may have
1241 multiple values)
1243`body`
1244: body of document
1246`meta-json`
1247: JSON representation of all of the document's metadata. Field
1248 values are transformed to the selected output format.
1250[^subtitle]: To make `subtitle` work with other LaTeX
1251 document classes, you can add the following to `header-includes`:
1253 \providecommand{\subtitle}[1]{%
1254 \usepackage{titling}
1255 \posttitle{%
1256 \par\large#1\end{center}}
1259Language variables
1260------------------
1262`lang`
1263: identifies the main language of the document,
1264 using a code according to [BCP 47] (e.g. `en` or `en-GB`).
1265 For some output formats, pandoc will convert it to an appropriate
1266 format stored in the additional variables `babel-lang`,
1267 `polyglossia-lang` (LaTeX) and `context-lang` (ConTeXt).
1269 Native pandoc `span`s and `div`s with the lang attribute
1270 (value in BCP 47) can be used to switch the language in
1271 that range.
1273`otherlangs`
1274: a list of other languages used in the document
1275 in the YAML metadata, according to [BCP 47]. For example:
1276 `otherlangs: [en-GB, fr]`.
1277 This is automatically generated from the `lang` attributes
1278 in all `span`s and `div`s but can be overridden.
1279 Currently only used by LaTeX through the generated
1280 `babel-otherlangs` and `polyglossia-otherlangs` variables.
1281 The LaTeX writer outputs polyglossia commands in the text but
1282 the `babel-newcommands` variable contains mappings for them
1283 to the corresponding babel.
1285`dir`
1286: the base direction of the document, either `rtl` (right-to-left)
1287 or `ltr` (left-to-right).
1289 For bidirectional documents, native pandoc `span`s and `div`s
1290 with the `dir` attribute (value `rtl` or `ltr`) can be used to
1291 override the base direction in some output formats.
1292 This may not always be necessary if the final renderer
1293 (e.g. the browser, when generating HTML) supports the
1294 [Unicode Bidirectional Algorithm].
1296 When using LaTeX for bidirectional documents, only the `xelatex` engine
1297 is fully supported (use `--latex-engine=xelatex`).
1299[BCP 47]: https://tools.ietf.org/html/bcp47
1300[Unicode Bidirectional Algorithm]: http://www.w3.org/International/articles/inline-bidi-markup/uba-basics
1302Variables for slides
1303--------------------
1305Variables are available for [producing slide shows with pandoc],
1306including all [reveal.js configuration options].
1308`titlegraphic`
1309: title graphic for Beamer documents
1311`logo`
1312: logo for Beamer documents
1314`slidy-url`
1315: base URL for Slidy documents (defaults to
1316 `http://www.w3.org/Talks/Tools/Slidy2`)
1318`slideous-url`
1319: base URL for Slideous documents (defaults to `slideous`)
1321`s5-url`
1322: base URL for S5 documents (defaults to `s5/default`)
1324`revealjs-url`
1325: base URL for reveal.js documents (defaults to `reveal.js`)
1327`theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme`
1328: themes for LaTeX [`beamer`] documents
1330`themeoptions`
1331: options for LaTeX beamer themes (a list).
1333`navigation`
1334: controls navigation symbols in `beamer` documents
1335 (default is `empty` for no navigation symbols; other valid values
1336 are `frame`, `vertical`, and `horizontal`).
1338`section-titles`
1339: enables on "title pages" for new sections in `beamer`
1340 documents (default = true).
1342`beamerarticle`
1343: when true, the `beamerarticle` package is loaded (for
1344 producing an article from beamer slides).
1346`colorlinks`
1347: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`,
1348 `urlcolor`, or `toccolor` are set (for beamer only).
1350`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
1351: color for internal links, citation links, external links, and links in table
1352 of contents: uses any of the [predefined LaTeX colors] (for beamer only).
1354`aspectratio`
1355: aspect ratio of slides (for beamer only, `1610` for 16:10, `169` for 16:9,
1356 `149` for 14:9, `141` for 1.41:1, `54` for 5:4, `43` for 4:3 which is the
1357 default, and `32` for 3:2).
1359[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration
1361Variables for LaTeX
1362-------------------
1364LaTeX variables are used when [creating a PDF].
1366`papersize`
1367: paper size, e.g. `letter`, `a4`
1369`fontsize`
1370: font size for body text (e.g. `10pt`, `12pt`)
1372`documentclass`
1373: document class, e.g. [`article`], [`report`], [`book`], [`memoir`]
1375`classoption`
1376: option for document class, e.g. `oneside`; may be repeated
1377 for multiple options
1379`geometry`
1380: option for [`geometry`] package, e.g. `margin=1in`;
1381 may be repeated for multiple options
1383`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
1384: sets margins, if `geometry` is not used (otherwise `geometry`
1385 overrides these)
1387`linestretch`
1388: adjusts line spacing using the [`setspace`]
1389 package, e.g. `1.25`, `1.5`
1391`fontfamily`
1392: font package for use with `pdflatex`:
1393 [TeX Live] includes many options, documented in the [LaTeX Font Catalogue].
1394 The default is [Latin Modern][`lm`].
1396`fontfamilyoptions`
1397: options for package used as `fontfamily`: e.g. `osf,sc` with
1398 `fontfamily` set to [`mathpazo`] provides Palatino with old-style
1399 figures and true small caps; may be repeated for multiple options
1401`mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont`
1402: font families for use with `xelatex` or
1403 `lualatex`: take the name of any system font, using the
1404 [`fontspec`] package. Note that if `CJKmainfont` is used,
1405 the [`xecjk`] package must be available.
1407`mainfontoptions`, `sansfontoptions`, `monofontoptions`, `mathfontoptions`, `CJKoptions`
1408: options to use with `mainfont`, `sansfont`, `monofont`, `mathfont`,
1409 `CJKmainfont` in `xelatex` and `lualatex`. Allow for any choices
1410 available through [`fontspec`], such as the OpenType features
1411 `Numbers=OldStyle,Numbers=Proportional`. May be repeated for multiple options.
1413`fontenc`
1414: allows font encoding to be specified through `fontenc` package (with `pdflatex`);
1415 default is `T1` (see guide to [LaTeX font encodings])
1417`microtypeoptions`
1418: options to pass to the microtype package
1420`colorlinks`
1421: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`,
1422 `urlcolor`, or `toccolor` are set
1424`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
1425: color for internal links, citation links, external links, and links in table of contents:
1426 uses any of the [predefined LaTeX colors]
1428`links-as-notes`
1429: causes links to be printed as footnotes
1431`indent`
1432: uses document class settings for indentation (the default LaTeX template
1433 otherwise removes indentation and adds space between paragraphs)
1435`subparagraph`
1436: disables default behavior of LaTeX template that redefines (sub)paragraphs
1437 as sections, changing the appearance of nested headings in some classes
1439`thanks`
1440: specifies contents of acknowledgments footnote after document title.
1442`toc`
1443: include table of contents (can also be set using `--toc/--table-of-contents`)
1445`toc-depth`
1446: level of section to include in table of contents
1448`secnumdepth`
1449: numbering depth for sections, if sections are numbered
1451`lof`, `lot`
1452: include list of figures, list of tables
1454`bibliography`
1455: bibliography to use for resolving references
1457`biblio-style`
1458: bibliography style, when used with `--natbib` and `--biblatex`.
1460`biblio-title`
1461: bibliography title, when used with `--natbib` and `--biblatex`.
1463`biblatexoptions`
1464: list of options for biblatex.
1466`natbiboptions`
1467: list of options for natbib.
1469[`article`]: https://ctan.org/pkg/article
1470[`report`]: https://ctan.org/pkg/report
1471[`book`]: https://ctan.org/pkg/book
1472[KOMA-Script]: https://ctan.org/pkg/koma-script
1473[`memoir`]: https://ctan.org/pkg/memoir
1474[predefined LaTeX colors]: https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors
1475[LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/
1476[`mathpazo`]: https://ctan.org/pkg/mathpazo
1477[LaTeX font encodings]: https://ctan.org/pkg/encguide
1479Variables for ConTeXt
1480---------------------
1482`papersize`
1483: paper size, e.g. `letter`, `A4`, `landscape` (see [ConTeXt Paper Setup]);
1484 may be repeated for multiple options
1486`layout`
1487: options for page margins and text arrangement (see [ConTeXt Layout]);
1488 may be repeated for multiple options
1490`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
1491: sets margins, if `layout` is not used (otherwise `layout`
1492 overrides these)
1494`fontsize`
1495: font size for body text (e.g. `10pt`, `12pt`)
1497`mainfont`, `sansfont`, `monofont`, `mathfont`
1498: font families: take the name of any system font (see [ConTeXt Font Switching])
1500`linkcolor`, `contrastcolor`
1501: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color])
1503`linkstyle`
1504: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small`
1506`indenting`
1507: controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]);
1508 may be repeated for multiple options
1510`whitespace`
1511: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`])
1513`interlinespace`
1514: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
1515 may be repeated for multiple options
1517`headertext`, `footertext`
1518: text to be placed in running header or footer (see [ConTeXt Headers and Footers]);
1519 may be repeated up to four times for different placement
1521`pagenumbering`
1522: page number style and location (using [`setuppagenumbering`]);
1523 may be repeated for multiple options
1525`toc`
1526: include table of contents (can also be set using `--toc/--table-of-contents`)
1528`lof`, `lot`
1529: include list of figures, list of tables
1531[ConTeXt Paper Setup]: http://wiki.contextgarden.net/PaperSetup
1532[ConTeXt Layout]: http://wiki.contextgarden.net/Layout
1533[ConTeXt Font Switching]: http://wiki.contextgarden.net/Font_Switching
1534[ConTeXt Color]: http://wiki.contextgarden.net/Color
1535[ConTeXt Headers and Footers]: http://wiki.contextgarden.net/Headers_and_Footers
1536[ConTeXt Indentation]: http://wiki.contextgarden.net/Indentation
1537[`setupwhitespace`]: http://wiki.contextgarden.net/Command/setupwhitespace
1538[`setupinterlinespace`]: http://wiki.contextgarden.net/Command/setupinterlinespace
1539[`setuppagenumbering`]: http://wiki.contextgarden.net/Command/setuppagenumbering
1541Variables for man pages
1542-----------------------
1544`section`
1545: section number in man pages
1547`header`
1548: header in man pages
1550`footer`
1551: footer in man pages
1553`adjusting`
1554: adjusts text to left (`l`), right (`r`), center (`c`),
1555 or both (`b`) margins
1557`hyphenate`
1558: if `true` (the default), hyphenation will be used
1560Variables for ms
1561----------------
1563`pointsize`
1564: point size (e.g. `10p`)
1566`lineheight`
1567: line height (e.g. `12p`)
1569`fontfamily`
1570: font family (e.g. `T` or `P`)
1572`indent`
1573: paragraph indent (e.g. `2m`)
1575Using variables in templates
1576----------------------------
1578Variable names are sequences of alphanumerics, `-`, and `_`,
1579starting with a letter. A variable name surrounded by `$` signs
1580will be replaced by its value. For example, the string `$title$` in
1582 <title>$title$</title>
1584will be replaced by the document title.
1586To write a literal `$` in a template, use `$$`.
1588Templates may contain conditionals. The syntax is as follows:
1590 $if(variable)$
1592 $else$
1594 $endif$
1596This will include `X` in the template if `variable` has a non-null
1597value; otherwise it will include `Y`. `X` and `Y` are placeholders for
1598any valid template text, and may include interpolated variables or other
1599conditionals. The `$else$` section may be omitted.
1601When variables can have multiple values (for example, `author` in
1602a multi-author document), you can use the `$for$` keyword:
1604 $for(author)$
1605 <meta name="author" content="$author$" />
1606 $endfor$
1608You can optionally specify a separator to be used between
1609consecutive items:
1611 $for(author)$$author$$sep$, $endfor$
1613A dot can be used to select a field of a variable that takes
1614an object as its value. So, for example:
1616 $author.name$ ($author.affiliation$)
1618If you use custom templates, you may need to revise them as pandoc
1619changes. We recommend tracking the changes in the default templates,
1620and modifying your custom templates accordingly. An easy way to do this
1621is to fork the [pandoc-templates] repository and merge in changes after each
1622pandoc release.
1624[pandoc-templates]: https://github.com/jgm/pandoc-templates
1626Pandoc's Markdown
1627=================
1629Pandoc understands an extended and slightly revised version of
1630John Gruber's [Markdown] syntax. This document explains the syntax,
1631noting differences from standard Markdown. Except where noted, these
1632differences can be suppressed by using the `markdown_strict` format instead
1633of `markdown`. An extensions can be enabled by adding `+EXTENSION`
1634to the format name and disabled by adding `-EXTENSION`. For example,
1635`markdown_strict+footnotes` is strict Markdown with footnotes
1636enabled, while `markdown-footnotes-pipe_tables` is pandoc's
1637Markdown without footnotes or pipe tables.
1639Philosophy
1640----------
1642Markdown is designed to be easy to write, and, even more importantly,
1643easy to read:
1645> A Markdown-formatted document should be publishable as-is, as plain
1646> text, without looking like it's been marked up with tags or formatting
1647> instructions.
1648> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy)
1650This principle has guided pandoc's decisions in finding syntax for
1651tables, footnotes, and other extensions.
1653There is, however, one respect in which pandoc's aims are different
1654from the original aims of Markdown. Whereas Markdown was originally
1655designed with HTML generation in mind, pandoc is designed for multiple
1656output formats. Thus, while pandoc allows the embedding of raw HTML,
1657it discourages it, and provides other, non-HTMLish ways of representing
1658important document elements like definition lists, tables, mathematics, and
1659footnotes.
1661Paragraphs
1662----------
1664A paragraph is one or more lines of text followed by one or more blank lines.
1665Newlines are treated as spaces, so you can reflow your paragraphs as you like.
1666If you need a hard line break, put two or more spaces at the end of a line.
1668#### Extension: `escaped_line_breaks` ####
1670A backslash followed by a newline is also a hard line break.
1671Note: in multiline and grid table cells, this is the only way
1672to create a hard line break, since trailing spaces in the cells
1673are ignored.
1675Headers
1676-------
1678There are two kinds of headers: Setext and ATX.
1680### Setext-style headers ###
1682A setext-style header is a line of text "underlined" with a row of `=` signs
1683(for a level one header) or `-` signs (for a level two header):
1685 A level-one header
1686 ==================
1688 A level-two header
1689 ------------------
1691The header text can contain inline formatting, such as emphasis (see
1692[Inline formatting], below).
1695### ATX-style headers ###
1697An ATX-style header consists of one to six `#` signs and a line of
1698text, optionally followed by any number of `#` signs. The number of
1699`#` signs at the beginning of the line is the header level:
1701 ## A level-two header
1703 ### A level-three header ###
1705As with setext-style headers, the header text can contain formatting:
1707 # A level-one header with a [link](/url) and *emphasis*
1709#### Extension: `blank_before_header` ####
1711Standard Markdown syntax does not require a blank line before a header.
1712Pandoc does require this (except, of course, at the beginning of the
1713document). The reason for the requirement is that it is all too easy for a
1714`#` to end up at the beginning of a line by accident (perhaps through line
1715wrapping). Consider, for example:
1717 I like several of their flavors of ice cream:
1718 #22, for example, and #5.
1720#### Extension: `space_in_atx_header` ####
1722Many Markdown implementations do not require a space between the
1723opening `#`s of an ATX header and the header text, so that
1724`#5 bolt` and `#hashtag` count as headers. With this extension,
1725pandoc does require the space.
1727### Header identifiers ###
1729#### Extension: `header_attributes` ####
1731Headers can be assigned attributes using this syntax at the end
1732of the line containing the header text:
1734 {#identifier .class .class key=value key=value}
1736Thus, for example, the following headers will all be assigned the identifier
1737`foo`:
1739 # My header {#foo}
1741 ## My header ## {#foo}
1743 My other header {#foo}
1744 ---------------
1746(This syntax is compatible with [PHP Markdown Extra].)
1748Note that although this syntax allows assignment of classes and key/value
1749attributes, writers generally don't use all of this information. Identifiers,
1750classes, and key/value attributes are used in HTML and HTML-based formats such
1751as EPUB and slidy. Identifiers are used for labels and link anchors in the
1752LaTeX, ConTeXt, Textile, and AsciiDoc writers.
1754Headers with the class `unnumbered` will not be numbered, even if
1755`--number-sections` is specified. A single hyphen (`-`) in an attribute
1756context is equivalent to `.unnumbered`, and preferable in non-English
1757documents. So,
1759 # My header {-}
1761is just the same as
1763 # My header {.unnumbered}
1765#### Extension: `auto_identifiers` ####
1767A header without an explicitly specified identifier will be
1768automatically assigned a unique identifier based on the header text.
1769To derive the identifier from the header text,
1771 - Remove all formatting, links, etc.
1772 - Remove all footnotes.
1773 - Remove all punctuation, except underscores, hyphens, and periods.
1774 - Replace all spaces and newlines with hyphens.
1775 - Convert all alphabetic characters to lowercase.
1776 - Remove everything up to the first letter (identifiers may
1777 not begin with a number or punctuation mark).
1778 - If nothing is left after this, use the identifier `section`.
1780Thus, for example,
1782 Header Identifier
1783 ------------------------------- ----------------------------
1784 `Header identifiers in HTML` `header-identifiers-in-html`
1785 `*Dogs*?--in *my* house?` `dogs--in-my-house`
1786 `[HTML], [S5], or [RTF]?` `html-s5-or-rtf`
1787 `3. Applications` `applications`
1788 `33` `section`
1790These rules should, in most cases, allow one to determine the identifier
1791from the header text. The exception is when several headers have the
1792same text; in this case, the first will get an identifier as described
1793above; the second will get the same identifier with `-1` appended; the
1794third with `-2`; and so on.
1796These identifiers are used to provide link targets in the table of
1797contents generated by the `--toc|--table-of-contents` option. They
1798also make it easy to provide links from one section of a document to
1799another. A link to this section, for example, might look like this:
1801 See the section on
1802 [header identifiers](#header-identifiers-in-html-latex-and-context).
1804Note, however, that this method of providing links to sections works
1805only in HTML, LaTeX, and ConTeXt formats.
1807If the `--section-divs` option is specified, then each section will
1808be wrapped in a `div` (or a `section`, if `html5` was specified),
1809and the identifier will be attached to the enclosing `<div>`
1810(or `<section>`) tag rather than the header itself. This allows entire
1811sections to be manipulated using JavaScript or treated differently in
1812CSS.
1814#### Extension: `implicit_header_references` ####
1816Pandoc behaves as if reference links have been defined for each header.
1817So, to link to a header
1819 # Header identifiers in HTML
1821you can simply write
1823 [Header identifiers in HTML]
1827 [Header identifiers in HTML][]
1831 [the section on header identifiers][header identifiers in
1832 HTML]
1834instead of giving the identifier explicitly:
1836 [Header identifiers in HTML](#header-identifiers-in-html)
1838If there are multiple headers with identical text, the corresponding
1839reference will link to the first one only, and you will need to use explicit
1840links to link to the others, as described above.
1842Like regular reference links, these references are case-insensitive.
1844Explicit link reference definitions always take priority over
1845implicit header references. So, in the following example, the
1846link will point to `bar`, not to `#foo`:
1848 # Foo
1850 [foo]: bar
1852 See [foo]
1854Block quotations
1855----------------
1857Markdown uses email conventions for quoting blocks of text.
1858A block quotation is one or more paragraphs or other block elements
1859(such as lists or headers), with each line preceded by a `>` character
1860and an optional space. (The `>` need not start at the left margin, but
1861it should not be indented more than three spaces.)
1863 > This is a block quote. This
1864 > paragraph has two lines.
1866 > 1. This is a list inside a block quote.
1867 > 2. Second item.
1869A "lazy" form, which requires the `>` character only on the first
1870line of each block, is also allowed:
1872 > This is a block quote. This
1873 paragraph has two lines.
1875 > 1. This is a list inside a block quote.
1876 2. Second item.
1878Among the block elements that can be contained in a block quote are
1879other block quotes. That is, block quotes can be nested:
1881 > This is a block quote.
1883 > > A block quote within a block quote.
1885If the `>` character is followed by an optional space, that space
1886will be considered part of the block quote marker and not part of
1887the indentation of the contents. Thus, to put an indented code
1888block in a block quote, you need five spaces after the `>`:
1890 > code
1892#### Extension: `blank_before_blockquote` ####
1894Standard Markdown syntax does not require a blank line before a block
1895quote. Pandoc does require this (except, of course, at the beginning of the
1896document). The reason for the requirement is that it is all too easy for a
1897`>` to end up at the beginning of a line by accident (perhaps through line
1898wrapping). So, unless the `markdown_strict` format is used, the following does
1899not produce a nested block quote in pandoc:
1901 > This is a block quote.
1902 >> Nested.
1905Verbatim (code) blocks
1906----------------------
1908### Indented code blocks ###
1910A block of text indented four spaces (or one tab) is treated as verbatim
1911text: that is, special characters do not trigger special formatting,
1912and all spaces and line breaks are preserved. For example,
1914 if (a > 3) {
1915 moveShip(5 * gravity, DOWN);
1918The initial (four space or one tab) indentation is not considered part
1919of the verbatim text, and is removed in the output.
1921Note: blank lines in the verbatim text need not begin with four spaces.
1924### Fenced code blocks ###
1926#### Extension: `fenced_code_blocks` ####
1928In addition to standard indented code blocks, pandoc supports
1929*fenced* code blocks. These begin with a row of three or more
1930tildes (`~`) and end with a row of tildes that must be at least as long as
1931the starting row. Everything between these lines is treated as code. No
1932indentation is necessary:
1934 ~~~~~~~
1935 if (a > 3) {
1936 moveShip(5 * gravity, DOWN);
1938 ~~~~~~~
1940Like regular code blocks, fenced code blocks must be separated
1941from surrounding text by blank lines.
1943If the code itself contains a row of tildes or backticks, just use a longer
1944row of tildes or backticks at the start and end:
1946 ~~~~~~~~~~~~~~~~
1947 ~~~~~~~~~~
1948 code including tildes
1949 ~~~~~~~~~~
1950 ~~~~~~~~~~~~~~~~
1952#### Extension: `backtick_code_blocks` ####
1954Same as `fenced_code_blocks`, but uses backticks (`` ` ``) instead of tildes
1955(`~`).
1957#### Extension: `fenced_code_attributes` ####
1959Optionally, you may attach attributes to fenced or backtick code block using
1960this syntax:
1962 ~~~~ {#mycode .haskell .numberLines startFrom="100"}
1963 qsort [] = []
1964 qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
1965 qsort (filter (>= x) xs)
1966 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1968Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
1969`startFrom` is an attribute with value `100`. Some output formats can use this
1970information to do syntax highlighting. Currently, the only output formats
1971that uses this information are HTML, LaTeX, Docx, and Ms. If highlighting
1972is supported for your output format and language, then the code block above
1973will appear highlighted, with numbered lines. (To see which languages are
1974supported, type `pandoc --list-highlight-languages`.) Otherwise, the code
1975block above will appear as follows:
1977 <pre id="mycode" class="haskell numberLines" startFrom="100">
1978 <code>
1979 ...
1980 </code>
1981 </pre>
1983A shortcut form can also be used for specifying the language of
1984the code block:
1986 ```haskell
1987 qsort [] = []
1988 ```
1990This is equivalent to:
1992 ``` {.haskell}
1993 qsort [] = []
1994 ```
1996If the `fenced_code_attributes` extension is disabled, but
1997input contains class attribute(s) for the code block, the first
1998class attribute will be printed after the opening fence as a bare
1999word.
2001To prevent all highlighting, use the `--no-highlight` flag.
2002To set the highlighting style, use `--highlight-style`.
2003For more information on highlighting, see [Syntax highlighting],
2004below.
2006Line blocks
2007-----------
2009#### Extension: `line_blocks` ####
2011A line block is a sequence of lines beginning with a vertical bar (`|`)
2012followed by a space. The division into lines will be preserved in
2013the output, as will any leading spaces; otherwise, the lines will
2014be formatted as Markdown. This is useful for verse and addresses:
2016 | The limerick packs laughs anatomical
2017 | In space that is quite economical.
2018 | But the good ones I've seen
2019 | So seldom are clean
2020 | And the clean ones so seldom are comical
2022 | 200 Main St.
2023 | Berkeley, CA 94718
2025The lines can be hard-wrapped if needed, but the continuation
2026line must begin with a space.
2028 | The Right Honorable Most Venerable and Righteous Samuel L.
2029 Constable, Jr.
2030 | 200 Main St.
2031 | Berkeley, CA 94718
2033This syntax is borrowed from [reStructuredText].
2035Lists
2036-----
2038### Bullet lists ###
2040A bullet list is a list of bulleted list items. A bulleted list
2041item begins with a bullet (`*`, `+`, or `-`). Here is a simple
2042example:
2044 * one
2045 * two
2046 * three
2048This will produce a "compact" list. If you want a "loose" list, in which
2049each item is formatted as a paragraph, put spaces between the items:
2051 * one
2053 * two
2055 * three
2057The bullets need not be flush with the left margin; they may be
2058indented one, two, or three spaces. The bullet must be followed
2059by whitespace.
2061List items look best if subsequent lines are flush with the first
2062line (after the bullet):
2064 * here is my first
2065 list item.
2066 * and my second.
2068But Markdown also allows a "lazy" format:
2070 * here is my first
2071 list item.
2072 * and my second.
2074### The four-space rule ###
2076A list item may contain multiple paragraphs and other block-level
2077content. However, subsequent paragraphs must be preceded by a blank line
2078and indented four spaces or a tab. The list will look better if the first
2079paragraph is aligned with the rest:
2081 * First paragraph.
2083 Continued.
2085 * Second paragraph. With a code block, which must be indented
2086 eight spaces:
2088 { code }
2090List items may include other lists. In this case the preceding blank
2091line is optional. The nested list must be indented four spaces or
2092one tab:
2094 * fruits
2095 + apples
2096 - macintosh
2097 - red delicious
2098 + pears
2099 + peaches
2100 * vegetables
2101 + broccoli
2102 + chard
2104As noted above, Markdown allows you to write list items "lazily," instead of
2105indenting continuation lines. However, if there are multiple paragraphs or
2106other blocks in a list item, the first line of each must be indented.
2108 + A lazy, lazy, list
2109 item.
2111 + Another one; this looks
2112 bad but is legal.
2114 Second paragraph of second
2115 list item.
2117**Note:** Although the four-space rule for continuation paragraphs
2118comes from the official [Markdown syntax guide], the reference implementation,
2119`Markdown.pl`, does not follow it. So pandoc will give different results than
2120`Markdown.pl` when authors have indented continuation paragraphs fewer than
2121four spaces.
2123The [Markdown syntax guide] is not explicit whether the four-space
2124rule applies to *all* block-level content in a list item; it only
2125mentions paragraphs and code blocks. But it implies that the rule
2126applies to all block-level content (including nested lists), and
2127pandoc interprets it that way.
2129 [Markdown syntax guide]:
2130 http://daringfireball.net/projects/markdown/syntax#list
2132### Ordered lists ###
2134Ordered lists work just like bulleted lists, except that the items
2135begin with enumerators rather than bullets.
2137In standard Markdown, enumerators are decimal numbers followed
2138by a period and a space. The numbers themselves are ignored, so
2139there is no difference between this list:
2141 1. one
2142 2. two
2143 3. three
2145and this one:
2147 5. one
2148 7. two
2149 1. three
2151#### Extension: `fancy_lists` ####
2153Unlike standard Markdown, pandoc allows ordered list items to be marked
2154with uppercase and lowercase letters and roman numerals, in addition to
2155Arabic numerals. List markers may be enclosed in parentheses or followed by a
2156single right-parentheses or period. They must be separated from the
2157text that follows by at least one space, and, if the list marker is a
2158capital letter with a period, by at least two spaces.[^2]
2160[^2]: The point of this rule is to ensure that normal paragraphs
2161 starting with people's initials, like
2163 B. Russell was an English philosopher.
2165 do not get treated as list items.
2167 This rule will not prevent
2169 (C) 2007 Joe Smith
2171 from being interpreted as a list item. In this case, a backslash
2172 escape can be used:
2174 (C\) 2007 Joe Smith
2176The `fancy_lists` extension also allows '`#`' to be used as an
2177ordered list marker in place of a numeral:
2179 #. one
2180 #. two
2182#### Extension: `startnum` ####
2184Pandoc also pays attention to the type of list marker used, and to the
2185starting number, and both of these are preserved where possible in the
2186output format. Thus, the following yields a list with numbers followed
2187by a single parenthesis, starting with 9, and a sublist with lowercase
2188roman numerals:
2190 9) Ninth
2191 10) Tenth
2192 11) Eleventh
2193 i. subone
2194 ii. subtwo
2195 iii. subthree
2197Pandoc will start a new list each time a different type of list
2198marker is used. So, the following will create three lists:
2200 (2) Two
2201 (5) Three
2202 1. Four
2203 * Five
2205If default list markers are desired, use `#.`:
2207 #. one
2208 #. two
2209 #. three
2212### Definition lists ###
2214#### Extension: `definition_lists` ####
2216Pandoc supports definition lists, using the syntax of
2217[PHP Markdown Extra] with some extensions.[^3]
2219 Term 1
2221 : Definition 1
2223 Term 2 with *inline markup*
2225 : Definition 2
2227 { some code, part of Definition 2 }
2229 Third paragraph of definition 2.
2231Each term must fit on one line, which may optionally be followed by
2232a blank line, and must be followed by one or more definitions.
2233A definition begins with a colon or tilde, which may be indented one
2234or two spaces.
2236A term may have multiple definitions, and each definition may consist of one or
2237more block elements (paragraph, code block, list, etc.), each indented four
2238spaces or one tab stop. The body of the definition (including the first line,
2239aside from the colon or tilde) should be indented four spaces. However,
2240as with other Markdown lists, you can "lazily" omit indentation except
2241at the beginning of a paragraph or other block element:
2243 Term 1
2245 : Definition
2246 with lazy continuation.
2248 Second paragraph of the definition.
2250If you leave space before the definition (as in the example above),
2251the text of the definition will be treated as a paragraph. In some
2252output formats, this will mean greater spacing between term/definition
2253pairs. For a more compact definition list, omit the space before the
2254definition:
2256 Term 1
2257 ~ Definition 1
2259 Term 2
2260 ~ Definition 2a
2261 ~ Definition 2b
2263Note that space between items in a definition list is required.
2264(A variant that loosens this requirement, but disallows "lazy"
2265hard wrapping, can be activated with `compact_definition_lists`: see
2266[Non-pandoc extensions], below.)
2268[^3]: I have been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html).
2270### Numbered example lists ###
2272#### Extension: `example_lists` ####
2274The special list marker `@` can be used for sequentially numbered
2275examples. The first list item with a `@` marker will be numbered '1',
2276the next '2', and so on, throughout the document. The numbered examples
2277need not occur in a single list; each new list using `@` will take up
2278where the last stopped. So, for example:
2280 (@) My first example will be numbered (1).
2281 (@) My second example will be numbered (2).
2283 Explanation of examples.
2285 (@) My third example will be numbered (3).
2287Numbered examples can be labeled and referred to elsewhere in the
2288document:
2290 (@good) This is a good example.
2292 As (@good) illustrates, ...
2294The label can be any string of alphanumeric characters, underscores,
2295or hyphens.
2298### Compact and loose lists ###
2300Pandoc behaves differently from `Markdown.pl` on some "edge
2301cases" involving lists. Consider this source:
2303 + First
2304 + Second:
2305 - Fee
2306 - Fie
2307 - Foe
2309 + Third
2311Pandoc transforms this into a "compact list" (with no `<p>` tags around
2312"First", "Second", or "Third"), while Markdown puts `<p>` tags around
2313"Second" and "Third" (but not "First"), because of the blank space
2314around "Third". Pandoc follows a simple rule: if the text is followed by
2315a blank line, it is treated as a paragraph. Since "Second" is followed
2316by a list, and not a blank line, it isn't treated as a paragraph. The
2317fact that the list is followed by a blank line is irrelevant. (Note:
2318Pandoc works this way even when the `markdown_strict` format is specified. This
2319behavior is consistent with the official Markdown syntax description,
2320even though it is different from that of `Markdown.pl`.)
2323### Ending a list ###
2325What if you want to put an indented code block after a list?
2327 - item one
2328 - item two
2330 { my code block }
2332Trouble! Here pandoc (like other Markdown implementations) will treat
2333`{ my code block }` as the second paragraph of item two, and not as
2334a code block.
2336To "cut off" the list after item two, you can insert some non-indented
2337content, like an HTML comment, which won't produce visible output in
2338any format:
2340 - item one
2341 - item two
2343 <!-- end of list -->
2345 { my code block }
2347You can use the same trick if you want two consecutive lists instead
2348of one big list:
2350 1. one
2351 2. two
2352 3. three
2354 <!-- -->
2356 1. uno
2357 2. dos
2358 3. tres
2360Horizontal rules
2361----------------
2363A line containing a row of three or more `*`, `-`, or `_` characters
2364(optionally separated by spaces) produces a horizontal rule:
2366 * * * *
2368 ---------------
2371Tables
2372------
2374Four kinds of tables may be used. The first three kinds presuppose the use of
2375a fixed-width font, such as Courier. The fourth kind can be used with
2376proportionally spaced fonts, as it does not require lining up columns.
2378#### Extension: `table_captions` ####
2380A caption may optionally be provided with all 4 kinds of tables (as
2381illustrated in the examples below). A caption is a paragraph beginning
2382with the string `Table:` (or just `:`), which will be stripped off.
2383It may appear either before or after the table.
2385#### Extension: `simple_tables` ####
2387Simple tables look like this:
2389 Right Left Center Default
2390 ------- ------ ---------- -------
2391 12 12 12 12
2392 123 123 123 123
2393 1 1 1 1
2395 Table: Demonstration of simple table syntax.
2397The headers and table rows must each fit on one line. Column
2398alignments are determined by the position of the header text relative
2399to the dashed line below it:[^4]
2401 - If the dashed line is flush with the header text on the right side
2402 but extends beyond it on the left, the column is right-aligned.
2403 - If the dashed line is flush with the header text on the left side
2404 but extends beyond it on the right, the column is left-aligned.
2405 - If the dashed line extends beyond the header text on both sides,
2406 the column is centered.
2407 - If the dashed line is flush with the header text on both sides,
2408 the default alignment is used (in most cases, this will be left).
2410[^4]: This scheme is due to Michel Fortin, who proposed it on the
2411 [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
2413The table must end with a blank line, or a line of dashes followed by
2414a blank line.
2416The column headers may be omitted, provided a dashed line is used
2417to end the table. For example:
2419 ------- ------ ---------- -------
2420 12 12 12 12
2421 123 123 123 123
2422 1 1 1 1
2423 ------- ------ ---------- -------
2425When headers are omitted, column alignments are determined on the basis
2426of the first line of the table body. So, in the tables above, the columns
2427would be right, left, center, and right aligned, respectively.
2429#### Extension: `multiline_tables` ####
2431Multiline tables allow headers and table rows to span multiple lines
2432of text (but cells that span multiple columns or rows of the table are
2433not supported). Here is an example:
2435 -------------------------------------------------------------
2436 Centered Default Right Left
2437 Header Aligned Aligned Aligned
2438 ----------- ------- --------------- -------------------------
2439 First row 12.0 Example of a row that
2440 spans multiple lines.
2442 Second row 5.0 Here's another one. Note
2443 the blank line between
2444 rows.
2445 -------------------------------------------------------------
2447 Table: Here's the caption. It, too, may span
2448 multiple lines.
2450These work like simple tables, but with the following differences:
2452 - They must begin with a row of dashes, before the header text
2453 (unless the headers are omitted).
2454 - They must end with a row of dashes, then a blank line.
2455 - The rows must be separated by blank lines.
2457In multiline tables, the table parser pays attention to the widths of
2458the columns, and the writers try to reproduce these relative widths in
2459the output. So, if you find that one of the columns is too narrow in the
2460output, try widening it in the Markdown source.
2462Headers may be omitted in multiline tables as well as simple tables:
2464 ----------- ------- --------------- -------------------------
2465 First row 12.0 Example of a row that
2466 spans multiple lines.
2468 Second row 5.0 Here's another one. Note
2469 the blank line between
2470 rows.
2471 ----------- ------- --------------- -------------------------
2473 : Here's a multiline table without headers.
2475It is possible for a multiline table to have just one row, but the row
2476should be followed by a blank line (and then the row of dashes that ends
2477the table), or the table may be interpreted as a simple table.
2479#### Extension: `grid_tables` ####
2481Grid tables look like this:
2483 : Sample grid table.
2485 +---------------+---------------+--------------------+
2486 | Fruit | Price | Advantages |
2487 +===============+===============+====================+
2488 | Bananas | $1.34 | - built-in wrapper |
2489 | | | - bright color |
2490 +---------------+---------------+--------------------+
2491 | Oranges | $2.10 | - cures scurvy |
2492 | | | - tasty |
2493 +---------------+---------------+--------------------+
2495The row of `=`s separates the header from the table body, and can be
2496omitted for a headerless table. The cells of grid tables may contain
2497arbitrary block elements (multiple paragraphs, code blocks, lists,
2498etc.). Cells that span multiple columns or rows are not
2499supported. Grid tables can be created easily using [Emacs table mode].
2501[Emacs table mode]: http://table.sourceforge.net/
2503Alignments can be specified as with pipe tables, by putting
2504colons at the boundaries of the separator line after the
2505header:
2507 +---------------+---------------+--------------------+
2508 | Right | Left | Centered |
2509 +==============:+:==============+:==================:+
2510 | Bananas | $1.34 | built-in wrapper |
2511 +---------------+---------------+--------------------+
2513For headerless tables, the colons go on the top line instead:
2515 +--------------:+:--------------+:------------------:+
2516 | Right | Left | Centered |
2517 +---------------+---------------+--------------------+
2520#### Extension: `pipe_tables` ####
2522Pipe tables look like this:
2524 | Right | Left | Default | Center |
2525 |------:|:-----|---------|:------:|
2526 | 12 | 12 | 12 | 12 |
2527 | 123 | 123 | 123 | 123 |
2528 | 1 | 1 | 1 | 1 |
2530 : Demonstration of pipe table syntax.
2532The syntax is identical to [PHP Markdown Extra tables]. The beginning and
2533ending pipe characters are optional, but pipes are required between all
2534columns. The colons indicate column alignment as shown. The header
2535cannot be omitted. To simulate a headerless table, include a header
2536with blank cells.
2538Since the pipes indicate column boundaries, columns need not be vertically
2539aligned, as they are in the above example. So, this is a perfectly
2540legal (though ugly) pipe table:
2542 fruit| price
2543 -----|-----:
2544 apple|2.05
2545 pear|1.37
2546 orange|3.09
2548The cells of pipe tables cannot contain block elements like paragraphs
2549and lists, and cannot span multiple lines. If a pipe table contains a
2550row whose printable content is wider than the column width (see
2551`--columns`), then the cell contents will wrap, with the
2552relative cell widths determined by the widths of the separator
2553lines.
2555Note: pandoc also recognizes pipe tables of the following
2556form, as can be produced by Emacs' orgtbl-mode:
2558 | One | Two |
2559 |-----+-------|
2560 | my | table |
2561 | is | nice |
2563The difference is that `+` is used instead of `|`. Other orgtbl features
2564are not supported. In particular, to get non-default column alignment,
2565you'll need to add colons as above.
2567[PHP Markdown Extra tables]: https://michelf.ca/projects/php-markdown/extra/#table
2569Metadata blocks
2570---------------
2572#### Extension: `pandoc_title_block` ####
2574If the file begins with a title block
2576 % title
2577 % author(s) (separated by semicolons)
2578 % date
2580it will be parsed as bibliographic information, not regular text. (It
2581will be used, for example, in the title of standalone LaTeX or HTML
2582output.) The block may contain just a title, a title and an author,
2583or all three elements. If you want to include an author but no
2584title, or a title and a date but no author, you need a blank line:
2587 % Author
2589 % My title
2591 % June 15, 2006
2593The title may occupy multiple lines, but continuation lines must
2594begin with leading space, thus:
2596 % My title
2597 on multiple lines
2599If a document has multiple authors, the authors may be put on
2600separate lines with leading space, or separated by semicolons, or
2601both. So, all of the following are equivalent:
2603 % Author One
2604 Author Two
2606 % Author One; Author Two
2608 % Author One;
2609 Author Two
2611The date must fit on one line.
2613All three metadata fields may contain standard inline formatting
2614(italics, links, footnotes, etc.).
2616Title blocks will always be parsed, but they will affect the output only
2617when the `--standalone` (`-s`) option is chosen. In HTML output, titles
2618will appear twice: once in the document head -- this is the title that
2619will appear at the top of the window in a browser -- and once at the
2620beginning of the document body. The title in the document head can have
2621an optional prefix attached (`--title-prefix` or `-T` option). The title
2622in the body appears as an H1 element with class "title", so it can be
2623suppressed or reformatted with CSS. If a title prefix is specified with
2624`-T` and no title block appears in the document, the title prefix will
2625be used by itself as the HTML title.
2627The man page writer extracts a title, man page section number, and
2628other header and footer information from the title line. The title
2629is assumed to be the first word on the title line, which may optionally
2630end with a (single-digit) section number in parentheses. (There should
2631be no space between the title and the parentheses.) Anything after
2632this is assumed to be additional footer and header text. A single pipe
2633character (`|`) should be used to separate the footer text from the header
2634text. Thus,
2636 % PANDOC(1)
2638will yield a man page with the title `PANDOC` and section 1.
2640 % PANDOC(1) Pandoc User Manuals
2642will also have "Pandoc User Manuals" in the footer.
2644 % PANDOC(1) Pandoc User Manuals | Version 4.0
2646will also have "Version 4.0" in the header.
2648#### Extension: `yaml_metadata_block` ####
2650A YAML metadata block is a valid YAML object, delimited by a line of three
2651hyphens (`---`) at the top and a line of three hyphens (`---`) or three dots
2652(`...`) at the bottom. A YAML metadata block may occur anywhere in the
2653document, but if it is not at the beginning, it must be preceded by a blank
2654line. (Note that, because of the way pandoc concatenates input files when
2655several are provided, you may also keep the metadata in a separate YAML file
2656and pass it to pandoc as an argument, along with your Markdown files:
2658 pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html
2660Just be sure that the YAML file begins with `---` and ends with `---` or
2661`...`.)
2663Metadata will be taken from the fields of the YAML object and added to any
2664existing document metadata. Metadata can contain lists and objects (nested
2665arbitrarily), but all string scalars will be interpreted as Markdown. Fields
2666with names ending in an underscore will be ignored by pandoc. (They may be
2667given a role by external processors.)
2669A document may contain multiple metadata blocks. The metadata fields will
2670be combined through a *left-biased union*: if two metadata blocks attempt
2671to set the same field, the value from the first block will be taken.
2673When pandoc is used with `-t markdown` to create a Markdown document,
2674a YAML metadata block will be produced only if the `-s/--standalone`
2675option is used. All of the metadata will appear in a single block
2676at the beginning of the document.
2678Note that YAML escaping rules must be followed. Thus, for example,
2679if a title contains a colon, it must be quoted. The pipe character
2680(`|`) can be used to begin an indented block that will be interpreted
2681literally, without need for escaping. This form is necessary
2682when the field contains blank lines or block-level formatting:
2684 ---
2685 title: 'This is the title: it contains a colon'
2686 author:
2687 - Author One
2688 - Author Two
2689 tags: [nothing, nothingness]
2690 abstract: |
2691 This is the abstract.
2693 It consists of two paragraphs.
2694 ...
2696Template variables will be set automatically from the metadata. Thus, for
2697example, in writing HTML, the variable `abstract` will be set to the HTML
2698equivalent of the Markdown in the `abstract` field:
2700 <p>This is the abstract.</p>
2701 <p>It consists of two paragraphs.</p>
2703Variables can contain arbitrary YAML structures, but the template must match
2704this structure. The `author` variable in the default templates expects a
2705simple list or string, but can be changed to support more complicated
2706structures. The following combination, for example, would add an affiliation
2707to the author if one is given:
2709 ---
2710 title: The document title
2711 author:
2712 - name: Author One
2713 affiliation: University of Somewhere
2714 - name: Author Two
2715 affiliation: University of Nowhere
2716 ...
2718To use the structured authors in the example above, you would need a custom
2719template:
2721 $for(author)$
2722 $if(author.name)$
2723 $author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$
2724 $else$
2725 $author$
2726 $endif$
2727 $endfor$
2730Backslash escapes
2731-----------------
2733#### Extension: `all_symbols_escapable` ####
2735Except inside a code block or inline code, any punctuation or space
2736character preceded by a backslash will be treated literally, even if it
2737would normally indicate formatting. Thus, for example, if one writes
2739 *\*hello\**
2741one will get
2743 <em>*hello*</em>
2745instead of
2747 <strong>hello</strong>
2749This rule is easier to remember than standard Markdown's rule,
2750which allows only the following characters to be backslash-escaped:
2752 \`*_{}[]()>#+-.!
2754(However, if the `markdown_strict` format is used, the standard Markdown rule
2755will be used.)
2757A backslash-escaped space is parsed as a nonbreaking space. It will
2758appear in TeX output as `~` and in HTML and XML as `\&#160;` or
2759`\&nbsp;`.
2761A backslash-escaped newline (i.e. a backslash occurring at the end of
2762a line) is parsed as a hard line break. It will appear in TeX output as
2763`\\` and in HTML as `<br />`. This is a nice alternative to
2764Markdown's "invisible" way of indicating hard line breaks using
2765two trailing spaces on a line.
2767Backslash escapes do not work in verbatim contexts.
2769Inline formatting
2770-----------------
2772### Emphasis ###
2774To *emphasize* some text, surround it with `*`s or `_`, like this:
2776 This text is _emphasized with underscores_, and this
2777 is *emphasized with asterisks*.
2779Double `*` or `_` produces **strong emphasis**:
2781 This is **strong emphasis** and __with underscores__.
2783A `*` or `_` character surrounded by spaces, or backslash-escaped,
2784will not trigger emphasis:
2786 This is * not emphasized *, and \*neither is this\*.
2788#### Extension: `intraword_underscores` ####
2790Because `_` is sometimes used inside words and identifiers,
2791pandoc does not interpret a `_` surrounded by alphanumeric
2792characters as an emphasis marker. If you want to emphasize
2793just part of a word, use `*`:
2795 feas*ible*, not feas*able*.
2798### Strikeout ###
2800#### Extension: `strikeout` ####
2802To strikeout a section of text with a horizontal line, begin and end it
2803with `~~`. Thus, for example,
2805 This ~~is deleted text.~~
2808### Superscripts and subscripts ###
2810#### Extension: `superscript`, `subscript` ####
2812Superscripts may be written by surrounding the superscripted text by `^`
2813characters; subscripts may be written by surrounding the subscripted
2814text by `~` characters. Thus, for example,
2816 H~2~O is a liquid. 2^10^ is 1024.
2818If the superscripted or subscripted text contains spaces, these spaces
2819must be escaped with backslashes. (This is to prevent accidental
2820superscripting and subscripting through the ordinary use of `~` and `^`.)
2821Thus, if you want the letter P with 'a cat' in subscripts, use
2822`P~a\ cat~`, not `P~a cat~`.
2825### Verbatim ###
2827To make a short span of text verbatim, put it inside backticks:
2829 What is the difference between `>>=` and `>>`?
2831If the verbatim text includes a backtick, use double backticks:
2833 Here is a literal backtick `` ` ``.
2835(The spaces after the opening backticks and before the closing
2836backticks will be ignored.)
2838The general rule is that a verbatim span starts with a string
2839of consecutive backticks (optionally followed by a space)
2840and ends with a string of the same number of backticks (optionally
2841preceded by a space).
2843Note that backslash-escapes (and other Markdown constructs) do not
2844work in verbatim contexts:
2846 This is a backslash followed by an asterisk: `\*`.
2848#### Extension: `inline_code_attributes` ####
2850Attributes can be attached to verbatim text, just as with
2851[fenced code blocks]:
2853 `<$>`{.haskell}
2855### Small caps ###
2857To write small caps, you can use an HTML span tag:
2859 <span style="font-variant:small-caps;">Small caps</span>
2861(The semicolon is optional and there may be space after the
2862colon.) This will work in all output formats that support small caps.
2864Alternatively, you can also use the new `bracketed_spans` syntax:
2866 [Small caps]{style="font-variant:small-caps;"}
2868Math
2869----
2871#### Extension: `tex_math_dollars` ####
2873Anything between two `$` characters will be treated as TeX math. The
2874opening `$` must have a non-space character immediately to its right,
2875while the closing `$` must have a non-space character immediately to its
2876left, and must not be followed immediately by a digit. Thus,
2877`$20,000 and $30,000` won't parse as math. If for some reason
2878you need to enclose text in literal `$` characters, backslash-escape
2879them and they won't be treated as math delimiters.
2881TeX math will be printed in all output formats. How it is rendered
2882depends on the output format:
2884Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWiki
2885 ~ It will appear verbatim between `$` characters.
2887reStructuredText
2888 ~ It will be rendered using an [interpreted text role `:math:`].
2890AsciiDoc
2891 ~ It will be rendered as `latexmath:[...]`.
2893Texinfo
2894 ~ It will be rendered inside a `@math` command.
2896groff man
2897 ~ It will be rendered verbatim without `$`'s.
2899MediaWiki, DokuWiki
2900 ~ It will be rendered inside `<math>` tags.
2902Textile
2903 ~ It will be rendered inside `<span class="math">` tags.
2905RTF, OpenDocument
2906 ~ It will be rendered, if possible, using Unicode characters,
2907 and will otherwise appear verbatim.
2909ODT
2910 ~ It will be rendered, if possible, using MathML.
2912DocBook
2913 ~ If the `--mathml` flag is used, it will be rendered using MathML
2914 in an `inlineequation` or `informalequation` tag. Otherwise it
2915 will be rendered, if possible, using Unicode characters.
2917Docx
2918 ~ It will be rendered using OMML math markup.
2920FictionBook2
2921 ~ If the `--webtex` option is used, formulas are rendered as images
2922 using CodeCogs or other compatible web service, downloaded
2923 and embedded in the e-book. Otherwise, they will appear verbatim.
2925HTML, Slidy, DZSlides, S5, EPUB
2926 ~ The way math is rendered in HTML will depend on the
2927 command-line options selected:
2929 1. The default is to render TeX math as far as possible using Unicode
2930 characters, as with RTF, DocBook, and OpenDocument output. Formulas
2931 are put inside a `span` with `class="math"`, so that they may be
2932 styled differently from the surrounding text if needed.
2934 2. If the `--latexmathml` option is used, TeX math will be displayed
2935 between `$` or `$$` characters and put in `<span>` tags with class `LaTeX`.
2936 The [LaTeXMathML] script will be used to render it as formulas.
2937 (This trick does not work in all browsers, but it works in Firefox.
2938 In browsers that do not support LaTeXMathML, TeX math will appear
2939 verbatim between `$` characters.)
2941 3. If the `--jsmath` option is used, TeX math will be put inside
2942 `<span>` tags (for inline math) or `<div>` tags (for display math)
2943 with class `math`. The [jsMath] script will be used to render
2944 it.
2946 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
2947 be called to generate images for each TeX formula. This should
2948 work in all browsers. The `--mimetex` option takes an optional URL
2949 as argument. If no URL is specified, it will be assumed that the
2950 mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
2952 5. If the `--gladtex` option is used, TeX formulas will be enclosed
2953 in `<eq>` tags in the HTML output. The resulting `htex` file may then
2954 be processed by [gladTeX], which will produce image files for each
2955 formula and an HTML file with links to these images. So, the
2956 procedure is:
2958 pandoc -s --gladtex myfile.txt -o myfile.htex
2959 gladtex -d myfile-images myfile.htex
2960 # produces myfile.html and images in myfile-images
2962 6. If the `--webtex` option is used, TeX formulas will be converted
2963 to `<img>` tags that link to an external script that converts
2964 formulas to images. The formula will be URL-encoded and concatenated
2965 with the URL provided. For SVG images you can for example use
2966 `--webtex https://latex.codecogs.com/svg.latex?`.
2967 If no URL is specified, the CodeCogs URL generating PNGs
2968 will be used (`https://latex.codecogs.com/png.latex?`).
2970 7. If the `--mathjax` option is used, TeX math will be displayed
2971 between `\(...\)` (for inline math) or `\[...\]` (for display
2972 math) and put in `<span>` tags with class `math`.
2973 The [MathJax] script will be used to render it as formulas.
2975[interpreted text role `:math:`]: http://docutils.sourceforge.net/docs/ref/rst/roles.html#math
2977Raw HTML
2978--------
2980#### Extension: `raw_html` ####
2982Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
2983(except verbatim contexts, where `<`, `>`, and `&` are interpreted
2984literally). (Technically this is not an extension, since standard
2985Markdown allows it, but it has been made an extension so that it can
2986be disabled if desired.)
2988The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
2989DZSlides, EPUB, Markdown, Emacs Org mode, and Textile output, and suppressed
2990in other formats.
2992#### Extension: `markdown_in_html_blocks` ####
2994Standard Markdown allows you to include HTML "blocks": blocks
2995of HTML between balanced tags that are separated from the surrounding text
2996with blank lines, and start and end at the left margin. Within
2997these blocks, everything is interpreted as HTML, not Markdown;
2998so (for example), `*` does not signify emphasis.
3000Pandoc behaves this way when the `markdown_strict` format is used; but
3001by default, pandoc interprets material between HTML block tags as Markdown.
3002Thus, for example, pandoc will turn
3004 <table>
3005 <tr>
3006 <td>*one*</td>
3007 <td>[a link](http://google.com)</td>
3008 </tr>
3009 </table>
3011into
3013 <table>
3014 <tr>
3015 <td><em>one</em></td>
3016 <td><a href="http://google.com">a link</a></td>
3017 </tr>
3018 </table>
3020whereas `Markdown.pl` will preserve it as is.
3022There is one exception to this rule: text between `<script>` and
3023`<style>` tags is not interpreted as Markdown.
3025This departure from standard Markdown should make it easier to mix
3026Markdown with HTML block elements. For example, one can surround
3027a block of Markdown text with `<div>` tags without preventing it
3028from being interpreted as Markdown.
3030#### Extension: `native_divs` ####
3032Use native pandoc `Div` blocks for content inside `<div>` tags.
3033For the most part this should give the same output as
3034`markdown_in_html_blocks`, but it makes it easier to write pandoc
3035filters to manipulate groups of blocks.
3037#### Extension: `native_spans` ####
3039Use native pandoc `Span` blocks for content inside `<span>` tags.
3040For the most part this should give the same output as `raw_html`,
3041but it makes it easier to write pandoc filters to manipulate groups
3042of inlines.
3044#### Extension: `raw_tex` ####
3046In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
3047included in a document. Inline TeX commands will be preserved and passed
3048unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
3049LaTeX to include BibTeX citations:
3051 This result was proved in \cite{jones.1967}.
3053Note that in LaTeX environments, like
3055 \begin{tabular}{|l|l|}\hline
3056 Age & Frequency \\ \hline
3057 18--25 & 15 \\
3058 26--35 & 33 \\
3059 36--45 & 22 \\ \hline
3060 \end{tabular}
3062the material between the begin and end tags will be interpreted as raw
3063LaTeX, not as Markdown.
3065Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
3066Emacs Org mode, and ConTeXt.
3068### Generic raw attribute ###
3070#### Extension: `raw_attribute` ####
3072Inline spans and fenced code blocks with a special
3073kind of attribute will be parsed as raw content with the
3074designated format. For example, the following produces a raw
3075groff `ms` block:
3077 ```{=ms}
3078 .MYMACRO
3079 blah blah
3080 ```
3081And the following produces a raw `html` inline element:
3083 This is `<a>html</a>`{=html}
3085The format name should match the target format name (see
3086`-t/--to`, above, for a list, or use `pandoc
3087--list-output-formats`).
3089This extension presupposes that the relevant kind of
3090inline code or fenced code block is enabled. Thus, for
3091example, to use a raw attribute with a backtick code block,
3092`backtick_code_blocks` must be enabled.
3094The raw attribute cannot be combined with regular attributes.
3096LaTeX macros
3097------------
3099#### Extension: `latex_macros` ####
3101For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
3102`\renewcommand` definitions and apply the resulting macros to all LaTeX
3103math. So, for example, the following will work in all output formats,
3104not just LaTeX:
3106 \newcommand{\tuple}[1]{\langle #1 \rangle}
3108 $\tuple{a, b, c}$
3110In LaTeX output, the `\newcommand` definition will simply be passed
3111unchanged to the output.
3114Links
3115-----
3117Markdown allows links to be specified in several ways.
3119### Automatic links ###
3121If you enclose a URL or email address in pointy brackets, it
3122will become a link:
3124 <http://google.com>
3125 <sam@green.eggs.ham>
3127### Inline links ###
3129An inline link consists of the link text in square brackets,
3130followed by the URL in parentheses. (Optionally, the URL can
3131be followed by a link title, in quotes.)
3133 This is an [inline link](/url), and here's [one with
3134 a title](http://fsf.org "click here for a good time!").
3136There can be no space between the bracketed part and the parenthesized part.
3137The link text can contain formatting (such as emphasis), but the title cannot.
3139Email addresses in inline links are not autodetected, so they have to be
3140prefixed with `mailto`:
3142 [Write me!](mailto:sam@green.eggs.ham)
3144### Reference links ###
3146An *explicit* reference link has two parts, the link itself and the link
3147definition, which may occur elsewhere in the document (either
3148before or after the link).
3150The link consists of link text in square brackets, followed by a label in
3151square brackets. (There cannot be space between the two unless the
3152`spaced_reference_links` extension is enabled.) The link definition
3153consists of the bracketed label, followed by a colon and a space, followed by
3154the URL, and optionally (after a space) a link title either in quotes or in
3155parentheses. The label must not be parseable as a citation (assuming
3156the `citations` extension is enabled): citations take precedence over
3157link labels.
3159Here are some examples:
3161 [my label 1]: /foo/bar.html "My title, optional"
3162 [my label 2]: /foo
3163 [my label 3]: http://fsf.org (The free software foundation)
3164 [my label 4]: /bar#special 'A title in single quotes'
3166The URL may optionally be surrounded by angle brackets:
3168 [my label 5]: <http://foo.bar.baz>
3170The title may go on the next line:
3172 [my label 3]: http://fsf.org
3173 "The free software foundation"
3175Note that link labels are not case sensitive. So, this will work:
3177 Here is [my link][FOO]
3179 [Foo]: /bar/baz
3181In an *implicit* reference link, the second pair of brackets is
3182empty:
3184 See [my website][].
3186 [my website]: http://foo.bar.baz
3188Note: In `Markdown.pl` and most other Markdown implementations,
3189reference link definitions cannot occur in nested constructions
3190such as list items or block quotes. Pandoc lifts this arbitrary
3191seeming restriction. So the following is fine in pandoc, though
3192not in most other implementations:
3194 > My block [quote].
3196 > [quote]: /foo
3198#### Extension: `shortcut_reference_links` ####
3200In a *shortcut* reference link, the second pair of brackets may
3201be omitted entirely:
3203 See [my website].
3205 [my website]: http://foo.bar.baz
3207### Internal links ###
3209To link to another section of the same document, use the automatically
3210generated identifier (see [Header identifiers]). For example:
3212 See the [Introduction](#introduction).
3216 See the [Introduction].
3218 [Introduction]: #introduction
3220Internal links are currently supported for HTML formats (including
3221HTML slide shows and EPUB), LaTeX, and ConTeXt.
3223Images
3224------
3226A link immediately preceded by a `!` will be treated as an image.
3227The link text will be used as the image's alt text:
3229 ![la lune](lalune.jpg "Voyage to the moon")
3231 ![movie reel]
3233 [movie reel]: movie.gif
3235#### Extension: `implicit_figures` ####
3237An image with nonempty alt text, occurring by itself in a
3238paragraph, will be rendered as a figure with a caption. The
3239image's alt text will be used as the caption.
3241 ![This is the caption](/url/of/image.png)
3243How this is rendered depends on the output format. Some output
3244formats (e.g. RTF) do not yet support figures. In those
3245formats, you'll just get an image in a paragraph by itself, with
3246no caption.
3248If you just want a regular inline image, just make sure it is not
3249the only thing in the paragraph. One way to do this is to insert a
3250nonbreaking space after the image:
3252 ![This image won't be a figure](/url/of/image.png)\
3254Note that in reveal.js slide shows, an image in a paragraph
3255by itself that has the `stretch` class will fill the screen,
3256and the caption and figure tags will be omitted.
3258#### Extension: `link_attributes` ####
3260Attributes can be set on links and images:
3262 An inline ![image](foo.jpg){#id .class width=30 height=20px}
3263 and a reference ![image][ref] with attributes.
3265 [ref]: foo.jpg "optional title" {#id .class key=val key2="val 2"}
3267(This syntax is compatible with [PHP Markdown Extra] when only `#id`
3268and `.class` are used.)
3270For HTML and EPUB, all attributes except `width` and `height` (but
3271including `srcset` and `sizes`) are passed through as is. The other
3272writers ignore attributes that are not supported by their output
3273format.
3275The `width` and `height` attributes on images are treated specially. When
3276used without a unit, the unit is assumed to be pixels. However, any of
3277the following unit identifiers can be used: `px`, `cm`, `mm`, `in`, `inch`
3278and `%`. There must not be any spaces between the number and the unit.
3279For example:
3281```
3282![](file.jpg){ width=50% }
3283```
3285- Dimensions are converted to inches for output in page-based formats like
3286 LaTeX. Dimensions are converted to pixels for output in HTML-like
3287 formats. Use the `--dpi` option to specify the number of pixels per
3288 inch. The default is 96dpi.
3289- The `%` unit is generally relative to some available space.
3290 For example the above example will render to
3291 `<img href="file.jpg" style="width: 50%;" />` (HTML),
3292 `\includegraphics[width=0.5\textwidth]{file.jpg}` (LaTeX), or
3293 `\externalfigure[file.jpg][width=0.5\textwidth]` (ConTeXt).
3294- Some output formats have a notion of a class
3295 ([ConTeXt](http://wiki.contextgarden.net/Using_Graphics#Multiple_Image_Settings))
3296 or a unique identifier (LaTeX `\caption`), or both (HTML).
3297- When no `width` or `height` attributes are specified, the fallback
3298 is to look at the image resolution and the dpi metadata embedded in
3299 the image file.
3301Spans
3302-----
3304#### Extension: `bracketed_spans` ####
3306A bracketed sequence of inlines, as one would use to begin
3307a link, will be treated as a span with attributes if it is
3308followed immediately by attributes:
3310 [This is *some text*]{.class key="val"}
3312Footnotes
3313---------
3315#### Extension: `footnotes` ####
3317Pandoc's Markdown allows footnotes, using the following syntax:
3319 Here is a footnote reference,[^1] and another.[^longnote]
3321 [^1]: Here is the footnote.
3323 [^longnote]: Here's one with multiple blocks.
3325 Subsequent paragraphs are indented to show that they
3326 belong to the previous footnote.
3328 { some.code }
3330 The whole paragraph can be indented, or just the first
3331 line. In this way, multi-paragraph footnotes work like
3332 multi-paragraph list items.
3334 This paragraph won't be part of the note, because it
3335 isn't indented.
3337The identifiers in footnote references may not contain spaces, tabs,
3338or newlines. These identifiers are used only to correlate the
3339footnote reference with the note itself; in the output, footnotes
3340will be numbered sequentially.
3342The footnotes themselves need not be placed at the end of the
3343document. They may appear anywhere except inside other block elements
3344(lists, block quotes, tables, etc.). Each footnote should be
3345separated from surrounding content (including other footnotes)
3346by blank lines.
3348#### Extension: `inline_notes` ####
3350Inline footnotes are also allowed (though, unlike regular notes,
3351they cannot contain multiple paragraphs). The syntax is as follows:
3353 Here is an inline note.^[Inlines notes are easier to write, since
3354 you don't have to pick an identifier and move down to type the
3355 note.]
3357Inline and regular footnotes may be mixed freely.
3359Typography
3360----------
3362#### Extension: `smart` ####
3364Interpret straight quotes as curly quotes, `---` as em-dashes,
3365`--` as en-dashes, and `...` as ellipses. Nonbreaking spaces are
3366inserted after certain abbreviations, such as "Mr." This
3367option currently affects the input formats `markdown`,
3368`commonmark`, `latex`, `mediawiki`, `org`, `rst`, and `twiki`,
3369and the output formats `markdown`, `latex`, and `context`.
3371Note: If you are *writing* Markdown, then the `smart` extension
3372has the reverse effect: what would have been curly quotes comes
3373out straight.
3375In LaTeX, `smart` means to use the standard TeX ligatures
3376for quotation marks (` `` ` and ` '' ` for double quotes,
3377`` ` `` and `` ' `` for single quotes) and dashes (`--` for
3378en-dash and `---` for em-dash). If `smart` is disabled,
3379then in reading LaTeX pandoc will parse these characters
3380literally. In writing LaTeX, enabling `smart` tells pandoc
3381to use the ligatures when possible; if `smart` is disabled
3382pandoc will use unicode quotation mark and dash characters.
3384Citations
3385---------
3387#### Extension: `citations` ####
3389Using an external filter, `pandoc-citeproc`, pandoc can automatically generate
3390citations and a bibliography in a number of styles. Basic usage is
3392 pandoc --filter pandoc-citeproc myinput.txt
3394In order to use this feature, you will need to specify a bibliography file
3395using the `bibliography` metadata field in a YAML metadata section, or
3396`--bibliography` command line argument. You can supply multiple `--bibliography`
3397arguments or set `bibliography` metadata field to YAML array, if you want to
3398use multiple bibliography files. The bibliography may have any of these
3399formats:
3401 Format File extension
3402 ------------ --------------
3403 BibLaTeX .bib
3404 BibTeX .bibtex
3405 Copac .copac
3406 CSL JSON .json
3407 CSL YAML .yaml
3408 EndNote .enl
3409 EndNote XML .xml
3410 ISI .wos
3411 MEDLINE .medline
3412 MODS .mods
3413 RIS .ris
3415Note that `.bib` can be used with both BibTeX and BibLaTeX files;
3416use `.bibtex` to force BibTeX.
3418Note that `pandoc-citeproc --bib2json` and `pandoc-citeproc --bib2yaml`
3419can produce `.json` and `.yaml` files from any of the supported formats.
3421In-field markup: In BibTeX and BibLaTeX databases, pandoc-citeproc parses
3422a subset of LaTeX markup; in CSL YAML databases, pandoc Markdown; and in CSL JSON databases, an [HTML-like markup][CSL markup specs]:
3424`<i>...</i>`
3425: italics
3427`<b>...</b>`
3428: bold
3430`<span style="font-variant:small-caps;">...</span>` or `<sc>...</sc>`
3431: small capitals
3433`<sub>...</sub>`
3434: subscript
3436`<sup>...</sup>`
3437: superscript
3439`<span class="nocase">...</span>`
3440: prevent a phrase from being capitalized as title case
3442`pandoc-citeproc -j` and `-y` interconvert the CSL JSON
3443and CSL YAML formats as far as possible.
3445As an alternative to specifying a bibliography file using `--bibliography`
3446or the YAML metadata field `bibliography`, you can include
3447the citation data directly in the `references` field of the
3448document's YAML metadata. The field should contain an array of
3449YAML-encoded references, for example:
3451 ---
3452 references:
3453 - type: article-journal
3454 id: WatsonCrick1953
3455 author:
3456 - family: Watson
3457 given: J. D.
3458 - family: Crick
3459 given: F. H. C.
3460 issued:
3461 date-parts:
3462 - - 1953
3463 - 4
3464 - 25
3465 title: 'Molecular structure of nucleic acids: a structure for deoxyribose
3466 nucleic acid'
3467 title-short: Molecular structure of nucleic acids
3468 container-title: Nature
3469 volume: 171
3470 issue: 4356
3471 page: 737-738
3472 DOI: 10.1038/171737a0
3473 URL: http://www.nature.com/nature/journal/v171/n4356/abs/171737a0.html
3474 language: en-GB
3475 ...
3477(`pandoc-citeproc --bib2yaml` can produce these from a bibliography file in one
3478of the supported formats.)
3480Citations and references can be formatted using any style supported by the
3481[Citation Style Language], listed in the [Zotero Style Repository].
3482These files are specified using the `--csl` option or the `csl` metadata field.
3483By default, `pandoc-citeproc` will use the [Chicago Manual of Style] author-date
3484format. The CSL project provides further information on [finding and editing styles].
3486To make your citations hyperlinks to the corresponding bibliography
3487entries, add `link-citations: true` to your YAML metadata.
3489Citations go inside square brackets and are separated by semicolons.
3490Each citation must have a key, composed of '@' + the citation
3491identifier from the database, and may optionally have a prefix,
3492a locator, and a suffix. The citation key must begin with a letter, digit,
3493or `_`, and may contain alphanumerics, `_`, and internal punctuation
3494characters (`:.#$%&-+?<>~/`). Here are some examples:
3496 Blah blah [see @doe99, pp. 33-35; also @smith04, chap. 1].
3498 Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
3500 Blah blah [@smith04; @doe99].
3502`pandoc-citeproc` detects locator terms in the [CSL locale files].
3503Either abbreviated or unabbreviated forms are accepted. In the `en-US`
3504locale, locator terms can be written in either singular or plural forms,
3505as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
3506`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`, `fol.`/`fols.`;
3507`number`, `no.`/`nos.`; `line`, `l.`/`ll.`; `note`, `n.`/`nn.`; `opus`,
3508`op.`/`opp.`; `page`, `p.`/`pp.`; `paragraph`, `para.`/`paras.`; `part`,
3509`pt.`/`pts.`; `section`, `sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`;
3510`verse`, `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
3511locator term is used, "page" is assumed.
3513A minus sign (`-`) before the `@` will suppress mention of
3514the author in the citation. This can be useful when the
3515author is already mentioned in the text:
3517 Smith says blah [-@smith04].
3519You can also write an in-text citation, as follows:
3521 @smith04 says blah.
3523 @smith04 [p. 33] says blah.
3525If the style calls for a list of works cited, it will be placed
3526at the end of the document. Normally, you will want to end your
3527document with an appropriate header:
3529 last paragraph...
3531 # References
3533The bibliography will be inserted after this header. Note that
3534the `unnumbered` class will be added to this header, so that the
3535section will not be numbered.
3537If you want to include items in the bibliography without actually
3538citing them in the body text, you can define a dummy `nocite` metadata
3539field and put the citations there:
3541 ---
3542 nocite: |
3543 @item1, @item2
3544 ...
3546 @item3
3548In this example, the document will contain a citation for `item3`
3549only, but the bibliography will contain entries for `item1`, `item2`, and
3550`item3`.
3552It is possible to create a bibliography with all the citations,
3553whether or not they appear in the document, by using a wildcard:
3555 ---
3556 nocite: |
3557 @*
3558 ...
3560For LaTeX or PDF output, you can also use [`natbib`] or [`biblatex`]
3561to render bibliography. In order to do so, specify bibliography files as
3562outlined above, and add `--natbib` or `--biblatex` argument to `pandoc`
3563invocation. Bear in mind that bibliography files have to be in respective
3564format (either BibTeX or BibLaTeX).
3566For more information, see the [pandoc-citeproc man page].
3568[CSL markup specs]: http://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields
3569[Chicago Manual of Style]: http://chicagomanualofstyle.org
3570[Citation Style Language]: http://citationstyles.org
3571[Zotero Style Repository]: https://www.zotero.org/styles
3572[finding and editing styles]: http://citationstyles.org/styles/
3573[CSL locale files]: https://github.com/citation-style-language/locales
3574[pandoc-citeproc man page]: https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md
3576Non-pandoc extensions
3577---------------------
3579The following Markdown syntax extensions are not enabled by default
3580in pandoc, but may be enabled by adding `+EXTENSION` to the format
3581name, where `EXTENSION` is the name of the extension. Thus, for
3582example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
3584#### Extension: `old_dashes` ####
3586Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
3587`-` before a numeral is an en-dash, and `--` is an em-dash.
3588This option only has an effect if `smart` is enabled. It is
3589selected automatically for `textile` input.
3591#### Extension: `angle_brackets_escapable` ####
3593Allow `<` and `>` to be backslash-escaped, as they can be in
3594GitHub flavored Markdown but not original Markdown. This is
3595implied by pandoc's default `all_symbols_escapable`.
3597#### Extension: `lists_without_preceding_blankline` ####
3599Allow a list to occur right after a paragraph, with no intervening
3600blank space.
3602#### Extension: `spaced_reference_links` ####
3604Allow whitespace between the two components of a reference link,
3605for example,
3607 [foo] [bar].
3609#### Extension: `hard_line_breaks` ####
3611Causes all newlines within a paragraph to be interpreted as hard line
3612breaks instead of spaces.
3614#### Extension: `ignore_line_breaks` ####
3616Causes newlines within a paragraph to be ignored, rather than being
3617treated as spaces or as hard line breaks. This option is intended for
3618use with East Asian languages where spaces are not used between words,
3619but text is divided into lines for readability.
3621#### Extension: `east_asian_line_breaks` ####
3623Causes newlines within a paragraph to be ignored, rather than
3624being treated as spaces or as hard line breaks, when they occur
3625between two East Asian wide characters. This is a better choice
3626than `ignore_line_breaks` for texts that include a mix of East
3627Asian wide characters and other characters.
3629##### Extension: `emoji` ####
3631Parses textual emojis like `:smile:` as Unicode emoticons.
3633#### Extension: `tex_math_single_backslash` ####
3635Causes anything between `\(` and `\)` to be interpreted as inline
3636TeX math, and anything between `\[` and `\]` to be interpreted
3637as display TeX math. Note: a drawback of this extension is that
3638it precludes escaping `(` and `[`.
3640#### Extension: `tex_math_double_backslash` ####
3642Causes anything between `\\(` and `\\)` to be interpreted as inline
3643TeX math, and anything between `\\[` and `\\]` to be interpreted
3644as display TeX math.
3646#### Extension: `markdown_attribute` ####
3648By default, pandoc interprets material inside block-level tags as Markdown.
3649This extension changes the behavior so that Markdown is only parsed
3650inside block-level tags if the tags have the attribute `markdown=1`.
3652#### Extension: `mmd_title_block` ####
3654Enables a [MultiMarkdown] style title block at the top of
3655the document, for example:
3657 Title: My title
3658 Author: John Doe
3659 Date: September 1, 2008
3660 Comment: This is a sample mmd title block, with
3661 a field spanning multiple lines.
3663See the MultiMarkdown documentation for details. If `pandoc_title_block` or
3664`yaml_metadata_block` is enabled, it will take precedence over
3665`mmd_title_block`.
3667#### Extension: `abbreviations` ####
3669Parses PHP Markdown Extra abbreviation keys, like
3671 *[HTML]: Hypertext Markup Language
3673Note that the pandoc document model does not support
3674abbreviations, so if this extension is enabled, abbreviation keys are
3675simply skipped (as opposed to being parsed as paragraphs).
3677#### Extension: `autolink_bare_uris` ####
3679Makes all absolute URIs into links, even when not surrounded by
3680pointy braces `<...>`.
3682#### Extension: `ascii_identifiers` ####
3684Causes the identifiers produced by `auto_identifiers` to be pure ASCII.
3685Accents are stripped off of accented Latin letters, and non-Latin
3686letters are omitted.
3688#### Extension: `mmd_link_attributes` ####
3690Parses multimarkdown style key-value attributes on link
3691and image references. This extension should not be confused with the
3692[`link_attributes`](#extension-link_attributes) extension.
3694 This is a reference ![image][ref] with multimarkdown attributes.
3696 [ref]: http://path.to/image "Image title" width=20px height=30px
3697 id=myId class="myClass1 myClass2"
3699#### Extension: `mmd_header_identifiers` ####
3701Parses multimarkdown style header identifiers (in square brackets,
3702after the header but before any trailing `#`s in an ATX header).
3704#### Extension: `compact_definition_lists` ####
3706Activates the definition list syntax of pandoc 1.12.x and earlier.
3707This syntax differs from the one described above under [Definition lists]
3708in several respects:
3710 - No blank line is required between consecutive items of the
3711 definition list.
3712 - To get a "tight" or "compact" list, omit space between consecutive
3713 items; the space between a term and its definition does not affect
3714 anything.
3715 - Lazy wrapping of paragraphs is not allowed: the entire definition must
3716 be indented four spaces.[^6]
3718[^6]: To see why laziness is incompatible with relaxing the requirement
3719 of a blank line between items, consider the following example:
3721 bar
3722 : definition
3723 foo
3724 : definition
3726 Is this a single list item with two definitions of "bar," the first of
3727 which is lazily wrapped, or two list items? To remove the ambiguity
3728 we must either disallow lazy wrapping or require a blank line between
3729 list items.
3731Markdown variants
3732-----------------
3734In addition to pandoc's extended Markdown, the following Markdown
3735variants are supported:
3737`markdown_phpextra` (PHP Markdown Extra)
3738: `footnotes`, `pipe_tables`, `raw_html`, `markdown_attribute`,
3739 `fenced_code_blocks`, `definition_lists`, `intraword_underscores`,
3740 `header_attributes`, `link_attributes`, `abbreviations`,
3741 `shortcut_reference_links`.
3743`markdown_github` (GitHub-Flavored Markdown)
3744: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `auto_identifiers`,
3745 `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
3746 `intraword_underscores`, `strikeout`, `hard_line_breaks`, `emoji`,
3747 `shortcut_reference_links`, `angle_brackets_escapable`.
3749`markdown_mmd` (MultiMarkdown)
3750: `pipe_tables`, `raw_html`, `markdown_attribute`, `mmd_link_attributes`,
3751 `tex_math_double_backslash`, `intraword_underscores`,
3752 `mmd_title_block`, `footnotes`, `definition_lists`,
3753 `all_symbols_escapable`, `implicit_header_references`,
3754 `auto_identifiers`, `mmd_header_identifiers`,
3755 `shortcut_reference_links`.
3757`markdown_strict` (Markdown.pl)
3758: `raw_html`
3760Extensions with formats other than Markdown
3761-------------------------------------------
3763Some of the extensions discussed above can be used with formats
3764other than Markdown:
3766* `auto_identifiers` can be used with `latex`, `rst`, `mediawiki`,
3767 and `textile` input (and is used by default).
3769* `tex_math_dollars`, `tex_math_single_backslash`, and
3770 `tex_math_double_backslash` can be used with `html` input.
3771 (This is handy for reading web pages formatted using MathJax,
3772 for example.)
3774Producing slide shows with pandoc
3775=================================
3777You can use pandoc to produce an HTML + JavaScript slide presentation
3778that can be viewed via a web browser. There are five ways to do this,
3779using [S5], [DZSlides], [Slidy], [Slideous], or [reveal.js].
3780You can also produce a PDF slide show using LaTeX [`beamer`].
3782Here's the Markdown source for a simple slide show, `habits.txt`:
3784 % Habits
3785 % John Doe
3786 % March 22, 2005
3788 # In the morning
3790 ## Getting up
3792 - Turn off alarm
3793 - Get out of bed
3795 ## Breakfast
3797 - Eat eggs
3798 - Drink coffee
3800 # In the evening
3802 ## Dinner
3804 - Eat spaghetti
3805 - Drink wine
3807 ------------------
3809 ![picture of spaghetti](images/spaghetti.jpg)
3811 ## Going to sleep
3813 - Get in bed
3814 - Count sheep
3816To produce an HTML/JavaScript slide show, simply type
3818 pandoc -t FORMAT -s habits.txt -o habits.html
3820where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
3822For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with the
3823`-s/--standalone` option embeds a link to JavaScript and CSS files, which are
3824assumed to be available at the relative path `s5/default` (for S5), `slideous`
3825(for Slideous), `reveal.js` (for reveal.js), or at the Slidy website at
3826`w3.org` (for Slidy). (These paths can be changed by setting the `slidy-url`,
3827`slideous-url`, `revealjs-url`, or `s5-url` variables; see [Variables for slides],
3828above.) For DZSlides, the (relatively short) JavaScript and CSS are included in
3829the file by default.
3831With all HTML slide formats, the `--self-contained` option can be used to
3832produce a single file that contains all of the data necessary to display the
3833slide show, including linked scripts, stylesheets, images, and videos.
3835To produce a PDF slide show using beamer, type
3837 pandoc -t beamer habits.txt -o habits.pdf
3839Note that a reveal.js slide show can also be converted to a PDF
3840by printing it to a file from the browser.
3842Structuring the slide show
3843--------------------------
3845By default, the *slide level* is the highest header level in
3846the hierarchy that is followed immediately by content, and not another
3847header, somewhere in the document. In the example above, level 1 headers
3848are always followed by level 2 headers, which are followed by content,
3849so 2 is the slide level. This default can be overridden using
3850the `--slide-level` option.
3852The document is carved up into slides according to the following
3853rules:
3855 * A horizontal rule always starts a new slide.
3857 * A header at the slide level always starts a new slide.
3859 * Headers *below* the slide level in the hierarchy create
3860 headers *within* a slide.
3862 * Headers *above* the slide level in the hierarchy create
3863 "title slides," which just contain the section title
3864 and help to break the slide show into sections.
3866 * Content *above* the slide level will not appear in the slide
3867 show.
3869 * A title page is constructed automatically from the document's title
3870 block, if present. (In the case of beamer, this can be disabled
3871 by commenting out some lines in the default template.)
3873These rules are designed to support many different styles of slide show. If
3874you don't care about structuring your slides into sections and subsections,
3875you can just use level 1 headers for all each slide. (In that case, level 1
3876will be the slide level.) But you can also structure the slide show into
3877sections, as in the example above.
3879Note: in reveal.js slide shows, if slide level is 2, a two-dimensional
3880layout will be produced, with level 1 headers building horizontally
3881and level 2 headers building vertically. It is not recommended that
3882you use deeper nesting of section levels with reveal.js.
3884Incremental lists
3885-----------------
3887By default, these writers produce lists that display "all at once."
3888If you want your lists to display incrementally (one item at a time),
3889use the `-i` option. If you want a particular list to depart from the
3890default (that is, to display incrementally without the `-i` option and
3891all at once with the `-i` option), put it in a block quote:
3893 > - Eat spaghetti
3894 > - Drink wine
3896In this way incremental and nonincremental lists can be mixed in
3897a single document.
3899Inserting pauses
3900----------------
3902You can add "pauses" within a slide by including a paragraph containing
3903three dots, separated by spaces:
3905 # Slide with a pause
3907 content before the pause
3909 . . .
3911 content after the pause
3913Styling the slides
3914------------------
3916You can change the style of HTML slides by putting customized CSS files
3917in `$DATADIR/s5/default` (for S5), `$DATADIR/slidy` (for Slidy),
3918or `$DATADIR/slideous` (for Slideous),
3919where `$DATADIR` is the user data directory (see `--data-dir`, above).
3920The originals may be found in pandoc's system data directory (generally
3921`$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
3922files it does not find in the user data directory.
3924For dzslides, the CSS is included in the HTML file itself, and may
3925be modified there.
3927All [reveal.js configuration options] can be set through variables.
3928For example, themes can be used by setting the `theme` variable:
3930 -V theme=moon
3932Or you can specify a custom stylesheet using the `--css` option.
3934To style beamer slides, you can specify a `theme`, `colortheme`,
3935`fonttheme`, `innertheme`, and `outertheme`, using the `-V` option:
3937 pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
3939Note that header attributes will turn into slide attributes
3940(on a `<div>` or `<section>`) in HTML slide formats, allowing you
3941to style individual slides. In beamer, the only header attribute
3942that affects slides is the `allowframebreaks` class, which sets the
3943`allowframebreaks` option, causing multiple slides to be created
3944if the content overfills the frame. This is recommended especially for
3945bibliographies:
3947 # References {.allowframebreaks}
3949Speaker notes
3950-------------
3952reveal.js has good support for speaker notes. You can add notes to your
3953Markdown document thus:
3955 <div class="notes">
3956 This is my note.
3958 - It can contain Markdown
3959 - like this list
3961 </div>
3963To show the notes window, press `s` while viewing the presentation.
3964Notes are not yet supported for other slide formats, but the notes
3965will not appear on the slides themselves.
3967Frame attributes in beamer
3968--------------------------
3970Sometimes it is necessary to add the LaTeX `[fragile]` option to
3971a frame in beamer (for example, when using the `minted` environment).
3972This can be forced by adding the `fragile` class to the header
3973introducing the slide:
3975 # Fragile slide {.fragile}
3977All of the other frame attributes described in Section 8.1 of
3978the [Beamer User's Guide] may also be used: `allowdisplaybreaks`,
3979`allowframebreaks`, `b`, `c`, `t`, `environment`, `label`, `plain`,
3980`shrink`.
3982Creating EPUBs with pandoc
3983==========================
3985EPUB Metadata
3986-------------
3988EPUB metadata may be specified using the `--epub-metadata` option, but
3989if the source document is Markdown, it is better to use a [YAML metadata
3990block][Extension: `yaml_metadata_block`]. Here is an example:
3992 ---
3993 title:
3994 - type: main
3995 text: My Book
3996 - type: subtitle
3997 text: An investigation of metadata
3998 creator:
3999 - role: author
4000 text: John Smith
4001 - role: editor
4002 text: Sarah Jones
4003 identifier:
4004 - scheme: DOI
4005 text: doi:10.234234.234/33
4006 publisher: My Press
4007 rights: © 2007 John Smith, CC BY-NC
4008 ibooks:
4009 version: 1.3.4
4010 ...
4012The following fields are recognized:
4014`identifier`
4015 ~ Either a string value or an object with fields `text` and
4016 `scheme`. Valid values for `scheme` are `ISBN-10`,
4017 `GTIN-13`, `UPC`, `ISMN-10`, `DOI`, `LCCN`, `GTIN-14`,
4018 `ISBN-13`, `Legal deposit number`, `URN`, `OCLC`,
4019 `ISMN-13`, `ISBN-A`, `JP`, `OLCC`.
4021`title`
4022 ~ Either a string value, or an object with fields `file-as` and
4023 `type`, or a list of such objects. Valid values for `type` are
4024 `main`, `subtitle`, `short`, `collection`, `edition`, `extended`.
4026`creator`
4027 ~ Either a string value, or an object with fields `role`, `file-as`,
4028 and `text`, or a list of such objects. Valid values for `role` are
4029 [MARC relators], but
4030 pandoc will attempt to translate the human-readable versions
4031 (like "author" and "editor") to the appropriate marc relators.
4033`contributor`
4034 ~ Same format as `creator`.
4036`date`
4037 ~ A string value in `YYYY-MM-DD` format. (Only the year is necessary.)
4038 Pandoc will attempt to convert other common date formats.
4040`lang` (or legacy: `language`)
4041 ~ A string value in [BCP 47] format. Pandoc will default to the local
4042 language if nothing is specified.
4044`subject`
4045 ~ A string value or a list of such values.
4047`description`
4048 ~ A string value.
4050`type`
4051 ~ A string value.
4053`format`
4054 ~ A string value.
4056`relation`
4057 ~ A string value.
4059`coverage`
4060 ~ A string value.
4062`rights`
4063 ~ A string value.
4065`cover-image`
4066 ~ A string value (path to cover image).
4068`stylesheet`
4069 ~ A string value (path to CSS stylesheet).
4071`page-progression-direction`
4072 ~ Either `ltr` or `rtl`. Specifies the `page-progression-direction`
4073 attribute for the [`spine` element].
4075`ibooks`
4076 ~ iBooks-specific metadata, with the following fields:
4078 - `version`: (string)
4079 - `specified-fonts`: `true`|`false` (default `false`)
4080 - `ipad-orientation-lock`: `portrait-only`|`landscape-only`
4081 - `iphone-orientation-lock`: `portrait-only`|`landscape-only`
4082 - `binding`: `true`|`false` (default `true`)
4083 - `scroll-axis`: `vertical`|`horizontal`|`default`
4085[MARC relators]: http://loc.gov/marc/relators/relaterm.html
4086[`spine` element]: http://idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem
4088Linked media
4089------------
4091By default, pandoc will download linked media (including audio and
4092video) and include it in the EPUB container, yielding a completely
4093self-contained EPUB. If you want to link to external media resources
4094instead, use raw HTML in your source and add `data-external="1"` to the tag
4095with the `src` attribute. For example:
4097 <audio controls="1">
4098 <source src="http://example.com/music/toccata.mp3"
4099 data-external="1" type="audio/mpeg">
4100 </source>
4101 </audio>
4103Literate Haskell support
4104========================
4106If you append `+lhs` (or `+literate_haskell`) to an appropriate input or output
4107format (`markdown`, `markdown_strict`, `rst`, or `latex` for input or output;
4108`beamer`, `html4` or `html5` for output only), pandoc will treat the document as
4109literate Haskell source. This means that
4111 - In Markdown input, "bird track" sections will be parsed as Haskell
4112 code rather than block quotations. Text between `\begin{code}`
4113 and `\end{code}` will also be treated as Haskell code. For
4114 ATX-style headers the character '=' will be used instead of '#'.
4116 - In Markdown output, code blocks with classes `haskell` and `literate`
4117 will be rendered using bird tracks, and block quotations will be
4118 indented one space, so they will not be treated as Haskell code.
4119 In addition, headers will be rendered setext-style (with underlines)
4120 rather than ATX-style (with '#' characters). (This is because ghc
4121 treats '#' characters in column 1 as introducing line numbers.)
4123 - In restructured text input, "bird track" sections will be parsed
4124 as Haskell code.
4126 - In restructured text output, code blocks with class `haskell` will
4127 be rendered using bird tracks.
4129 - In LaTeX input, text in `code` environments will be parsed as
4130 Haskell code.
4132 - In LaTeX output, code blocks with class `haskell` will be rendered
4133 inside `code` environments.
4135 - In HTML output, code blocks with class `haskell` will be rendered
4136 with class `literatehaskell` and bird tracks.
4138Examples:
4140 pandoc -f markdown+lhs -t html
4142reads literate Haskell source formatted with Markdown conventions and writes
4143ordinary HTML (without bird tracks).
4145 pandoc -f markdown+lhs -t html+lhs
4147writes HTML with the Haskell code in bird tracks, so it can be copied
4148and pasted as literate Haskell source.
4150Note that GHC expects the bird tracks in the first column, so indentend literate
4151code blocks (e.g. inside an itemized environment) will not be picked up by the
4152Haskell compiler.
4154Syntax highlighting
4155===================
4157Pandoc will automatically highlight syntax in [fenced code blocks] that
4158are marked with a language name. The Haskell library [skylighting] is
4159used for highlighting, which works in HTML, Docx, Ms, and LaTeX/PDF output.
4160To see a list of language names that pandoc will recognize, type
4161`pandoc --list-highlight-languages`.
4163The color scheme can be selected using the `--highlight-style` option.
4164The default color scheme is `pygments`, which imitates the default color
4165scheme used by the Python library pygments (though pygments is not actually
4166used to do the highlighting). To see a list of highlight styles,
4167type `pandoc --list-highlight-styles`.
4169To disable highlighting, use the `--no-highlight` option.
4171[skylighting]: https://github.com/jgm/skylighting
4173Custom Styles in Docx Output
4174============================
4176By default, pandoc's docx output applies a predefined set of styles for
4177blocks such as paragraphs and block quotes, and uses largely default
4178formatting (italics, bold) for inlines. This will work for most
4179purposes, especially alongside a `reference.docx` file. However, if you
4180need to apply your own styles to blocks, or match a preexisting set of
4181styles, pandoc allows you to define custom styles for blocks and text
4182using `div`s and `span`s, respectively.
4184If you define a `div` or `span` with the attribute `custom-style`,
4185pandoc will apply your specified style to the contained elements. So,
4186for example,
4188 <span custom-style="Emphatically">Get out,</span> he said.
4190would produce a docx file with "Get out," styled with character
4191style `Emphatically`. Similarly,
4193 Dickinson starts the poem simply:
4195 <div custom-style="Poetry">
4196 | A Bird came down the Walk---
4197 | He did not know I saw---
4198 </div>
4200would style the two contained lines with the `Poetry` paragraph style.
4202If the styles are not yet in your reference.docx, they will be defined
4203in the output file as inheriting from normal text. If they are already
4204defined, pandoc will not alter the definition.
4206This feature allows for greatest customization in conjunction with
4207[pandoc filters]. If you want all paragraphs after block quotes to be
4208indented, you can write a filter to apply the styles necessary. If you
4209want all italics to be transformed to the `Emphasis` character style
4210(perhaps to change their color), you can write a filter which will
4211transform all italicized inlines to inlines within an `Emphasis`
4212custom-style `span`.
4214[pandoc filters]: http://pandoc.org/scripting.html
4216Custom writers
4217==============
4219Pandoc can be extended with custom writers written in [lua]. (Pandoc
4220includes a lua interpreter, so lua need not be installed separately.)
4222To use a custom writer, simply specify the path to the lua script
4223in place of the output format. For example:
4225 pandoc -t data/sample.lua
4227Creating a custom writer requires writing a lua function for each
4228possible element in a pandoc document. To get a documented example
4229which you can modify according to your needs, do
4231 pandoc --print-default-data-file sample.lua
4233[lua]: http://www.lua.org
4235Authors
4236=======
4238© 2006-2017 John MacFarlane (jgm@berkeley.edu). Released under the
4239[GPL], version 2 or greater. This software carries no warranty of
4240any kind. (See COPYRIGHT for full copyright and warranty notices.)
4242Contributors include
4243Arata Mizuki,
4244Aaron Wolen,
4245Albert Krewinkel,
4246Alex Ivkin,
4247Alex Vong,
4248Alexander Kondratskiy,
4249Alexander Sulfrian,
4250Alexander V Vershilov,
4251Alfred Wechselberger,
4252Andreas Lööw,
4253Andrew Dunning,
4254Antoine Latter,
4255Arata Mizuki,
4256Arlo O'Keeffe,
4257Artyom Kazak,
4258B. Scott Michel,
4259Ben Gamari,
4260Beni Cherniavsky-Paskin,
4261Benoit Schweblin,
4262Bjorn Buckwalter,
4263Bradley Kuhn,
4264Brent Yorgey,
4265Bryan O'Sullivan,
4266Caleb McDaniel,
4267Calvin Beck,
4268Carlos Sosa,
4269Chris Black,
4270Christian Conkle,
4271Christoffer Ackelman,
4272Christoffer Sawicki,
4273Clare Macrae,
4274Clint Adams,
4275Conal Elliott,
4276Craig S. Bosma,
4277Daniel Bergey,
4278Daniel T. Staal,
4279Daniele D'Orazio,
4280David Lazar,
4281David Röthlisberger,
4282Denis Laxalde,
4283Douglas Calvert,
4284Emanuel Evans,
4285Emily Eisenberg,
4286Eric Kow,
4287Eric Seidel,
4288Felix Yan,
4289Florian Eitel,
4290François Gannaz,
4291Freiric Barral,
4292Freirich Raabe,
4293Frerich Raabe,
4294Fyodor Sheremetyev,
4295Gabor Pali,
4296Gavin Beatty,
4297Gottfried Haider,
4298Greg Maslov,
4299Greg Rundlett,
4300Grégory Bataille,
4301Gwern Branwen,
4302Hans-Peter Deifel,
4303Henrik Tramberend,
4304Henry de Valence,
4305Hubert Plociniczak,
4306Ilya V. Portnov,
4307Ivo Clarysse,
4308J. Lewis Muir,
4309Jaime Marquínez Ferrándiz,
4310Jakob Voß,
4311James Aspnes,
4312Jamie F. Olson,
4313Jan Larres,
4314Jan Schulz,
4315Jason Ronallo,
4316Jeff Arnold,
4317Jeff Runningen,
4318Jens Petersen,
4319Jesse Rosenthal,
4320Joe Hillenbrand,
4321John MacFarlane,
4322John Muccigrosso,
4323Jonas Smedegaard,
4324Jonathan Daugherty,
4325Jose Luis Duran,
4326Josef Svenningsson,
4327Julien Cretel,
4328Juliusz Gonera,
4329Justin Bogner,
4330Jérémy Bobbio,
4331Kelsey Hightower,
4332Kolen Cheung,
4333Konstantin Zudov,
4334Kristof Bastiaensen,
4335Lars-Dominik Braun,
4336Luke Plant,
4337Mark Szepieniec,
4338Mark Wright,
4339Martin Linn,
4340Masayoshi Takahashi,
4341Matej Kollar,
4342Mathias Schenner,
4343Mathieu Duponchelle,
4344Matthew Eddey,
4345Matthew Pickering,
4346Matthias C. M. Troffaes,
4347Mauro Bieg,
4348Max Bolingbroke,
4349Max Rydahl Andersen,
4350Merijn Verstraaten,
4351Michael Beaumont,
4352Michael Chladek,
4353Michael Snoyman,
4354Michael Thompson,
4355MinRK,
4356Morton Fox,
4357Nathan Gass,
4358Neil Mayhew,
4359Nick Bart,
4360Nicolas Kaiser,
4361Nikolay Yakimov,
4362Oliver Matthews,
4363Ophir Lifshitz,
4364Pablo Rodríguez,
4365Paul Rivier,
4366Paulo Tanimoto,
4367Peter Wang,
4368Philippe Ombredanne,
4369Phillip Alday,
4370Prayag Verma,
4371Puneeth Chaganti,
4372Ralf Stephan,
4373Raniere Silva,
4374Recai Oktaş,
4375RyanGlScott,
4376Scott Morrison,
4377Sergei Trofimovich,
4378Sergey Astanin,
4379Shahbaz Youssefi,
4380Shaun Attfield,
4381Sidarth Kapur,
4382Sidharth Kapur,
4383Simon Hengel,
4384Sumit Sahrawat,
4385Thomas Hodgson,
4386Thomas Weißschuh,
4387Tim Lin,
4388Timothy Humphries,
4389Tiziano Müller,
4390Todd Sifleet,
4391Tom Leese,
4392Uli Köhler,
4393Václav Zeman,
4394Viktor Kronvall,
4395Vincent,
4396Václav Haisman,
4397Václav Zeman,
4398Wandmalfarbe,
4399Waldir Pimenta,
4400Wikiwide,
4401Xavier Olive,
4402bumper314,
4403csforste,
4404infinity0x,
4405nkalvi,
4406qerub,
4407robabla,
4408roblabla,
4409rodja.trappe,
4410rski,
4411shreevatsa.public,
4412takahashim,
4413tgkokk,
4414thsutton.
4416[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"