"Fossies" - the Fresh Open Source Software Archive

Member "pandoc-3.1.9/MANUAL.txt" (27 Oct 2023, 274916 Bytes) of package /linux/www/pandoc-3.1.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "MANUAL.txt": 3.1.8_vs_3.1.9.

    1 ---
    2 title: Pandoc User's Guide
    3 author: John MacFarlane
    4 date: October 27, 2023
    5 ---
    6 
    7 # Synopsis
    8 
    9 `pandoc` [*options*] [*input-file*]...
   10 
   11 # Description
   12 
   13 Pandoc is a [Haskell] library for converting from one markup format to
   14 another, and a command-line tool that uses this library.
   15 
   16 Pandoc can convert between numerous markup and word processing formats,
   17 including, but not limited to, various flavors of [Markdown], [HTML],
   18 [LaTeX] and [Word docx]. For the full lists of input and output formats,
   19 see the `--from` and `--to` [options below][General options].
   20 Pandoc can also produce [PDF] output: see [creating a PDF], below.
   21 
   22 Pandoc's enhanced version of Markdown includes syntax for [tables],
   23 [definition lists], [metadata blocks], [footnotes], [citations], [math],
   24 and much more.  See below under [Pandoc's Markdown].
   25 
   26 Pandoc has a modular design: it consists of a set of readers, which parse
   27 text in a given format and produce a native representation of the document
   28 (an _abstract syntax tree_ or AST), and a set of writers, which convert
   29 this native representation into a target format. Thus, adding an input
   30 or output format requires only adding a reader or writer. Users can also
   31 run custom [pandoc filters] to modify the intermediate AST.
   32 
   33 Because pandoc's intermediate representation of a document is less
   34 expressive than many of the formats it converts between, one should
   35 not expect perfect conversions between every format and every other.
   36 Pandoc attempts to preserve the structural elements of a document, but
   37 not formatting details such as margin size.  And some document elements,
   38 such as complex tables, may not fit into pandoc's simple document
   39 model.  While conversions from pandoc's Markdown to all formats aspire
   40 to be perfect, conversions from formats more expressive than pandoc's
   41 Markdown can be expected to be lossy.
   42 
   43 ## Using pandoc
   44 
   45 If no *input-files* are specified, input is read from *stdin*.
   46 Output goes to *stdout* by default. For output to a file,
   47 use the `-o` option:
   48 
   49     pandoc -o output.html input.txt
   50 
   51 By default, pandoc produces a document fragment. To produce a standalone
   52 document (e.g. a valid HTML file including `<head>` and `<body>`),
   53 use the `-s` or `--standalone` flag:
   54 
   55     pandoc -s -o output.html input.txt
   56 
   57 For more information on how standalone documents are produced, see
   58 [Templates] below.
   59 
   60 If multiple input files are given, pandoc will concatenate them all (with
   61 blank lines between them) before parsing. (Use `--file-scope` to parse files
   62 individually.)
   63 
   64 ## Specifying formats
   65 
   66 The format of the input and output can be specified explicitly using
   67 command-line options.  The input format can be specified using the
   68 `-f/--from` option, the output format using the `-t/--to` option.
   69 Thus, to convert `hello.txt` from Markdown to LaTeX, you could type:
   70 
   71     pandoc -f markdown -t latex hello.txt
   72 
   73 To convert `hello.html` from HTML to Markdown:
   74 
   75     pandoc -f html -t markdown hello.html
   76 
   77 Supported input and output formats are listed below under [Options]
   78 (see `-f` for input formats and `-t` for output formats).  You
   79 can also use `pandoc --list-input-formats` and
   80 `pandoc --list-output-formats` to print lists of supported
   81 formats.
   82 
   83 If the input or output format is not specified explicitly, pandoc
   84 will attempt to guess it from the extensions of the filenames.
   85 Thus, for example,
   86 
   87     pandoc -o hello.tex hello.txt
   88 
   89 will convert `hello.txt` from Markdown to LaTeX.  If no output file
   90 is specified (so that output goes to *stdout*), or if the output file's
   91 extension is unknown, the output format will default to HTML.
   92 If no input file is specified (so that input comes from *stdin*), or
   93 if the input files' extensions are unknown, the input format will
   94 be assumed to be Markdown.
   95 
   96 ## Character encoding
   97 
   98 Pandoc uses the UTF-8 character encoding for both input and output.
   99 If your local character encoding is not UTF-8, you
  100 should pipe input and output through [`iconv`]:
  101 
  102     iconv -t utf-8 input.txt | pandoc | iconv -f utf-8
  103 
  104 Note that in some output formats (such as HTML, LaTeX, ConTeXt,
  105 RTF, OPML, DocBook, and Texinfo), information about
  106 the character encoding is included in the document header, which
  107 will only be included if you use the `-s/--standalone` option.
  108 
  109 [`iconv`]: https://www.gnu.org/software/libiconv/
  110 
  111 ## Creating a PDF
  112 
  113 To produce a PDF, specify an output file with a `.pdf` extension:
  114 
  115     pandoc test.txt -o test.pdf
  116 
  117 By default, pandoc will use LaTeX to create the PDF, which requires
  118 that a LaTeX engine be installed (see `--pdf-engine` below).
  119 Alternatively, pandoc can use ConTeXt, roff ms, or HTML as an
  120 intermediate format.  To do this, specify an output file with a
  121 `.pdf` extension, as before, but add the `--pdf-engine` option
  122 or `-t context`, `-t html`, or `-t ms` to the command line.
  123 The tool used to generate the PDF from the intermediate format
  124 may be specified using `--pdf-engine`.
  125 
  126 You can control the PDF style using variables, depending on
  127 the intermediate format used: see [variables for LaTeX],
  128 [variables for ConTeXt], [variables for `wkhtmltopdf`],
  129 [variables for ms].  When HTML is used as an intermediate
  130 format, the output can be styled using `--css`.
  131 
  132 To debug the PDF creation, it can be useful to look at the intermediate
  133 representation: instead of `-o test.pdf`, use for example `-s -o test.tex`
  134 to output the generated LaTeX. You can then test it with `pdflatex test.tex`.
  135 
  136 When using LaTeX, the following packages need to be available
  137 (they are included with all recent versions of [TeX Live]):
  138 [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
  139 [`iftex`], [`listings`] (if the
  140 `--listings` option is used), [`fancyvrb`], [`longtable`],
  141 [`booktabs`], [`graphicx`] (if the document
  142 contains images), [`hyperref`], [`xcolor`],
  143 [`soul`], [`geometry`] (with the `geometry` variable set),
  144 [`setspace`] (with `linestretch`), and
  145 [`babel`] (with `lang`).  If `CJKmainfont` is set, [`xeCJK`]
  146 is needed.  The use of `xelatex` or `lualatex` as
  147 the PDF engine requires [`fontspec`].  `lualatex` uses
  148 [`selnolig`]. `xelatex` uses [`bidi`] (with the `dir` variable set).
  149 If the `mathspec` variable is set, `xelatex` will use [`mathspec`]
  150 instead of [`unicode-math`].  The [`upquote`] and [`microtype`]
  151 packages are used if available, and [`csquotes`] will be used
  152 for [typography] if the `csquotes` variable or metadata field is
  153 set to a true value.  The [`natbib`], [`biblatex`], [`bibtex`],
  154 and [`biber`] packages can optionally be used for [citation
  155 rendering].  The following packages will be used to improve
  156 output quality if present, but pandoc does not require them to
  157 be present: [`upquote`] (for straight quotes in verbatim
  158 environments), [`microtype`] (for better spacing adjustments),
  159 [`parskip`] (for better inter-paragraph spaces), [`xurl`] (for
  160 better line breaks in URLs), [`bookmark`] (for better PDF
  161 bookmarks), and [`footnotehyper`] or [`footnote`] (to allow
  162 footnotes in tables).
  163 
  164 [TeX Live]: https://www.tug.org/texlive/
  165 [`amsfonts`]: https://ctan.org/pkg/amsfonts
  166 [`amsmath`]: https://ctan.org/pkg/amsmath
  167 [`babel`]: https://ctan.org/pkg/babel
  168 [`biber`]: https://ctan.org/pkg/biber
  169 [`biblatex`]: https://ctan.org/pkg/biblatex
  170 [`bibtex`]: https://ctan.org/pkg/bibtex
  171 [`bidi`]: https://ctan.org/pkg/bidi
  172 [`bookmark`]: https://ctan.org/pkg/bookmark
  173 [`booktabs`]: https://ctan.org/pkg/booktabs
  174 [`csquotes`]: https://ctan.org/pkg/csquotes
  175 [`fancyvrb`]: https://ctan.org/pkg/fancyvrb
  176 [`fontspec`]: https://ctan.org/pkg/fontspec
  177 [`footnote`]: https://ctan.org/pkg/footnote
  178 [`footnotehyper`]: https://ctan.org/pkg/footnotehyper
  179 [`geometry`]: https://ctan.org/pkg/geometry
  180 [`graphicx`]: https://ctan.org/pkg/graphicx
  181 [`grffile`]: https://ctan.org/pkg/grffile
  182 [`hyperref`]: https://ctan.org/pkg/hyperref
  183 [`iftex`]: https://ctan.org/pkg/iftex
  184 [`listings`]: https://ctan.org/pkg/listings
  185 [`lm`]: https://ctan.org/pkg/lm
  186 [`longtable`]: https://ctan.org/pkg/longtable
  187 [`mathspec`]: https://ctan.org/pkg/mathspec
  188 [`microtype`]: https://ctan.org/pkg/microtype
  189 [`natbib`]: https://ctan.org/pkg/natbib
  190 [`parskip`]: https://ctan.org/pkg/parskip
  191 [`polyglossia`]: https://ctan.org/pkg/polyglossia
  192 [`prince`]: https://www.princexml.com/
  193 [`setspace`]: https://ctan.org/pkg/setspace
  194 [`soul`]: https://ctan.org/pkg/soul
  195 [`unicode-math`]: https://ctan.org/pkg/unicode-math
  196 [`upquote`]: https://ctan.org/pkg/upquote
  197 [`weasyprint`]: https://weasyprint.org
  198 [`wkhtmltopdf`]: https://wkhtmltopdf.org
  199 [`xcolor`]: https://ctan.org/pkg/xcolor
  200 [`xeCJK`]: https://ctan.org/pkg/xecjk
  201 [`xurl`]: https://ctan.org/pkg/xurl
  202 [`selnolig`]: https://ctan.org/pkg/selnolig
  203 
  204 
  205 
  206 ## Reading from the Web
  207 
  208 Instead of an input file, an absolute URI may be given. In this case
  209 pandoc will fetch the content using HTTP:
  210 
  211     pandoc -f html -t markdown https://www.fsf.org
  212 
  213 It is possible to supply a custom User-Agent string or other
  214 header when requesting a document from a URL:
  215 
  216     pandoc -f html -t markdown --request-header User-Agent:"Mozilla/5.0" \
  217       https://www.fsf.org
  218 
  219 # Options
  220 
  221 ## General options {.options}
  222 
  223 `-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT*
  224 
  225 :   Specify input format.  *FORMAT* can be:
  226 
  227     ::: {#input-formats}
  228     - `bibtex` ([BibTeX] bibliography)
  229     - `biblatex` ([BibLaTeX] bibliography)
  230     - `bits` ([BITS] XML, alias for `jats`)
  231     - `commonmark` ([CommonMark] Markdown)
  232     - `commonmark_x` ([CommonMark] Markdown with extensions)
  233     - `creole` ([Creole 1.0])
  234     - `csljson` ([CSL JSON] bibliography)
  235     - `csv` ([CSV] table)
  236     - `tsv` ([TSV] table)
  237     - `docbook` ([DocBook])
  238     - `docx` ([Word docx])
  239     - `dokuwiki` ([DokuWiki markup])
  240     - `endnotexml` ([EndNote XML bibliography])
  241     - `epub` ([EPUB])
  242     - `fb2` ([FictionBook2] e-book)
  243     - `gfm` ([GitHub-Flavored Markdown]),
  244       or the deprecated and less accurate `markdown_github`;
  245       use [`markdown_github`](#markdown-variants) only
  246       if you need extensions not supported in [`gfm`](#markdown-variants).
  247     - `haddock` ([Haddock markup])
  248     - `html` ([HTML])
  249     - `ipynb` ([Jupyter notebook])
  250     - `jats` ([JATS] XML)
  251     - `jira` ([Jira]/Confluence wiki markup)
  252     - `json` (JSON version of native AST)
  253     - `latex` ([LaTeX])
  254     - `markdown` ([Pandoc's Markdown])
  255     - `markdown_mmd` ([MultiMarkdown])
  256     - `markdown_phpextra` ([PHP Markdown Extra])
  257     - `markdown_strict` (original unextended [Markdown])
  258     - `mediawiki` ([MediaWiki markup])
  259     - `man` ([roff man])
  260     - `muse` ([Muse])
  261     - `native` (native Haskell)
  262     - `odt` ([ODT])
  263     - `opml` ([OPML])
  264     - `org` ([Emacs Org mode])
  265     - `ris` ([RIS] bibliography)
  266     - `rtf` ([Rich Text Format])
  267     - `rst` ([reStructuredText])
  268     - `t2t` ([txt2tags])
  269     - `textile` ([Textile])
  270     - `tikiwiki` ([TikiWiki markup])
  271     - `twiki` ([TWiki markup])
  272     - `typst` ([typst])
  273     - `vimwiki` ([Vimwiki])
  274     - the path of a custom Lua reader, see [Custom readers and writers] below
  275     :::
  276 
  277     Extensions can be individually enabled or disabled by
  278     appending `+EXTENSION` or `-EXTENSION` to the format name.
  279     See [Extensions] below, for a list of extensions and
  280     their names.  See `--list-input-formats` and `--list-extensions`,
  281     below.
  282 
  283 `-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT*
  284 
  285 :   Specify output format.  *FORMAT* can be:
  286 
  287     ::: {#output-formats}
  288     - `asciidoc` (modern [AsciiDoc] as interpreted by [AsciiDoctor])
  289     - `asciidoc_legacy` ([AsciiDoc] as interpreted by [`asciidoc-py`]).
  290     - `asciidoctor` (deprecated synonym for `asciidoc`)
  291     - `beamer` ([LaTeX beamer][`beamer`] slide show)
  292     - `bibtex` ([BibTeX] bibliography)
  293     - `biblatex` ([BibLaTeX] bibliography)
  294     - `chunkedhtml` (zip archive of multiple linked HTML files)
  295     - `commonmark` ([CommonMark] Markdown)
  296     - `commonmark_x` ([CommonMark] Markdown with extensions)
  297     - `context` ([ConTeXt])
  298     - `csljson` ([CSL JSON] bibliography)
  299     - `docbook` or `docbook4` ([DocBook] 4)
  300     - `docbook5` (DocBook 5)
  301     - `docx` ([Word docx])
  302     - `dokuwiki` ([DokuWiki markup])
  303     - `epub` or `epub3` ([EPUB] v3 book)
  304     - `epub2` (EPUB v2)
  305     - `fb2` ([FictionBook2] e-book)
  306     - `gfm` ([GitHub-Flavored Markdown]),
  307       or the deprecated and less accurate `markdown_github`;
  308       use [`markdown_github`](#markdown-variants) only
  309       if you need extensions not supported in [`gfm`](#markdown-variants).
  310     - `haddock` ([Haddock markup])
  311     - `html` or `html5` ([HTML], i.e. [HTML5]/XHTML [polyglot markup])
  312     - `html4` ([XHTML] 1.0 Transitional)
  313     - `icml` ([InDesign ICML])
  314     - `ipynb` ([Jupyter notebook])
  315     - `jats_archiving` ([JATS] XML, Archiving and Interchange Tag Set)
  316     - `jats_articleauthoring` ([JATS] XML, Article Authoring Tag Set)
  317     - `jats_publishing` ([JATS] XML, Journal Publishing Tag Set)
  318     - `jats` (alias for `jats_archiving`)
  319     - `jira` ([Jira]/Confluence wiki markup)
  320     - `json` (JSON version of native AST)
  321     - `latex` ([LaTeX])
  322     - `man` ([roff man])
  323     - `markdown` ([Pandoc's Markdown])
  324     - `markdown_mmd` ([MultiMarkdown])
  325     - `markdown_phpextra` ([PHP Markdown Extra])
  326     - `markdown_strict` (original unextended [Markdown])
  327     - `markua` ([Markua])
  328     - `mediawiki` ([MediaWiki markup])
  329     - `ms` ([roff ms])
  330     - `muse` ([Muse])
  331     - `native` (native Haskell)
  332     - `odt` ([OpenOffice text document][ODT])
  333     - `opml` ([OPML])
  334     - `opendocument` ([OpenDocument])
  335     - `org` ([Emacs Org mode])
  336     - `pdf` ([PDF])
  337     - `plain` (plain text)
  338     - `pptx` ([PowerPoint] slide show)
  339     - `rst` ([reStructuredText])
  340     - `rtf` ([Rich Text Format])
  341     - `texinfo` ([GNU Texinfo])
  342     - `textile` ([Textile])
  343     - `slideous` ([Slideous] HTML and JavaScript slide show)
  344     - `slidy` ([Slidy] HTML and JavaScript slide show)
  345     - `dzslides` ([DZSlides] HTML5 + JavaScript slide show)
  346     - `revealjs` ([reveal.js] HTML5 + JavaScript slide show)
  347     - `s5` ([S5] HTML and JavaScript slide show)
  348     - `tei` ([TEI Simple])
  349     - `typst` ([typst])
  350     - `xwiki` ([XWiki markup])
  351     - `zimwiki` ([ZimWiki markup])
  352     - the path of a custom Lua writer, see [Custom readers and writers] below
  353     :::
  354 
  355     Note that `odt`, `docx`, `epub`, and `pdf` output will not be directed
  356     to *stdout* unless forced with `-o -`.
  357 
  358     Extensions can be individually enabled or
  359     disabled by appending `+EXTENSION` or `-EXTENSION` to the format
  360     name.  See [Extensions] below, for a list of extensions and their
  361     names.  See `--list-output-formats` and `--list-extensions`, below.
  362 
  363 `-o` *FILE*, `--output=`*FILE*
  364 
  365 :   Write output to *FILE* instead of *stdout*.  If *FILE* is
  366     `-`, output will go to *stdout*, even if a non-textual format
  367     (`docx`, `odt`, `epub2`, `epub3`) is specified.  If the
  368     output format is `chunkedhtml` and *FILE* has no extension,
  369     then instead of producing a `.zip` file pandoc will create
  370     a directory *FILE* and unpack the zip archive there
  371     (unless *FILE* already exists, in which case an error
  372     will be raised).
  373 
  374 `--data-dir=`*DIRECTORY*
  375 
  376 :   Specify the user data directory to search for pandoc data files.
  377     If this option is not specified, the default user data directory
  378     will be used.  On \*nix and macOS systems this will be the `pandoc`
  379     subdirectory of the XDG data directory (by default,
  380     `$HOME/.local/share`, overridable by setting the `XDG_DATA_HOME`
  381     environment variable).  If that directory does not exist and
  382     `$HOME/.pandoc` exists, it will be used (for backwards compatibility).
  383     On Windows the default user data directory is `%APPDATA%\pandoc`.
  384     You can find the default user data directory on your system by
  385     looking at the output of `pandoc --version`.
  386     Data files placed in this directory (for example, `reference.odt`,
  387     `reference.docx`, `epub.css`, `templates`) will override
  388     pandoc's normal defaults.  (Note that the user data directory
  389     is not created by pandoc, so you will need to create it yourself
  390     if you want to make use of it.)
  391 
  392 `-d` *FILE*, `--defaults=`*FILE*
  393 
  394 :   Specify a set of default option settings.  *FILE* is a YAML
  395     file whose fields correspond to command-line option
  396     settings.  All options for document conversion, including input
  397     and output files, can be set using a defaults file.  The file will
  398     be searched for first in the working directory, and then in
  399     the `defaults` subdirectory of the user data directory
  400     (see `--data-dir`).  The `.yaml` extension may be omitted.
  401     See the section [Defaults files] for more information on the
  402     file format.  Settings from the defaults file may be
  403     overridden or extended by subsequent options on the command
  404     line.
  405 
  406 `--bash-completion`
  407 
  408 :   Generate a bash completion script.  To enable bash completion
  409     with pandoc, add this to your `.bashrc`:
  410 
  411         eval "$(pandoc --bash-completion)"
  412 
  413 `--verbose`
  414 
  415 :   Give verbose debugging output.
  416 
  417 `--quiet`
  418 
  419 :   Suppress warning messages.
  420 
  421 `--fail-if-warnings[=true|false]`
  422 
  423 :   Exit with error status if there are any warnings.
  424 
  425 `--log=`*FILE*
  426 
  427 :   Write log messages in machine-readable JSON format to
  428     *FILE*.  All messages above DEBUG level will be written,
  429     regardless of verbosity settings (`--verbose`, `--quiet`).
  430 
  431 `--list-input-formats`
  432 
  433 :   List supported input formats, one per line.
  434 
  435 `--list-output-formats`
  436 
  437 :   List supported output formats, one per line.
  438 
  439 `--list-extensions`[`=`*FORMAT*]
  440 
  441 :   List supported extensions for *FORMAT*, one per line, preceded
  442     by a `+` or `-` indicating whether it is enabled by default
  443     in *FORMAT*. If *FORMAT* is not specified, defaults for
  444     pandoc's Markdown are given.
  445 
  446 `--list-highlight-languages`
  447 
  448 :   List supported languages for syntax highlighting, one per
  449     line.
  450 
  451 `--list-highlight-styles`
  452 
  453 :   List supported styles for syntax highlighting, one per line.
  454     See `--highlight-style`.
  455 
  456 `-v`, `--version`
  457 
  458 :   Print version.
  459 
  460 `-h`, `--help`
  461 
  462 :   Show usage message.
  463 
  464 [Markdown]: https://daringfireball.net/projects/markdown/
  465 [CommonMark]: https://commonmark.org
  466 [PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/
  467 [GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/
  468 [MultiMarkdown]: https://fletcherpenney.net/multimarkdown/
  469 [reStructuredText]: https://docutils.sourceforge.io/docs/ref/rst/introduction.html
  470 [S5]: https://meyerweb.com/eric/tools/s5/
  471 [Slidy]: https://www.w3.org/Talks/Tools/Slidy2/
  472 [Slideous]: https://goessner.net/articles/slideous/
  473 [HTML]: https://www.w3.org/html/
  474 [HTML5]: https://html.spec.whatwg.org/
  475 [polyglot markup]: https://www.w3.org/TR/html-polyglot/
  476 [XHTML]: https://www.w3.org/TR/xhtml1/
  477 [LaTeX]: https://www.latex-project.org/
  478 [`beamer`]: https://ctan.org/pkg/beamer
  479 [Beamer User's Guide]: http://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf
  480 [ConTeXt]: https://www.contextgarden.net/
  481 [Rich Text Format]: https://en.wikipedia.org/wiki/Rich_Text_Format
  482 [DocBook]: https://docbook.org
  483 [JATS]: https://jats.nlm.nih.gov
  484 [BITS]: https://jats.nlm.nih.gov/extensions/bits/
  485 [Jira]: https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all
  486 [txt2tags]: https://txt2tags.org
  487 [EPUB]: http://idpf.org/epub
  488 [OPML]: http://dev.opml.org/spec2.html
  489 [OpenDocument]: http://opendocument.xml.org
  490 [ODT]: https://en.wikipedia.org/wiki/OpenDocument
  491 [Textile]: https://textile-lang.com
  492 [MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting
  493 [DokuWiki markup]: https://www.dokuwiki.org/dokuwiki
  494 [ZimWiki markup]: https://zim-wiki.org/manual/Help/Wiki_Syntax.html
  495 [XWiki markup]: https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/XWikiSyntax/
  496 [TWiki markup]: https://twiki.org/cgi-bin/view/TWiki/TextFormattingRules
  497 [TikiWiki markup]: https://doc.tiki.org/Wiki-Syntax-Text#The_Markup_Language_Wiki-Syntax
  498 [Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html
  499 [Creole 1.0]: http://www.wikicreole.org/wiki/Creole1.0
  500 [CSV]: https://tools.ietf.org/html/rfc4180
  501 [TSV]: https://www.iana.org/assignments/media-types/text/tab-separated-values
  502 [roff man]: https://man.cx/groff_man(7)
  503 [roff ms]: https://man.cx/groff_ms(7)
  504 [Haskell]: https://www.haskell.org
  505 [GNU Texinfo]: https://www.gnu.org/software/texinfo/
  506 [RIS]: https://en.wikipedia.org/wiki/RIS_(file_format)
  507 [Emacs Org mode]: https://orgmode.org
  508 [AsciiDoc]: https://www.methods.co.nz/asciidoc/
  509 [AsciiDoctor]: https://asciidoctor.org/
  510 [`asciidoc-py`]: https://github.com/asciidoc-py/asciidoc-py
  511 [DZSlides]: https://paulrouget.com/dzslides/
  512 [Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML
  513 [PDF]: https://www.adobe.com/pdf/
  514 [reveal.js]: https://revealjs.com/
  515 [FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
  516 [Jupyter notebook]: https://nbformat.readthedocs.io/en/latest/
  517 [InDesign ICML]: https://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf
  518 [TEI Simple]: https://github.com/TEIC/TEI-Simple
  519 [Muse]: https://amusewiki.org/library/manual
  520 [PowerPoint]: https://en.wikipedia.org/wiki/Microsoft_PowerPoint
  521 [Vimwiki]: https://vimwiki.github.io
  522 [CSL JSON]: https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html
  523 [BibTeX]: https://ctan.org/pkg/bibtex
  524 [BibLaTeX]: https://ctan.org/pkg/biblatex
  525 [Markua]: https://leanpub.com/markua/read
  526 [EndNote XML bibliography]: https://support.clarivate.com/Endnote/s/article/EndNote-XML-Document-Type-Definition
  527 [typst]: https://typst.app
  528 
  529 ## Reader options {.options}
  530 
  531 `--shift-heading-level-by=`*NUMBER*
  532 
  533 :   Shift heading levels by a positive or negative integer.
  534     For example, with `--shift-heading-level-by=-1`, level 2
  535     headings become level 1 headings, and level 3 headings
  536     become level 2 headings.  Headings cannot have a level
  537     less than 1, so a heading that would be shifted below level 1
  538     becomes a regular paragraph.  Exception: with a shift of -N,
  539     a level-N heading at the beginning of the document
  540     replaces the metadata title. `--shift-heading-level-by=-1`
  541     is a good choice when converting HTML or Markdown documents that
  542     use an initial level-1 heading for the document title and
  543     level-2+ headings for sections. `--shift-heading-level-by=1`
  544     may be a good choice for converting Markdown documents that
  545     use level-1 headings for sections to HTML, since pandoc uses
  546     a level-1 heading to render the document title.
  547 
  548 `--base-header-level=`*NUMBER*
  549 
  550 :   *Deprecated.  Use `--shift-heading-level-by`=X instead,
  551     where X = NUMBER - 1.* Specify the base level for headings
  552     (defaults to 1).
  553 
  554 `--indented-code-classes=`*CLASSES*
  555 
  556 :   Specify classes to use for indented code blocks--for example,
  557     `perl,numberLines` or `haskell`. Multiple classes may be separated
  558     by spaces or commas.
  559 
  560 `--default-image-extension=`*EXTENSION*
  561 
  562 :   Specify a default extension to use when image paths/URLs have no
  563     extension.  This allows you to use the same source for formats that
  564     require different kinds of images.  Currently this option only affects
  565     the Markdown and LaTeX readers.
  566 
  567 `--file-scope[=true|false]`
  568 
  569 :   Parse each file individually before combining for multifile
  570     documents. This will allow footnotes in different files with the
  571     same identifiers to work as expected. If this option is set,
  572     footnotes and links will not work across files. Reading binary
  573     files (docx, odt, epub) implies `--file-scope`.
  574 
  575     If two or more files are processed using `--file-scope`,
  576     prefixes based on the filenames will be added to identifiers
  577     in order to disambiguate them, and internal links will
  578     be adjusted accordingly.  For example, a header with
  579     identifier `foo` in `subdir/file1.txt` will have its
  580     identifier changed to `subdir__file1.txt__foo`.
  581 
  582     In addition, a Div with an identifier based on the filename
  583     will be added around the file's content, so that internal
  584     links to the filename will point to this Div's identifier.
  585 
  586 `-F` *PROGRAM*, `--filter=`*PROGRAM*
  587 
  588 :   Specify an executable to be used as a filter transforming the
  589     pandoc AST after the input is parsed and before the output is
  590     written.  The executable should read JSON from stdin and write
  591     JSON to stdout.  The JSON must be formatted like  pandoc's own
  592     JSON input and output.  The name of the output format will be
  593     passed to the filter as the first argument.  Hence,
  594 
  595         pandoc --filter ./caps.py -t latex
  596 
  597     is equivalent to
  598 
  599         pandoc -t json | ./caps.py latex | pandoc -f json -t latex
  600 
  601     The latter form may be useful for debugging filters.
  602 
  603     Filters may be written in any language.  `Text.Pandoc.JSON`
  604     exports `toJSONFilter` to facilitate writing filters in Haskell.
  605     Those who would prefer to write filters in python can use the
  606     module [`pandocfilters`], installable from PyPI. There are also
  607     pandoc filter libraries in [PHP], [perl], and
  608     [JavaScript/node.js].
  609 
  610     In order of preference, pandoc will look for filters in
  611 
  612      1. a specified full or relative path (executable or
  613      non-executable),
  614 
  615      2. `$DATADIR/filters` (executable or non-executable)
  616      where `$DATADIR` is the user data directory (see
  617      `--data-dir`, above),
  618 
  619      3. `$PATH` (executable only).
  620 
  621     Filters, Lua-filters, and citeproc processing are applied in
  622     the order specified on the command line.
  623 
  624 `-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
  625 
  626 :   Transform the document in a similar fashion as JSON filters (see
  627     `--filter`), but use pandoc's built-in Lua filtering system.  The given
  628     Lua script is expected to return a list of Lua filters which will be
  629     applied in order.  Each Lua filter must contain element-transforming
  630     functions indexed by the name of the AST element on which the filter
  631     function should be applied.
  632 
  633     The `pandoc` Lua module provides helper functions for element
  634     creation.  It is always loaded into the script's Lua environment.
  635 
  636     See the [Lua filters documentation] for further details.
  637 
  638     In order of preference, pandoc will look for Lua filters in
  639 
  640      1. a specified full or relative path,
  641 
  642      2. `$DATADIR/filters` where `$DATADIR` is the user data
  643      directory (see `--data-dir`, above).
  644 
  645     Filters, Lua filters, and citeproc processing are applied in
  646     the order specified on the command line.
  647 
  648 `-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
  649 
  650 :   Set the metadata field *KEY* to the value *VAL*.  A value specified
  651     on the command line overrides a value specified in the document
  652     using [YAML metadata blocks][Extension: `yaml_metadata_block`].
  653     Values will be parsed as YAML boolean or string values. If no value is
  654     specified, the value will be treated as Boolean true.  Like
  655     `--variable`, `--metadata` causes template variables to be set.
  656     But unlike `--variable`, `--metadata` affects the metadata of the
  657     underlying document (which is accessible from filters and may be
  658     printed in some output formats) and metadata values will be escaped
  659     when inserted into the template.
  660 
  661 `--metadata-file=`*FILE*
  662 
  663 :   Read metadata from the supplied YAML (or JSON) file. This
  664     option can be used with every input format, but string scalars
  665     in the metadata file will always be parsed as Markdown. (If the
  666     input format is Markdown or a Markdown variant, then the
  667     same variant will be used to parse the metadata file;
  668     if it is a non-Markdown format, pandoc's default Markdown
  669     extensions will be used.) This option can be used
  670     repeatedly to include multiple metadata files; values in
  671     files specified later on the command line will be preferred
  672     over those specified in earlier files. Metadata values
  673     specified inside the document, or by using `-M`, overwrite
  674     values specified with this option. The file will be searched
  675     for first in the working directory, and then in the `metadata`
  676     subdirectory of the user data directory (see `--data-dir`).
  677 
  678 `-p`, `--preserve-tabs[=true|false]`
  679 
  680 :   Preserve tabs instead of converting them to spaces. (By default, pandoc
  681     converts tabs to spaces before parsing its input.)  Note that this will
  682     only affect tabs in literal code spans and code blocks. Tabs in regular
  683     text are always treated as spaces.
  684 
  685 `--tab-stop=`*NUMBER*
  686 
  687 :   Specify the number of spaces per tab (default is 4).
  688 
  689 `--track-changes=accept`|`reject`|`all`
  690 
  691 :   Specifies what to do with insertions, deletions, and comments
  692     produced by the MS Word "Track Changes" feature.  `accept` (the
  693     default) processes all the insertions and deletions.
  694     `reject` ignores them.  Both `accept` and `reject` ignore comments.
  695     `all` includes all insertions, deletions, and comments, wrapped
  696     in spans with `insertion`, `deletion`, `comment-start`, and
  697     `comment-end` classes, respectively. The author and time of
  698     change is included. `all` is useful for scripting: only
  699     accepting changes from a certain reviewer, say, or before a
  700     certain date. If a paragraph is inserted or deleted,
  701     `track-changes=all` produces a span with the class
  702     `paragraph-insertion`/`paragraph-deletion` before the
  703     affected paragraph break. This option only affects the docx
  704     reader.
  705 
  706 `--extract-media=`*DIR*
  707 
  708 :   Extract images and other media contained in or linked from
  709     the source document to the path *DIR*, creating it if
  710     necessary, and adjust the images references in the document
  711     so they point to the extracted files.  Media are downloaded,
  712     read from the file system, or extracted from a binary
  713     container (e.g. docx), as needed.  The original file paths
  714     are used if they are relative paths not containing `..`.
  715     Otherwise filenames are constructed from the SHA1 hash of
  716     the contents.
  717 
  718 `--abbreviations=`*FILE*
  719 
  720 :   Specifies a custom abbreviations file, with abbreviations
  721     one to a line.  If this option is not specified, pandoc will
  722     read the data file `abbreviations` from the user data
  723     directory or fall back on a system default.  To see the
  724     system default, use
  725     `pandoc --print-default-data-file=abbreviations`.  The only
  726     use pandoc makes of this list is in the Markdown reader.
  727     Strings found in this list will be followed by a nonbreaking
  728     space, and the period will not produce sentence-ending space
  729     in formats like LaTeX.  The strings may not contain spaces.
  730 
  731 `--trace[=true|false]`
  732 
  733 :   Print diagnostic output tracing parser progress to stderr.
  734     This option is intended for use by developers in diagnosing
  735     performance issues.
  736 
  737 [`pandocfilters`]: https://github.com/jgm/pandocfilters
  738 [PHP]: https://github.com/vinai/pandocfilters-php
  739 [perl]: https://metacpan.org/pod/Pandoc::Filter
  740 [JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
  741 [Lua filters documentation]: https://pandoc.org/lua-filters.html
  742 
  743 ## General writer options {.options}
  744 
  745 `-s`, `--standalone`
  746 
  747 :   Produce output with an appropriate header and footer (e.g. a
  748     standalone HTML, LaTeX, TEI, or RTF file, not a fragment).  This option
  749     is set automatically for `pdf`, `epub`, `epub3`, `fb2`, `docx`, and `odt`
  750     output.  For `native` output, this option causes metadata to
  751     be included; otherwise, metadata is suppressed.
  752 
  753 `--template=`*FILE*|*URL*
  754 
  755 :   Use the specified file as a custom template for the generated document.
  756     Implies `--standalone`. See [Templates], below, for a description
  757     of template syntax. If no extension is specified, an extension
  758     corresponding to the writer will be added, so that `--template=special`
  759     looks for `special.html` for HTML output.  If the template is not
  760     found, pandoc will search for it in the `templates` subdirectory of
  761     the user data directory (see `--data-dir`). If this option is not used,
  762     a default template appropriate for the output format will be used (see
  763     `-D/--print-default-template`).
  764 
  765 `-V` *KEY*[`=`*VAL*], `--variable=`*KEY*[`:`*VAL*]
  766 
  767 :   Set the template variable *KEY* to the value *VAL* when rendering the
  768     document in standalone mode. If no *VAL* is specified, the
  769     key will be given the value `true`.
  770 
  771 `--sandbox[=true|false]`
  772 
  773 :   Run pandoc in a sandbox, limiting IO operations in readers
  774     and writers to reading the files specified on the command line.
  775     Note that this option does not limit IO operations by
  776     filters or in the production of PDF documents.  But it does
  777     offer security against, for example, disclosure of files
  778     through the use of `include` directives.  Anyone using
  779     pandoc on untrusted user input should use this option.
  780 
  781     Note: some readers and writers (e.g., `docx`) need access to data
  782     files.  If these are stored on the file system, then pandoc
  783     will not be able to find them when run in `--sandbox` mode
  784     and will raise an error. For these applications, we
  785     recommend using a pandoc binary compiled with the `embed_data_files`
  786     option, which causes the data files to be baked into the binary
  787     instead of being stored on the file system.
  788 
  789 `-D` *FORMAT*, `--print-default-template=`*FORMAT*
  790 
  791 :   Print the system default template for an output *FORMAT*. (See `-t`
  792     for a list of possible *FORMAT*s.)  Templates in the user data
  793     directory are ignored.  This option may be used with
  794     `-o`/`--output` to redirect output to a file, but
  795     `-o`/`--output` must come before `--print-default-template`
  796     on the command line.
  797 
  798     Note that some of the default templates use partials, for
  799     example `styles.html`.  To print the partials, use
  800     `--print-default-data-file`: for example,
  801     `--print-default-data-file=templates/styles.html`.
  802 
  803 `--print-default-data-file=`*FILE*
  804 
  805 :   Print a system default data file.  Files in the user data directory
  806     are ignored.  This option may be used with `-o`/`--output` to
  807     redirect output to a file, but `-o`/`--output` must come before
  808     `--print-default-data-file` on the command line.
  809 
  810 `--eol=crlf`|`lf`|`native`
  811 
  812 :   Manually specify line endings: `crlf` (Windows), `lf`
  813     (macOS/Linux/UNIX), or `native` (line endings appropriate
  814     to the OS on which pandoc is being run).  The default is
  815     `native`.
  816 
  817 `--dpi`=*NUMBER*
  818 
  819 :   Specify the default dpi (dots per inch) value for conversion
  820     from pixels to inch/centimeters and vice versa. (Technically,
  821     the correct term would be ppi: pixels per inch.) The default
  822     is 96dpi.   When images contain information about dpi
  823     internally, the encoded value is used instead of the default
  824     specified by this option.
  825 
  826 `--wrap=auto`|`none`|`preserve`
  827 
  828 :   Determine how text is wrapped in the output (the source
  829     code, not the rendered version).  With `auto` (the default),
  830     pandoc will attempt to wrap lines to the column width specified by
  831     `--columns` (default 72).  With `none`, pandoc will not wrap
  832     lines at all.  With `preserve`, pandoc will attempt to
  833     preserve the wrapping from the source document (that is,
  834     where there are nonsemantic newlines in the source, there
  835     will be nonsemantic newlines in the output as well).
  836     In `ipynb` output, this option affects wrapping of the
  837     contents of markdown cells.
  838 
  839 `--columns=`*NUMBER*
  840 
  841 :   Specify length of lines in characters.  This affects text wrapping
  842     in the generated source code (see `--wrap`).  It also affects
  843     calculation of column widths for plain text tables (see [Tables] below).
  844 
  845 `--toc[=true|false]`, `--table-of-contents[=true|false]`
  846 
  847 :   Include an automatically generated table of contents (or, in
  848     the case of `latex`, `context`, `docx`, `odt`,
  849     `opendocument`, `rst`, or `ms`, an instruction to create
  850     one) in the output document. This option has no effect
  851     unless `-s/--standalone` is used, and it has no effect
  852     on `man`, `docbook4`, `docbook5`, or `jats` output.
  853 
  854     Note that if you are producing a PDF via `ms`, the table
  855     of contents will appear at the beginning of the
  856     document, before the title.  If you would prefer it to
  857     be at the end of the document, use the option
  858     `--pdf-engine-opt=--no-toc-relocation`.
  859 
  860 `--toc-depth=`*NUMBER*
  861 
  862 :   Specify the number of section levels to include in the table
  863     of contents.  The default is 3 (which means that level-1, 2, and 3
  864     headings will be listed in the contents).
  865 
  866 `--strip-comments[=true|false]`
  867 
  868 :   Strip out HTML comments in the Markdown or Textile source,
  869     rather than passing them on to Markdown, Textile or HTML
  870     output as raw HTML.  This does not apply to HTML comments
  871     inside raw HTML blocks when the `markdown_in_html_blocks`
  872     extension is not set.
  873 
  874 `--no-highlight`
  875 
  876 :   Disables syntax highlighting for code blocks and inlines, even when
  877     a language attribute is given.
  878 
  879 `--highlight-style=`*STYLE*|*FILE*
  880 
  881 :   Specifies the coloring style to be used in highlighted source code.
  882     Options are `pygments` (the default), `kate`, `monochrome`,
  883     `breezeDark`, `espresso`, `zenburn`, `haddock`, and `tango`.
  884     For more information on syntax highlighting in pandoc, see
  885     [Syntax highlighting], below.  See also
  886     `--list-highlight-styles`.
  887 
  888     Instead of a *STYLE* name, a JSON file with extension
  889     `.theme` may be supplied.  This will be parsed as a KDE
  890     syntax highlighting theme and (if valid) used as the
  891     highlighting style.
  892 
  893     To generate the JSON version of an existing style,
  894     use `--print-highlight-style`.
  895 
  896 `--print-highlight-style=`*STYLE*|*FILE*
  897 
  898 :   Prints a JSON version of a highlighting style, which can
  899     be modified, saved with a `.theme` extension, and used
  900     with `--highlight-style`.  This option may be used with
  901     `-o`/`--output` to redirect output to a file, but
  902     `-o`/`--output` must come before `--print-highlight-style`
  903     on the command line.
  904 
  905 `--syntax-definition=`*FILE*
  906 
  907 :   Instructs pandoc to load a KDE XML syntax definition file,
  908     which will be used for syntax highlighting of appropriately
  909     marked code blocks.  This can be used to add support for
  910     new languages or to use altered syntax definitions for
  911     existing languages.  This option may be repeated to add
  912     multiple syntax definitions.
  913 
  914 `-H` *FILE*, `--include-in-header=`*FILE*|*URL*
  915 
  916 :   Include contents of *FILE*, verbatim, at the end of the header.
  917     This can be used, for example, to include special
  918     CSS or JavaScript in HTML documents.  This option can be used
  919     repeatedly to include multiple files in the header.  They will be
  920     included in the order specified.  Implies `--standalone`.
  921 
  922 `-B` *FILE*, `--include-before-body=`*FILE*|*URL*
  923 
  924 :   Include contents of *FILE*, verbatim, at the beginning of the
  925     document body (e.g. after the `<body>` tag in HTML, or the
  926     `\begin{document}` command in LaTeX). This can be used to include
  927     navigation bars or banners in HTML documents. This option can be
  928     used repeatedly to include multiple files. They will be included in
  929     the order specified.  Implies `--standalone`.
  930 
  931 `-A` *FILE*, `--include-after-body=`*FILE*|*URL*
  932 
  933 :   Include contents of *FILE*, verbatim, at the end of the document
  934     body (before the `</body>` tag in HTML, or the
  935     `\end{document}` command in LaTeX). This option can be used
  936     repeatedly to include multiple files. They will be included in the
  937     order specified.  Implies `--standalone`.
  938 
  939 `--resource-path=`*SEARCHPATH*
  940 
  941 :   List of paths to search for images and other resources.
  942     The paths should be separated by `:` on Linux, UNIX, and
  943     macOS systems, and by `;` on Windows.  If `--resource-path`
  944     is not specified, the default resource path is the working
  945     directory. Note that, if `--resource-path` is specified,
  946     the working directory must be explicitly listed or it
  947     will not be searched.  For example:
  948     `--resource-path=.:test` will search the working directory
  949     and the `test` subdirectory, in that order.
  950     This option can be used repeatedly. Search path components
  951     that come later on the command line will be searched before
  952     those that come earlier, so
  953     `--resource-path foo:bar --resource-path baz:bim` is
  954     equivalent to `--resource-path baz:bim:foo:bar`.
  955 
  956 `--request-header=`*NAME*`:`*VAL*
  957 
  958 :   Set the request header *NAME* to the value *VAL* when making
  959     HTTP requests (for example, when a URL is given on the
  960     command line, or when resources used in a document must be
  961     downloaded). If you're behind a proxy, you also need to set
  962     the environment variable `http_proxy` to `http://...`.
  963 
  964 `--no-check-certificate[=true|false]`
  965 
  966 :   Disable the certificate verification to allow access to
  967     unsecure HTTP resources (for example when the certificate
  968     is no longer valid or self signed).
  969 
  970 ## Options affecting specific writers {.options}
  971 
  972 `--self-contained[=true|false]`
  973 
  974 :   *Deprecated synonym for `--embed-resources --standalone`.*
  975 
  976 `--embed-resources[=true|false]`
  977 
  978 :   Produce a standalone HTML file with no external dependencies, using
  979     `data:` URIs to incorporate the contents of linked scripts, stylesheets,
  980     images, and videos. The resulting file should be "self-contained," in the
  981     sense that it needs no external files and no net access to be displayed
  982     properly by a browser. This option works only with HTML output formats,
  983     including `html4`, `html5`, `html+lhs`, `html5+lhs`, `s5`, `slidy`,
  984     `slideous`, `dzslides`, and `revealjs`. Scripts, images, and stylesheets at
  985     absolute URLs will be downloaded; those at relative URLs will be sought
  986     relative to the working directory (if the first source
  987     file is local) or relative to the base URL (if the first source
  988     file is remote).  Elements with the attribute
  989     `data-external="1"` will be left alone; the documents they
  990     link to will not be incorporated in the document.
  991     Limitation: resources that are loaded dynamically through
  992     JavaScript cannot be incorporated; as a result, fonts may
  993     be missing when `--mathjax` is used, and some
  994     advanced features (e.g.  zoom or speaker notes) may not work
  995     in an offline "self-contained" `reveal.js` slide show.
  996 
  997 `--html-q-tags[=true|false]`
  998 
  999 :   Use `<q>` tags for quotes in HTML.  (This option only has an
 1000     effect if the `smart` extension is enabled for the input
 1001     format used.)
 1002 
 1003 `--ascii[=true|false]`
 1004 
 1005 :   Use only ASCII characters in output. Currently supported for XML
 1006     and HTML formats (which use entities instead of UTF-8 when this
 1007     option is selected), CommonMark, gfm, and Markdown (which use
 1008     entities), roff man and ms (which use hexadecimal escapes), and to a
 1009     limited degree LaTeX (which uses standard commands for accented
 1010     characters when possible).
 1011 
 1012 `--reference-links[=true|false]`
 1013 
 1014 :   Use reference-style links, rather than inline links, in writing Markdown
 1015     or reStructuredText.  By default inline links are used.  The
 1016     placement of link references is affected by the
 1017     `--reference-location` option.
 1018 
 1019 `--reference-location=block`|`section`|`document`
 1020 
 1021 :   Specify whether footnotes (and references, if `reference-links` is
 1022     set) are placed at the end of the current (top-level) block, the
 1023     current section, or the document. The default is
 1024     `document`. Currently this option only affects the
 1025     `markdown`, `muse`, `html`, `epub`, `slidy`, `s5`, `slideous`,
 1026     `dzslides`, and `revealjs` writers.  In slide formats,
 1027     specifying `--reference-location=section` will cause notes
 1028     to be rendered at the bottom of a slide.
 1029 
 1030 `--markdown-headings=setext`|`atx`
 1031 
 1032 :   Specify whether to use ATX-style (`#`-prefixed) or
 1033     Setext-style (underlined) headings for level 1 and 2
 1034     headings in Markdown output.  (The default is `atx`.)
 1035     ATX-style headings are always used for levels 3+.
 1036     This option also affects Markdown cells in `ipynb` output.
 1037 
 1038 `--list-tables[=true|false]`
 1039 
 1040 :   Render tables as list tables in RST output.
 1041 
 1042 `--top-level-division=default`|`section`|`chapter`|`part`
 1043 
 1044 :   Treat top-level headings as the given division type in
 1045     LaTeX, ConTeXt, DocBook, and  TEI output. The hierarchy
 1046     order is part, chapter, then section; all headings are
 1047     shifted such that the top-level heading becomes the
 1048     specified type. The default behavior is to determine the
 1049     best division type via heuristics: unless other conditions
 1050     apply, `section` is chosen. When the `documentclass`
 1051     variable is set to `report`, `book`, or `memoir` (unless the
 1052     `article` option is specified), `chapter` is implied as the
 1053     setting for this option. If `beamer` is the output format,
 1054     specifying either `chapter` or `part` will cause top-level
 1055     headings to become `\part{..}`, while second-level headings
 1056     remain as their default type.
 1057 
 1058 `-N`, `--number-sections`
 1059 
 1060 :   Number section headings in LaTeX, ConTeXt, HTML, Docx, ms, or EPUB
 1061     output.  By default, sections are not numbered.  Sections with class
 1062     `unnumbered` will never be numbered, even if `--number-sections`
 1063     is specified.
 1064 
 1065 `--number-offset=`*NUMBER*[`,`*NUMBER*`,`*...*]
 1066 
 1067 :   Offset for section headings in HTML output (ignored in other
 1068     output formats).  The first number is added to the section number for
 1069     top-level headings, the second for second-level headings, and so on.
 1070     So, for example, if you want the first top-level heading in your
 1071     document to be numbered "6", specify `--number-offset=5`.
 1072     If your document starts with a level-2 heading which you want to
 1073     be numbered "1.5", specify `--number-offset=1,4`.
 1074     Offsets are 0 by default.  Implies `--number-sections`.
 1075 
 1076 `--listings[=true|false]`
 1077 
 1078 :   Use the [`listings`] package for LaTeX code blocks. The package
 1079     does not support multi-byte encoding for source code. To handle UTF-8
 1080     you would need to use a custom template. This issue is fully
 1081     documented here: [Encoding issue with the listings package].
 1082 
 1083 `-i`, `--incremental[=true|false]`
 1084 
 1085 :   Make list items in slide shows display incrementally (one by one).
 1086     The default is for lists to be displayed all at once.
 1087 
 1088 `--slide-level=`*NUMBER*
 1089 
 1090 :   Specifies that headings with the specified level create
 1091     slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`).  Headings
 1092     above this level in the hierarchy are used to divide the slide show
 1093     into sections; headings below this level create subheads within a slide.
 1094     Valid values are 0-6.  If a slide level of 0 is specified, slides will
 1095     not be split automatically on headings, and horizontal rules must be used
 1096     to indicate slide boundaries.  If a slide level is not specified
 1097     explicitly, the slide level will be set automatically based on
 1098     the contents of the document; see [Structuring the slide show].
 1099 
 1100 `--section-divs[=true|false]`
 1101 
 1102 :   Wrap sections in `<section>` tags (or `<div>` tags for `html4`),
 1103     and attach identifiers to the enclosing `<section>` (or `<div>`)
 1104     rather than the heading itself (see
 1105     [Heading identifiers], below). This option only affects
 1106     HTML output (and does not affect HTML slide formats).
 1107 
 1108 `--email-obfuscation=none`|`javascript`|`references`
 1109 
 1110 :   Specify a method for obfuscating `mailto:` links in HTML documents.
 1111     `none` leaves `mailto:` links as they are.  `javascript` obfuscates
 1112     them using JavaScript. `references` obfuscates them by printing their
 1113     letters as decimal or hexadecimal character references.  The default
 1114     is `none`.
 1115 
 1116 `--id-prefix=`*STRING*
 1117 
 1118 :   Specify a prefix to be added to all identifiers and internal links
 1119     in HTML and DocBook output, and to footnote numbers in Markdown
 1120     and Haddock output. This is useful for preventing duplicate
 1121     identifiers when generating fragments to be included in other pages.
 1122 
 1123 `-T` *STRING*, `--title-prefix=`*STRING*
 1124 
 1125 :   Specify *STRING* as a prefix at the beginning of the title
 1126     that appears in the HTML header (but not in the title as it
 1127     appears at the beginning of the HTML body).  Implies `--standalone`.
 1128 
 1129 `-c` *URL*, `--css=`*URL*
 1130 
 1131 :   Link to a CSS style sheet. This option can be used repeatedly to
 1132     include multiple files. They will be included in the order specified.
 1133     This option only affects HTML (including HTML slide shows)
 1134     and EPUB output.  It should be used together with
 1135     `-s/--standalone`, because the link to the stylesheet goes
 1136     in the document header.
 1137 
 1138     A stylesheet is required for generating EPUB.  If none is
 1139     provided using this option (or the `css` or `stylesheet`
 1140     metadata fields), pandoc will look for a file `epub.css` in the
 1141     user data directory (see `--data-dir`).  If it is not
 1142     found there, sensible defaults will be used.
 1143 
 1144 `--reference-doc=`*FILE*|*URL*
 1145 
 1146 :   Use the specified file as a style reference in producing a
 1147     docx or ODT file.
 1148 
 1149     Docx
 1150 
 1151     :   For best results, the reference docx should be a modified
 1152         version of a docx file produced using pandoc.  The contents
 1153         of the reference docx are ignored, but its stylesheets and
 1154         document properties (including margins, page size, header,
 1155         and footer) are used in the new docx. If no reference docx
 1156         is specified on the command line, pandoc will look for a
 1157         file `reference.docx` in the user data directory (see
 1158         `--data-dir`). If this is not found either, sensible
 1159         defaults will be used.
 1160 
 1161         To produce a custom `reference.docx`, first get a copy of
 1162         the default `reference.docx`: `pandoc
 1163         -o custom-reference.docx --print-default-data-file reference.docx`.
 1164         Then open `custom-reference.docx` in Word, modify the
 1165         styles as you wish, and save the file.  For best
 1166         results, do not make changes to this file other than
 1167         modifying the styles used by pandoc:
 1168 
 1169         Paragraph styles:
 1170 
 1171         - Normal
 1172         - Body Text
 1173         - First Paragraph
 1174         - Compact
 1175         - Title
 1176         - Subtitle
 1177         - Author
 1178         - Date
 1179         - Abstract
 1180         - AbstractTitle
 1181         - Bibliography
 1182         - Heading 1
 1183         - Heading 2
 1184         - Heading 3
 1185         - Heading 4
 1186         - Heading 5
 1187         - Heading 6
 1188         - Heading 7
 1189         - Heading 8
 1190         - Heading 9
 1191         - Block Text
 1192         - Source Code
 1193         - Footnote Text
 1194         - Definition Term
 1195         - Definition
 1196         - Caption
 1197         - Table Caption
 1198         - Image Caption
 1199         - Figure
 1200         - Captioned Figure
 1201         - TOC Heading
 1202 
 1203         Character styles:
 1204 
 1205         - Default Paragraph Font
 1206         - Body Text Char
 1207         - Verbatim Char
 1208         - Footnote Reference
 1209         - Hyperlink
 1210         - Section Number
 1211 
 1212         Table style:
 1213 
 1214         - Table
 1215 
 1216     ODT
 1217 
 1218     :   For best results, the reference ODT should be a modified
 1219         version of an ODT produced using pandoc.  The contents of
 1220         the reference ODT are ignored, but its stylesheets are used
 1221         in the new ODT. If no reference ODT is specified on the
 1222         command line, pandoc will look for a file `reference.odt` in
 1223         the user data directory (see `--data-dir`). If this is not
 1224         found either, sensible defaults will be used.
 1225 
 1226         To produce a custom `reference.odt`, first get a copy of
 1227         the default `reference.odt`: `pandoc
 1228         -o custom-reference.odt --print-default-data-file reference.odt`.
 1229         Then open `custom-reference.odt` in LibreOffice, modify
 1230         the styles as you wish, and save the file.
 1231 
 1232     PowerPoint
 1233 
 1234     :   Templates included with Microsoft PowerPoint 2013 (either with
 1235         `.pptx` or `.potx` extension) are known to work, as are most
 1236         templates derived from these.
 1237 
 1238         The specific requirement is that the template should contain layouts
 1239         with the following names (as seen within PowerPoint):
 1240 
 1241         - Title Slide
 1242         - Title and Content
 1243         - Section Header
 1244         - Two Content
 1245         - Comparison
 1246         - Content with Caption
 1247         - Blank
 1248 
 1249         For each name, the first layout found with that name will be used.
 1250         If no layout is found with one of the names, pandoc will output a
 1251         warning and use the layout with that name from the default reference
 1252         doc instead. (How these layouts are used is described in [PowerPoint
 1253         layout choice](#powerpoint-layout-choice).)
 1254 
 1255         All templates included with a recent version of MS PowerPoint
 1256         will fit these criteria. (You can click on `Layout` under the
 1257         `Home` menu to check.)
 1258 
 1259         You can also modify the default `reference.pptx`: first run
 1260         `pandoc -o custom-reference.pptx --print-default-data-file
 1261         reference.pptx`, and then modify `custom-reference.pptx`
 1262         in MS PowerPoint (pandoc will use the layouts with the names
 1263         listed above).
 1264 
 1265 `--split-level=`*NUMBER*
 1266 
 1267 :   Specify the heading level at which to split an EPUB or
 1268     chunked HTML document into separate files. The default is to split
 1269     into chapters at level-1 headings. In the case of EPUB, this
 1270     option only affects the internal composition of the EPUB, not the way
 1271     chapters and sections are displayed to users. Some
 1272     readers may be slow if the chapter files are too large, so for large
 1273     documents with few level-1 headings, one might want to use a chapter
 1274     level of 2 or 3. For chunked HTML, this option determines
 1275     how much content goes in each "chunk."
 1276 
 1277 `--chunk-template=`*PATHTEMPLATE*
 1278 
 1279 :   Specify a template for the filenames in a `chunkedhtml` document.
 1280     In the template, `%n` will be replaced by the chunk number (padded
 1281     with leading 0s to 3 digits), `%s` with the section number of the chunk,
 1282     `%h` with the heading text (with formatting removed), `%i` with
 1283     the section identifier. For example, `%section-%s-%i.html` might
 1284     be resolved to `section-1.1-introduction.html`. The characters
 1285     `/` and `\` are not allowed in chunk templates and will be
 1286     ignored. The default is `%s-%i.html`.
 1287 
 1288 `--epub-chapter-level=`*NUMBER*
 1289 
 1290 :   *Deprecated synonym for `--split-level`.*
 1291 
 1292 `--epub-cover-image=`*FILE*
 1293 
 1294 :   Use the specified image as the EPUB cover.  It is recommended
 1295     that the image be less than 1000px in width and height. Note that
 1296     in a Markdown source document you can also specify `cover-image`
 1297     in a YAML metadata block (see [EPUB Metadata], below).
 1298 
 1299 `--epub-title-page=true`|`false`
 1300 
 1301 :   Determines whether a the title page is included in the EPUB
 1302     (default is `true`).
 1303 
 1304 `--epub-metadata=`*FILE*
 1305 
 1306 :   Look in the specified XML file for metadata for the EPUB.
 1307     The file should contain a series of [Dublin Core elements].
 1308     For example:
 1309 
 1310          <dc:rights>Creative Commons</dc:rights>
 1311          <dc:language>es-AR</dc:language>
 1312 
 1313     By default, pandoc will include the following metadata elements:
 1314     `<dc:title>` (from the document title), `<dc:creator>` (from the
 1315     document authors), `<dc:date>` (from the document date, which should
 1316     be in [ISO 8601 format]), `<dc:language>` (from the `lang`
 1317     variable, or, if is not set, the locale), and `<dc:identifier
 1318     id="BookId">` (a randomly generated UUID). Any of these may be
 1319     overridden by elements in the metadata file.
 1320 
 1321     Note: if the source document is Markdown, a YAML metadata block
 1322     in the document can be used instead.  See below under
 1323     [EPUB Metadata].
 1324 
 1325 `--epub-embed-font=`*FILE*
 1326 
 1327 :   Embed the specified font in the EPUB. This option can be repeated
 1328     to embed multiple fonts.  Wildcards can also be used: for example,
 1329     `DejaVuSans-*.ttf`.  However, if you use wildcards on the command
 1330     line, be sure to escape them or put the whole filename in single quotes,
 1331     to prevent them from being interpreted by the shell. To use the
 1332     embedded fonts, you will need to add declarations like the following
 1333     to your CSS (see `--css`):
 1334 
 1335         @font-face {
 1336            font-family: DejaVuSans;
 1337            font-style: normal;
 1338            font-weight: normal;
 1339            src:url("../fonts/DejaVuSans-Regular.ttf");
 1340         }
 1341         @font-face {
 1342            font-family: DejaVuSans;
 1343            font-style: normal;
 1344            font-weight: bold;
 1345            src:url("../fonts/DejaVuSans-Bold.ttf");
 1346         }
 1347         @font-face {
 1348            font-family: DejaVuSans;
 1349            font-style: italic;
 1350            font-weight: normal;
 1351            src:url("../fonts/DejaVuSans-Oblique.ttf");
 1352         }
 1353         @font-face {
 1354            font-family: DejaVuSans;
 1355            font-style: italic;
 1356            font-weight: bold;
 1357            src:url("../fonts/DejaVuSans-BoldOblique.ttf");
 1358         }
 1359         body { font-family: "DejaVuSans"; }
 1360 
 1361 `--epub-subdirectory=`*DIRNAME*
 1362 
 1363 :   Specify the subdirectory in the OCF container that is to hold
 1364     the EPUB-specific contents.  The default is `EPUB`.  To put
 1365     the EPUB contents in the top level, use an empty string.
 1366 
 1367 `--ipynb-output=all|none|best`
 1368 
 1369 :   Determines how ipynb output cells are treated. `all` means
 1370     that all of the data formats included in the original are
 1371     preserved.  `none` means that the contents of data cells
 1372     are omitted.  `best` causes pandoc to try to pick the
 1373     richest data block in each output cell that is compatible
 1374     with the output format.  The default is `best`.
 1375 
 1376 `--pdf-engine=`*PROGRAM*
 1377 
 1378 :   Use the specified engine when producing PDF output.
 1379     Valid values are `pdflatex`, `lualatex`, `xelatex`, `latexmk`,
 1380     `tectonic`, `wkhtmltopdf`, `weasyprint`, `pagedjs-cli`,
 1381     `prince`, `context`, `pdfroff`, and `typst`. If the engine is not in
 1382     your PATH, the full path of the engine may be specified here.
 1383     If this option is not specified, pandoc uses the following
 1384     defaults depending on the output format specified using
 1385     `-t/--to`:
 1386 
 1387     - `-t latex` or none: `pdflatex` (other options: `xelatex`, `lualatex`,
 1388         `tectonic`, `latexmk`)
 1389     - `-t context`: `context`
 1390     - `-t html`:  `wkhtmltopdf` (other options: `prince`, `weasyprint`,
 1391         `pagedjs-cli`;
 1392         see [print-css.rocks](https://print-css.rocks) for a good
 1393         introduction to PDF generation from HTML/CSS)
 1394     - `-t ms`:  `pdfroff`
 1395     - `-t typst`: `typst`
 1396 
 1397 `--pdf-engine-opt=`*STRING*
 1398 
 1399 :   Use the given string as a command-line argument to the `pdf-engine`.
 1400     For example, to use a persistent directory `foo` for `latexmk`'s
 1401     auxiliary files, use `--pdf-engine-opt=-outdir=foo`.
 1402     Note that no check for duplicate options is done.
 1403 
 1404 [Dublin Core elements]: https://www.dublincore.org/specifications/dublin-core/dces/
 1405 [ISO 8601 format]: https://www.w3.org/TR/NOTE-datetime
 1406 [Encoding issue with the listings package]:
 1407   https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Encoding_issue
 1408 
 1409 ## Citation rendering {.options}
 1410 
 1411 `-C`, `--citeproc`
 1412 
 1413 :   Process the citations in the file, replacing them with
 1414     rendered citations and adding a bibliography.
 1415     Citation processing will not take place unless bibliographic
 1416     data is supplied, either through an external file specified
 1417     using the `--bibliography` option or the `bibliography`
 1418     field in metadata, or via a `references` section in metadata
 1419     containing a list of citations in CSL YAML format with
 1420     Markdown formatting.  The style is controlled by a [CSL]
 1421     stylesheet specified using the `--csl` option or the `csl`
 1422     field in metadata. (If no stylesheet is specified,
 1423     the `chicago-author-date` style will be used by default.)
 1424     The citation processing transformation may be applied before
 1425     or after filters or Lua filters (see `--filter`,
 1426     `--lua-filter`): these transformations are applied in the
 1427     order they appear on the command line.  For more
 1428     information, see the section on [Citations].
 1429 
 1430 `--bibliography=`*FILE*
 1431 
 1432 :   Set the `bibliography` field in the document's metadata to *FILE*,
 1433     overriding any value set in the metadata.  If you supply
 1434     this argument multiple times, each *FILE* will be added to
 1435     bibliography.  If *FILE* is a URL, it will be fetched
 1436     via HTTP. If *FILE* is not found relative to the
 1437     working directory, it will be sought in the resource path
 1438     (see `--resource-path`).
 1439 
 1440 `--csl=`*FILE*
 1441 
 1442 :   Set the `csl` field in the document's metadata to *FILE*,
 1443     overriding any value set in the metadata.  (This is equivalent to
 1444     `--metadata csl=FILE`.)  If *FILE* is a URL, it will be
 1445     fetched via HTTP.  If *FILE* is not found relative to the
 1446     working directory, it will be sought in the resource path
 1447     (see `--resource-path`) and finally in the `csl`
 1448     subdirectory of the pandoc user data directory.
 1449 
 1450 `--citation-abbreviations=`*FILE*
 1451 
 1452 :   Set the `citation-abbreviations` field in the document's metadata to
 1453     *FILE*, overriding any value set in the metadata.  (This is equivalent to
 1454     `--metadata citation-abbreviations=FILE`.)
 1455     If *FILE* is a URL, it will be fetched via HTTP.  If *FILE* is not
 1456     found relative to the working directory, it will be sought
 1457     in the resource path (see `--resource-path`) and finally in
 1458     the `csl` subdirectory of the pandoc user data directory.
 1459 
 1460 `--natbib`
 1461 
 1462 :   Use [`natbib`] for citations in LaTeX output.  This option
 1463     is not for use with the `--citeproc` option or with PDF
 1464     output.  It is intended for use in producing a LaTeX file
 1465     that can be processed with [`bibtex`].
 1466 
 1467 `--biblatex`
 1468 
 1469 :   Use [`biblatex`] for citations in LaTeX output.  This option
 1470     is not for use with the `--citeproc` option or with PDF
 1471     output. It is intended for use in producing a LaTeX file
 1472     that can be processed with [`bibtex`] or [`biber`].
 1473 
 1474 ## Math rendering in HTML {.options}
 1475 
 1476 The default is to render TeX math as far as possible using
 1477 Unicode characters.  Formulas are put inside a `span` with
 1478 `class="math"`, so that they may be styled differently from the
 1479 surrounding text if needed. However, this gives acceptable
 1480 results only for basic math, usually you will want to use
 1481 `--mathjax` or another of the following options.
 1482 
 1483 `--mathjax`[`=`*URL*]
 1484 
 1485 :   Use [MathJax] to display embedded TeX math in HTML output.
 1486     TeX math will be put between `\(...\)` (for inline math)
 1487     or `\[...\]` (for display math) and wrapped in `<span>` tags
 1488     with class `math`. Then the MathJax JavaScript will render it.
 1489     The *URL* should point to the `MathJax.js` load script.
 1490     If a *URL* is not provided, a link to the Cloudflare CDN will
 1491     be inserted.
 1492 
 1493 `--mathml`
 1494 
 1495 :   Convert TeX math to [MathML] (in `epub3`, `docbook4`,
 1496     `docbook5`, `jats`, `html4` and `html5`).  This is the
 1497     default in `odt` output. MathML is supported natively by
 1498     the main web browsers and select e-book readers.
 1499 
 1500 `--webtex`[`=`*URL*]
 1501 
 1502 :   Convert TeX formulas to `<img>` tags that link to an external script
 1503     that converts formulas to images. The formula will be URL-encoded
 1504     and concatenated with the URL provided. For SVG images you can for
 1505     example use `--webtex https://latex.codecogs.com/svg.latex?`.
 1506     If no URL is specified, the CodeCogs URL generating PNGs
 1507     will be used (`https://latex.codecogs.com/png.latex?`).
 1508     Note:  the `--webtex` option will affect Markdown output
 1509     as well as HTML, which is useful if you're targeting a
 1510     version of Markdown without native math support.
 1511 
 1512 `--katex`[`=`*URL*]
 1513 
 1514 :   Use [KaTeX] to display embedded TeX math in HTML output.
 1515     The *URL* is the base URL for the KaTeX library. That directory
 1516     should contain a `katex.min.js` and a `katex.min.css` file.
 1517     If a *URL* is not provided, a link to the KaTeX CDN will be inserted.
 1518 
 1519 `--gladtex`
 1520 
 1521 :   Enclose TeX math in `<eq>` tags in HTML output.  The resulting HTML
 1522     can then be processed by [GladTeX] to produce SVG images of the typeset
 1523     formulas and an HTML file with these images embedded.
 1524 
 1525         pandoc -s --gladtex input.md -o myfile.htex
 1526         gladtex -d image_dir myfile.htex
 1527         # produces myfile.html and images in image_dir
 1528 
 1529 [MathML]: https://www.w3.org/Math/
 1530 [MathJax]: https://www.mathjax.org
 1531 [KaTeX]: https://github.com/Khan/KaTeX
 1532 [GladTeX]: https://humenda.github.io/GladTeX/
 1533 
 1534 ## Options for wrapper scripts {.options}
 1535 
 1536 `--dump-args[=true|false]`
 1537 
 1538 :   Print information about command-line arguments to *stdout*, then exit.
 1539     This option is intended primarily for use in wrapper scripts.
 1540     The first line of output contains the name of the output file specified
 1541     with the `-o` option, or `-` (for *stdout*) if no output file was
 1542     specified.  The remaining lines contain the command-line arguments,
 1543     one per line, in the order they appear.  These do not include regular
 1544     pandoc options and their arguments, but do include any options appearing
 1545     after a `--` separator at the end of the line.
 1546 
 1547 `--ignore-args[=true|false]`
 1548 
 1549 :   Ignore command-line arguments (for use in wrapper scripts).
 1550     Regular pandoc options are not ignored.  Thus, for example,
 1551 
 1552         pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1
 1553 
 1554     is equivalent to
 1555 
 1556         pandoc -o foo.html -s
 1557 
 1558 # Exit codes
 1559 
 1560 If pandoc completes successfully, it will return exit code 0.
 1561 Nonzero exit codes have the following meanings:
 1562 
 1563  Code Error
 1564 ----- ------------------------------------
 1565     1 PandocIOError
 1566     3 PandocFailOnWarningError
 1567     4 PandocAppError
 1568     5 PandocTemplateError
 1569     6 PandocOptionError
 1570    21 PandocUnknownReaderError
 1571    22 PandocUnknownWriterError
 1572    23 PandocUnsupportedExtensionError
 1573    24 PandocCiteprocError
 1574    25 PandocBibliographyError
 1575    31 PandocEpubSubdirectoryError
 1576    43 PandocPDFError
 1577    44 PandocXMLError
 1578    47 PandocPDFProgramNotFoundError
 1579    61 PandocHttpError
 1580    62 PandocShouldNeverHappenError
 1581    63 PandocSomeError
 1582    64 PandocParseError
 1583    66 PandocMakePDFError
 1584    67 PandocSyntaxMapError
 1585    83 PandocFilterError
 1586    84 PandocLuaError
 1587    89 PandocNoScriptingEngine
 1588    91 PandocMacroLoop
 1589    92 PandocUTF8DecodingError
 1590    93 PandocIpynbDecodingError
 1591    94 PandocUnsupportedCharsetError
 1592    97 PandocCouldNotFindDataFileError
 1593    98 PandocCouldNotFindMetadataFileError
 1594    99 PandocResourceNotFound
 1595 ----- ------------------------------------
 1596 
 1597 # Defaults files
 1598 
 1599 The `--defaults` option may be used to specify a package
 1600 of options, in the form of a YAML file.
 1601 
 1602 Fields that are omitted will just have their regular
 1603 default values.  So a defaults file can be as simple as
 1604 one line:
 1605 
 1606 ``` yaml
 1607 verbosity: INFO
 1608 ```
 1609 
 1610 In fields that expect a file path (or list of file paths), the
 1611 following syntax may be used to interpolate environment variables:
 1612 
 1613 ``` yaml
 1614 csl:  ${HOME}/mycsldir/special.csl
 1615 ```
 1616 
 1617 `${USERDATA}` may also be used; this will always resolve to the
 1618 user data directory that is current when the defaults file is
 1619 parsed, regardless of the setting of the environment
 1620 variable `USERDATA`.
 1621 
 1622 `${.}` will resolve to the directory containing the defaults
 1623 file itself.  This allows you to refer to resources contained
 1624 in that directory:
 1625 
 1626 ``` yaml
 1627 epub-cover-image: ${.}/cover.jpg
 1628 epub-metadata: ${.}/meta.xml
 1629 resource-path:
 1630 - .             # the working directory from which pandoc is run
 1631 - ${.}/images   # the images subdirectory of the directory
 1632                 # containing this defaults file
 1633 ```
 1634 
 1635 This environment variable interpolation syntax *only* works in
 1636 fields that expect file paths.
 1637 
 1638 Defaults files can be placed in the `defaults` subdirectory of
 1639 the user data directory and used from any directory.  For
 1640 example, one could create a file specifying defaults for writing
 1641 letters, save it as `letter.yaml` in the `defaults` subdirectory
 1642 of the user data directory, and then invoke these defaults
 1643 from any directory using `pandoc --defaults letter`
 1644 or `pandoc -dletter`.
 1645 
 1646 When multiple defaults are used, their contents will be combined.
 1647 
 1648 Note that, where command-line arguments may be repeated
 1649 (`--metadata-file`, `--css`, `--include-in-header`,
 1650 `--include-before-body`, `--include-after-body`, `--variable`,
 1651 `--metadata`, `--syntax-definition`), the values specified on
 1652 the command line will combine with values specified in the
 1653 defaults file, rather than replacing them.
 1654 
 1655 The following tables show the mapping between the command line and
 1656 defaults file entries.
 1657 
 1658 +----------------------------------+-----------------------------------+
 1659 | command line                     | defaults file                     |
 1660 +:=================================+:==================================+
 1661 | ```                              | ``` yaml                          |
 1662 | foo.md                           | input-file: foo.md                |
 1663 | ```                              | ```                               |
 1664 +----------------------------------+-----------------------------------+
 1665 | ```                              | ``` yaml                          |
 1666 | foo.md bar.md                    | input-files:                      |
 1667 |                                  |   - foo.md                        |
 1668 |                                  |   - bar.md                        |
 1669 | ```                              | ```                               |
 1670 +----------------------------------+-----------------------------------+
 1671 
 1672 The value of `input-files` may be left empty to indicate input from
 1673 stdin, and it can be an empty sequence `[]` for no input.
 1674 
 1675 ## General options
 1676 
 1677 +----------------------------------+-----------------------------------+
 1678 | command line                     | defaults file                     |
 1679 +:=================================+:==================================+
 1680 | ```                              | ``` yaml                          |
 1681 | --from markdown+emoji            | from: markdown+emoji              |
 1682 | ```                              | ```                               |
 1683 |                                  | ``` yaml                          |
 1684 |                                  | reader: markdown+emoji            |
 1685 |                                  | ```                               |
 1686 +----------------------------------+-----------------------------------+
 1687 | ```                              | ``` yaml                          |
 1688 | --to markdown+hard_line_breaks   | to: markdown+hard_line_breaks     |
 1689 | ```                              | ```                               |
 1690 |                                  | ``` yaml                          |
 1691 |                                  | writer: markdown+hard_line_breaks |
 1692 |                                  | ```                               |
 1693 +----------------------------------+-----------------------------------+
 1694 | ```                              | ``` yaml                          |
 1695 | --output foo.pdf                 | output-file: foo.pdf              |
 1696 | ```                              | ```                               |
 1697 +----------------------------------+-----------------------------------+
 1698 | ```                              | ``` yaml                          |
 1699 | --output -                       | output-file:                      |
 1700 | ```                              | ```                               |
 1701 +----------------------------------+-----------------------------------+
 1702 | ```                              | ``` yaml                          |
 1703 | --data-dir dir                   | data-dir: dir                     |
 1704 | ```                              | ```                               |
 1705 +----------------------------------+-----------------------------------+
 1706 | ```                              | ``` yaml                          |
 1707 | --defaults file                  | defaults:                         |
 1708 | ```                              | - file                            |
 1709 |                                  | ```                               |
 1710 +----------------------------------+-----------------------------------+
 1711 | ```                              | ``` yaml                          |
 1712 | --verbose                        | verbosity: INFO                   |
 1713 | ```                              | ```                               |
 1714 +----------------------------------+-----------------------------------+
 1715 | ```                              | ``` yaml                          |
 1716 | --quiet                          | verbosity: ERROR                  |
 1717 | ```                              | ```                               |
 1718 +----------------------------------+-----------------------------------+
 1719 | ```                              | ``` yaml                          |
 1720 | --fail-if-warnings               | fail-if-warnings: true            |
 1721 | ```                              | ```                               |
 1722 +----------------------------------+-----------------------------------+
 1723 | ```                              | ``` yaml                          |
 1724 | --sandbox                        | sandbox: true                     |
 1725 | ```                              | ```                               |
 1726 +----------------------------------+-----------------------------------+
 1727 | ```                              | ``` yaml                          |
 1728 | --log=FILE                       | log-file: FILE                    |
 1729 | ```                              | ```                               |
 1730 +----------------------------------+-----------------------------------+
 1731 
 1732 Options specified in a defaults file itself always have priority over
 1733 those in another file included with a `defaults:` entry.
 1734 
 1735 `verbosity` can have the values `ERROR`, `WARNING`, or `INFO`.
 1736 
 1737 ## Reader options
 1738 
 1739 +----------------------------------+-----------------------------------+
 1740 | command line                     | defaults file                     |
 1741 +:=================================+:==================================+
 1742 | ```                              | ``` yaml                          |
 1743 | --shift-heading-level-by -1      | shift-heading-level-by: -1        |
 1744 | ```                              | ```                               |
 1745 +----------------------------------+-----------------------------------+
 1746 | ```                              | ``` yaml                          |
 1747 | --indented-code-classes python   | indented-code-classes:            |
 1748 |                                  |   - python                        |
 1749 | ```                              | ```                               |
 1750 +----------------------------------+-----------------------------------+
 1751 | ```                              | ``` yaml                          |
 1752 | --default-image-extension ".jpg" | default-image-extension: '.jpg'   |
 1753 | ```                              | ```                               |
 1754 +----------------------------------+-----------------------------------+
 1755 | ```                              | ``` yaml                          |
 1756 | --file-scope                     | file-scope: true                  |
 1757 | ```                              | ```                               |
 1758 +----------------------------------+-----------------------------------+
 1759 | ```                              | ``` yaml                          |
 1760 | --citeproc \                     | filters:                          |
 1761 |  --lua-filter count-words.lua \  |   - citeproc                      |
 1762 |  --filter special.lua            |   - count-words.lua               |
 1763 |                                  |   - type: json                    |
 1764 |                                  |     path: special.lua             |
 1765 | ```                              | ```                               |
 1766 +----------------------------------+-----------------------------------+
 1767 | ```                              | ``` yaml                          |
 1768 | --metadata key=value \           | metadata:                         |
 1769 |  --metadata key2                 |   key: value                      |
 1770 |                                  |   key2: true                      |
 1771 | ```                              | ```                               |
 1772 +----------------------------------+-----------------------------------+
 1773 | ```                              | ``` yaml                          |
 1774 | --metadata-file meta.yaml        | metadata-files:                   |
 1775 |                                  |   - meta.yaml                     |
 1776 | ```                              | ```                               |
 1777 |                                  | ``` yaml                          |
 1778 |                                  | metadata-file: meta.yaml          |
 1779 |                                  | ```                               |
 1780 +----------------------------------+-----------------------------------+
 1781 | ```                              | ``` yaml                          |
 1782 | --preserve-tabs                  | preserve-tabs: true               |
 1783 | ```                              | ```                               |
 1784 +----------------------------------+-----------------------------------+
 1785 | ```                              | ``` yaml                          |
 1786 | --tab-stop 8                     | tab-stop: 8                       |
 1787 | ```                              | ```                               |
 1788 +----------------------------------+-----------------------------------+
 1789 | ```                              | ``` yaml                          |
 1790 | --track-changes accept           | track-changes: accept             |
 1791 | ```                              | ```                               |
 1792 +----------------------------------+-----------------------------------+
 1793 | ```                              | ``` yaml                          |
 1794 | --extract-media dir              | extract-media: dir                |
 1795 | ```                              | ```                               |
 1796 +----------------------------------+-----------------------------------+
 1797 | ```                              | ``` yaml                          |
 1798 | --abbreviations abbrevs.txt      | abbreviations: abbrevs.txt        |
 1799 | ```                              | ```                               |
 1800 +----------------------------------+-----------------------------------+
 1801 | ```                              | ``` yaml                          |
 1802 | --trace                          | trace: true                       |
 1803 | ```                              | ```                               |
 1804 +----------------------------------+-----------------------------------+
 1805 
 1806 Metadata values specified in a defaults file are parsed as literal
 1807 string text, not Markdown.
 1808 
 1809 Filters will be assumed to be Lua filters if they have the `.lua`
 1810 extension, and JSON filters otherwise.  But the filter type can also be
 1811 specified explicitly, as shown.  Filters are run in the order specified.
 1812 To include the built-in citeproc filter, use either `citeproc` or
 1813 `{type: citeproc}`.
 1814 
 1815 ## General writer options
 1816 
 1817 +----------------------------------+-----------------------------------+
 1818 | command line                     | defaults file                     |
 1819 +:=================================+:==================================+
 1820 | ```                              | ``` yaml                          |
 1821 | --standalone                     | standalone: true                  |
 1822 | ```                              | ```                               |
 1823 +----------------------------------+-----------------------------------+
 1824 | ```                              | ``` yaml                          |
 1825 | --template letter                | template: letter                  |
 1826 | ```                              | ```                               |
 1827 +----------------------------------+-----------------------------------+
 1828 | ```                              | ``` yaml                          |
 1829 | --variable key=val \             | variables:                        |
 1830 |   --variable key2                |   key: val                        |
 1831 |                                  |   key2: true                      |
 1832 | ```                              | ```                               |
 1833 +----------------------------------+-----------------------------------+
 1834 | ```                              | ``` yaml                          |
 1835 | --eol nl                         | eol: nl                           |
 1836 | ```                              | ```                               |
 1837 +----------------------------------+-----------------------------------+
 1838 | ```                              | ``` yaml                          |
 1839 | --dpi 300                        | dpi: 300                          |
 1840 | ```                              | ```                               |
 1841 +----------------------------------+-----------------------------------+
 1842 | ```                              | ``` yaml                          |
 1843 | --wrap 60                        | wrap: 60                          |
 1844 | ```                              | ```                               |
 1845 +----------------------------------+-----------------------------------+
 1846 | ```                              | ``` yaml                          |
 1847 | --columns 72                     | columns: 72                       |
 1848 | ```                              | ```                               |
 1849 +----------------------------------+-----------------------------------+
 1850 | ```                              | ``` yaml                          |
 1851 | --table-of-contents              | table-of-contents: true           |
 1852 | ```                              | ```                               |
 1853 +----------------------------------+-----------------------------------+
 1854 | ```                              | ``` yaml                          |
 1855 | --toc                            | toc: true                         |
 1856 | ```                              | ```                               |
 1857 +----------------------------------+-----------------------------------+
 1858 | ```                              | ``` yaml                          |
 1859 | --toc-depth 3                    | toc-depth: 3                      |
 1860 | ```                              | ```                               |
 1861 +----------------------------------+-----------------------------------+
 1862 | ```                              | ``` yaml                          |
 1863 | --strip-comments                 | strip-comments: true              |
 1864 | ```                              | ```                               |
 1865 +----------------------------------+-----------------------------------+
 1866 | ```                              | ``` yaml                          |
 1867 | --no-highlight                   | highlight-style: null             |
 1868 | ```                              | ```                               |
 1869 +----------------------------------+-----------------------------------+
 1870 | ```                              | ``` yaml                          |
 1871 | --highlight-style kate           | highlight-style: kate             |
 1872 | ```                              | ```                               |
 1873 +----------------------------------+-----------------------------------+
 1874 | ```                              | ``` yaml                          |
 1875 | --syntax-definition mylang.xml   | syntax-definitions:               |
 1876 |                                  |   - mylang.xml                    |
 1877 | ```                              | ```                               |
 1878 |                                  | ``` yaml                          |
 1879 |                                  | syntax-definition: mylang.xml     |
 1880 |                                  | ```                               |
 1881 +----------------------------------+-----------------------------------+
 1882 | ```                              | ``` yaml                          |
 1883 | --include-in-header inc.tex      | include-in-header:                |
 1884 |                                  |   - inc.tex                       |
 1885 | ```                              | ```                               |
 1886 +----------------------------------+-----------------------------------+
 1887 | ```                              | ``` yaml                          |
 1888 | --include-before-body inc.tex    | include-before-body:              |
 1889 |                                  |   - inc.tex                       |
 1890 | ```                              | ```                               |
 1891 +----------------------------------+-----------------------------------+
 1892 | ```                              | ``` yaml                          |
 1893 | --include-after-body inc.tex     | include-after-body:               |
 1894 |                                  |   - inc.tex                       |
 1895 | ```                              | ```                               |
 1896 +----------------------------------+-----------------------------------+
 1897 | ```                              | ``` yaml                          |
 1898 | --resource-path .:foo            | resource-path: ['.','foo']        |
 1899 | ```                              | ```                               |
 1900 +----------------------------------+-----------------------------------+
 1901 | ```                              | ``` yaml                          |
 1902 | --request-header foo:bar         | request-headers:                  |
 1903 |                                  |   - ["User-Agent", "Mozilla/5.0"] |
 1904 | ```                              | ```                               |
 1905 +----------------------------------+-----------------------------------+
 1906 | ```                              | ``` yaml                          |
 1907 | --no-check-certificate           | no-check-certificate: true        |
 1908 | ```                              | ```                               |
 1909 +----------------------------------+-----------------------------------+
 1910 
 1911 
 1912 ## Options affecting specific writers
 1913 
 1914 +----------------------------------+-----------------------------------+
 1915 | command line                     | defaults file                     |
 1916 +:=================================+:==================================+
 1917 | ```                              | ``` yaml                          |
 1918 | --self-contained                 | self-contained: true              |
 1919 | ```                              | ```                               |
 1920 +----------------------------------+-----------------------------------+
 1921 | ```                              | ``` yaml                          |
 1922 | --html-q-tags                    | html-q-tags: true                 |
 1923 | ```                              | ```                               |
 1924 +----------------------------------+-----------------------------------+
 1925 | ```                              | ``` yaml                          |
 1926 | --ascii                          | ascii: true                       |
 1927 | ```                              | ```                               |
 1928 +----------------------------------+-----------------------------------+
 1929 | ```                              | ``` yaml                          |
 1930 | --reference-links                | reference-links: true             |
 1931 | ```                              | ```                               |
 1932 +----------------------------------+-----------------------------------+
 1933 | ```                              | ``` yaml                          |
 1934 | --reference-location block       | reference-location: block         |
 1935 | ```                              | ```                               |
 1936 +----------------------------------+-----------------------------------+
 1937 | ```                              | ``` yaml                          |
 1938 | --markdown-headings atx          | markdown-headings: atx            |
 1939 | ```                              | ```                               |
 1940 +----------------------------------+-----------------------------------+
 1941 | ```                              | ``` yaml                          |
 1942 | --list-tables                    | list-tables: true                 |
 1943 | ```                              | ```                               |
 1944 +----------------------------------+-----------------------------------+
 1945 | ```                              | ``` yaml                          |
 1946 | --top-level-division chapter     | top-level-division: chapter       |
 1947 | ```                              | ```                               |
 1948 +----------------------------------+-----------------------------------+
 1949 | ```                              | ``` yaml                          |
 1950 | --number-sections                | number-sections: true             |
 1951 | ```                              | ```                               |
 1952 +----------------------------------+-----------------------------------+
 1953 | ```                              | ``` yaml                          |
 1954 | --number-offset=1,4              | number-offset: \[1,4\]            |
 1955 | ```                              | ```                               |
 1956 +----------------------------------+-----------------------------------+
 1957 | ```                              | ``` yaml                          |
 1958 | --listings                       | listings: true                    |
 1959 | ```                              | ```                               |
 1960 +----------------------------------+-----------------------------------+
 1961 | ```                              | ``` yaml                          |
 1962 | --incremental                    | incremental: true                 |
 1963 | ```                              | ```                               |
 1964 +----------------------------------+-----------------------------------+
 1965 | ```                              | ``` yaml                          |
 1966 | --slide-level 2                  | slide-level: 2                    |
 1967 | ```                              | ```                               |
 1968 +----------------------------------+-----------------------------------+
 1969 | ```                              | ``` yaml                          |
 1970 | --section-divs                   | section-divs: true                |
 1971 | ```                              | ```                               |
 1972 +----------------------------------+-----------------------------------+
 1973 | ```                              | ``` yaml                          |
 1974 | --email-obfuscation references   | email-obfuscation: references     |
 1975 | ```                              | ```                               |
 1976 +----------------------------------+-----------------------------------+
 1977 | ```                              | ``` yaml                          |
 1978 | --id-prefix ch1                  | identifier-prefix: ch1            |
 1979 | ```                              | ```                               |
 1980 +----------------------------------+-----------------------------------+
 1981 | ```                              | ``` yaml                          |
 1982 | --title-prefix MySite            | title-prefix: MySite              |
 1983 | ```                              | ```                               |
 1984 +----------------------------------+-----------------------------------+
 1985 | ```                              | ``` yaml                          |
 1986 | --css styles/screen.css  \       | css:                              |
 1987 |   --css styles/special.css       |   - styles/screen.css             |
 1988 |                                  |   - styles/special.css            |
 1989 | ```                              | ```                               |
 1990 +----------------------------------+-----------------------------------+
 1991 | ```                              | ``` yaml                          |
 1992 | --reference-doc my.docx          | reference-doc: my.docx            |
 1993 | ```                              | ```                               |
 1994 +----------------------------------+-----------------------------------+
 1995 | ```                              | ``` yaml                          |
 1996 | --epub-cover-image cover.jpg     | epub-cover-image: cover.jpg       |
 1997 | ```                              | ```                               |
 1998 +----------------------------------+-----------------------------------+
 1999 | ```                              | ``` yaml                          |
 2000 | --epub-title-page=false          | epub-title-page: false            |
 2001 | ```                              | ```                               |
 2002 +----------------------------------+-----------------------------------+
 2003 | ```                              | ``` yaml                          |
 2004 | --epub-metadata meta.xml         | epub-metadata: meta.xml           |
 2005 | ```                              | ```                               |
 2006 +----------------------------------+-----------------------------------+
 2007 | ```                              | ``` yaml                          |
 2008 | --epub-embed-font special.otf \  | epub-fonts:                       |
 2009 |   --epub-embed-font headline.otf |   - special.otf                   |
 2010 |                                  |   - headline.otf                  |
 2011 | ```                              | ```                               |
 2012 +----------------------------------+-----------------------------------+
 2013 | ```                              | ``` yaml                          |
 2014 | --split-level 2                  | split-level: 2                    |
 2015 | ```                              | ```                               |
 2016 +----------------------------------+-----------------------------------+
 2017 | ```                              | ``` yaml                          |
 2018 | --chunk-template="%i.html"       | chunk-template: "%i.html"         |
 2019 | ```                              | ```                               |
 2020 +----------------------------------+-----------------------------------+
 2021 | ```                              | ``` yaml                          |
 2022 | --epub-subdirectory=""           | epub-subdirectory: ''             |
 2023 | ```                              | ```                               |
 2024 +----------------------------------+-----------------------------------+
 2025 | ```                              | ``` yaml                          |
 2026 | --ipynb-output best              | ipynb-output: best                |
 2027 | ```                              | ```                               |
 2028 +----------------------------------+-----------------------------------+
 2029 | ```                              | ``` yaml                          |
 2030 | --pdf-engine xelatex             | pdf-engine: xelatex               |
 2031 | ```                              | ```                               |
 2032 +----------------------------------+-----------------------------------+
 2033 | ```                              | ``` yaml                          |
 2034 | --pdf-engine-opt=--shell-escape  | pdf-engine-opts:                  |
 2035 |                                  |   - '-shell-escape'               |
 2036 | ```                              | ```                               |
 2037 |                                  | ``` yaml                          |
 2038 |                                  | pdf-engine-opt: '-shell-escape'   |
 2039 |                                  | ```                               |
 2040 +----------------------------------+-----------------------------------+
 2041 
 2042 ## Citation rendering
 2043 
 2044 +----------------------------------+-----------------------------------+
 2045 | command line                     | defaults file                     |
 2046 +:=================================+:==================================+
 2047 | ```                              | ``` yaml                          |
 2048 | --citeproc                       | citeproc: true                    |
 2049 | ```                              | ```                               |
 2050 +----------------------------------+-----------------------------------+
 2051 | ```                              | ``` yaml                          |
 2052 | --bibliography logic.bib         | metadata:                         |
 2053 |                                  |   bibliography: logic.bib         |
 2054 | ```                              | ```                               |
 2055 +----------------------------------+-----------------------------------+
 2056 | ```                              | ``` yaml                          |
 2057 | --csl ieee.csl                   | metadata:                         |
 2058 |                                  |   csl: ieee.csl                   |
 2059 | ```                              | ```                               |
 2060 +----------------------------------+-----------------------------------+
 2061 | ```                              | ``` yaml                          |
 2062 | --citation-abbreviations ab.json | metadata:                         |
 2063 |                                  |   citation-abbreviations: ab.json |
 2064 | ```                              | ```                               |
 2065 +----------------------------------+-----------------------------------+
 2066 | ```                              | ``` yaml                          |
 2067 | --natbib                         | cite-method: natbib               |
 2068 | ```                              | ```                               |
 2069 +----------------------------------+-----------------------------------+
 2070 | ```                              | ``` yaml                          |
 2071 | --biblatex                       | cite-method: biblatex             |
 2072 | ```                              | ```                               |
 2073 +----------------------------------+-----------------------------------+
 2074 
 2075 `cite-method` can be `citeproc`, `natbib`, or `biblatex`. This only
 2076 affects LaTeX output.  If you want to use citeproc to format citations,
 2077 you should also set 'citeproc: true'.
 2078 
 2079 If you need control over when the citeproc processing is done relative
 2080 to other filters, you should instead use `citeproc` in the list
 2081 of `filters` (see [Reader options](#reader-options-1)).
 2082 
 2083 ## Math rendering in HTML
 2084 
 2085 +----------------------------------+-----------------------------------+
 2086 | command line                     | defaults file                     |
 2087 +:=================================+:==================================+
 2088 | ```                              | ``` yaml                          |
 2089 | --mathjax                        | html-math-method:                 |
 2090 |                                  |   method: mathjax                 |
 2091 | ```                              | ```                               |
 2092 +----------------------------------+-----------------------------------+
 2093 | ```                              | ``` yaml                          |
 2094 | --mathml                         | html-math-method:                 |
 2095 |                                  |   method: mathml                  |
 2096 | ```                              | ```                               |
 2097 +----------------------------------+-----------------------------------+
 2098 | ```                              | ``` yaml                          |
 2099 | --webtex                         | html-math-method:                 |
 2100 |                                  |   method: webtex                  |
 2101 | ```                              | ```                               |
 2102 +----------------------------------+-----------------------------------+
 2103 | ```                              | ``` yaml                          |
 2104 | --katex                          | html-math-method:                 |
 2105 |                                  |   method: katex                   |
 2106 | ```                              | ```                               |
 2107 +----------------------------------+-----------------------------------+
 2108 | ```                              | ``` yaml                          |
 2109 | --gladtex                        | html-math-method:                 |
 2110 |                                  |   method: gladtex                 |
 2111 | ```                              | ```                               |
 2112 +----------------------------------+-----------------------------------+
 2113 
 2114 In addition to the values listed above, `method` can have the
 2115 value `plain`.
 2116 
 2117 If the command line option accepts a URL argument, an `url:` field can
 2118 be added to `html-math-method:`.
 2119 
 2120 ## Options for wrapper scripts
 2121 
 2122 +----------------------------------+-----------------------------------+
 2123 | command line                     | defaults file                     |
 2124 +:=================================+:==================================+
 2125 | ```                              | ``` yaml                          |
 2126 | --dump-args                      | dump-args: true                   |
 2127 | ```                              | ```                               |
 2128 +----------------------------------+-----------------------------------+
 2129 | ```                              | ``` yaml                          |
 2130 | --ignore-args                    | ignore-args: true                 |
 2131 | ```                              | ```                               |
 2132 +----------------------------------+-----------------------------------+
 2133 
 2134 # Templates
 2135 
 2136 When the `-s/--standalone` option is used, pandoc uses a template to
 2137 add header and footer material that is needed for a self-standing
 2138 document.  To see the default template that is used, just type
 2139 
 2140     pandoc -D *FORMAT*
 2141 
 2142 where *FORMAT* is the name of the output format. A custom template
 2143 can be specified using the `--template` option.  You can also override
 2144 the system default templates for a given output format *FORMAT*
 2145 by putting a file `templates/default.*FORMAT*` in the user data
 2146 directory (see `--data-dir`, above). *Exceptions:*
 2147 
 2148 - For `odt` output, customize the `default.opendocument`
 2149   template.
 2150 - For `pdf` output, customize the `default.latex` template
 2151   (or the `default.context` template, if you use `-t context`,
 2152   or the `default.ms` template, if you use `-t ms`, or the
 2153   `default.html` template, if you use `-t html`).
 2154 - `docx` and `pptx` have no template (however, you can use
 2155   `--reference-doc` to customize the output).
 2156 
 2157 Templates contain *variables*, which allow for the inclusion of
 2158 arbitrary information at any point in the file. They may be set at the
 2159 command line using the `-V/--variable` option. If a variable is not set,
 2160 pandoc will look for the key in the document's metadata, which can be set
 2161 using either [YAML metadata blocks][Extension: `yaml_metadata_block`]
 2162 or with the `-M/--metadata` option.  In addition, some variables
 2163 are given default values by pandoc.  See [Variables] below for
 2164 a list of variables used in pandoc's default templates.
 2165 
 2166 If you use custom templates, you may need to revise them as pandoc
 2167 changes.  We recommend tracking the changes in the default templates,
 2168 and modifying your custom templates accordingly. An easy way to do this
 2169 is to fork the [pandoc-templates] repository and merge in
 2170 changes after each pandoc release.
 2171 
 2172   [pandoc-templates]: https://github.com/jgm/pandoc-templates
 2173 
 2174 ## Template syntax
 2175 
 2176 ### Comments
 2177 
 2178 Anything between the sequence `$--` and the end of the
 2179 line will be treated as a comment and omitted from the output.
 2180 
 2181 ### Delimiters
 2182 
 2183 To mark variables and control structures in the template,
 2184 either `$`...`$` or `${`...`}` may be used as delimiters.
 2185 The styles may also be mixed in the same template, but the
 2186 opening and closing delimiter must match in each case.  The
 2187 opening delimiter may be followed by one or more spaces
 2188 or tabs, which will be ignored. The closing delimiter may
 2189 be preceded by one or more spaces or tabs, which will be
 2190 ignored.
 2191 
 2192 To include a literal `$` in the document, use `$$`.
 2193 
 2194 ### Interpolated variables
 2195 
 2196 A slot for an interpolated variable is a variable name surrounded
 2197 by matched delimiters.  Variable names must begin with a letter
 2198 and can contain letters, numbers, `_`, `-`, and `.`.  The
 2199 keywords `it`, `if`, `else`, `endif`, `for`, `sep`, and `endfor` may
 2200 not be used as variable names. Examples:
 2201 
 2202 ```
 2203 $foo$
 2204 $foo.bar.baz$
 2205 $foo_bar.baz-bim$
 2206 $ foo $
 2207 ${foo}
 2208 ${foo.bar.baz}
 2209 ${foo_bar.baz-bim}
 2210 ${ foo }
 2211 ```
 2212 
 2213 Variable names with periods are used to get at structured
 2214 variable values.  So, for example, `employee.salary` will return the
 2215 value of the `salary` field of the object that is the value of
 2216 the `employee` field.
 2217 
 2218 - If the value of the variable is a simple value, it will be
 2219   rendered verbatim.  (Note that no escaping is done;
 2220   the assumption is that the calling program will escape
 2221   the strings appropriately for the output format.)
 2222 - If the value is a list, the values will be concatenated.
 2223 - If the value is a map, the string `true` will be rendered.
 2224 - Every other value will be rendered as the empty string.
 2225 
 2226 ### Conditionals
 2227 
 2228 A conditional begins with `if(variable)` (enclosed in
 2229 matched delimiters) and ends with `endif` (enclosed in matched
 2230 delimiters).  It may optionally contain an `else` (enclosed in
 2231 matched delimiters).  The `if` section is used if
 2232 `variable` has a non-empty value, otherwise the `else`
 2233 section is used (if present).  Examples:
 2234 
 2235 ```
 2236 $if(foo)$bar$endif$
 2237 
 2238 $if(foo)$
 2239   $foo$
 2240 $endif$
 2241 
 2242 $if(foo)$
 2243 part one
 2244 $else$
 2245 part two
 2246 $endif$
 2247 
 2248 ${if(foo)}bar${endif}
 2249 
 2250 ${if(foo)}
 2251   ${foo}
 2252 ${endif}
 2253 
 2254 ${if(foo)}
 2255 ${ foo.bar }
 2256 ${else}
 2257 no foo!
 2258 ${endif}
 2259 ```
 2260 
 2261 The keyword `elseif` may be used to simplify complex nested
 2262 conditionals:
 2263 
 2264 ```
 2265 $if(foo)$
 2266 XXX
 2267 $elseif(bar)$
 2268 YYY
 2269 $else$
 2270 ZZZ
 2271 $endif$
 2272 ```
 2273 
 2274 ### For loops
 2275 
 2276 A for loop begins with `for(variable)` (enclosed in
 2277 matched delimiters) and ends with `endfor` (enclosed in matched
 2278 delimiters).
 2279 
 2280 - If `variable` is an array, the material inside the loop will
 2281   be evaluated repeatedly, with `variable` being set to each
 2282   value of the array in turn, and concatenated.
 2283 - If `variable` is a map, the material inside will be set to
 2284   the map.
 2285 - If the value of the associated variable is not an array or
 2286   a map, a single iteration will be performed on its value.
 2287 
 2288 Examples:
 2289 
 2290 ```
 2291 $for(foo)$$foo$$sep$, $endfor$
 2292 
 2293 $for(foo)$
 2294   - $foo.last$, $foo.first$
 2295 $endfor$
 2296 
 2297 ${ for(foo.bar) }
 2298   - ${ foo.bar.last }, ${ foo.bar.first }
 2299 ${ endfor }
 2300 
 2301 $for(mymap)$
 2302 $it.name$: $it.office$
 2303 $endfor$
 2304 ```
 2305 
 2306 You may optionally specify a separator between consecutive
 2307 values using `sep` (enclosed in matched delimiters).  The
 2308 material between `sep` and the `endfor` is the separator.
 2309 
 2310 ```
 2311 ${ for(foo) }${ foo }${ sep }, ${ endfor }
 2312 ```
 2313 
 2314 Instead of using `variable` inside the loop, the special
 2315 anaphoric keyword `it` may be used.
 2316 
 2317 ```
 2318 ${ for(foo.bar) }
 2319   - ${ it.last }, ${ it.first }
 2320 ${ endfor }
 2321 ```
 2322 
 2323 ### Partials
 2324 
 2325 Partials (subtemplates stored in different files) may be
 2326 included by using the name of the partial, followed
 2327 by `()`, for example:
 2328 
 2329 ```
 2330 ${ styles() }
 2331 ```
 2332 
 2333 Partials will be sought in the directory containing
 2334 the main template. The file name will be assumed to
 2335 have the same extension as the main template if it
 2336 lacks an extension. When calling the partial, the
 2337 full name including file extension can also be used:
 2338 
 2339 ```
 2340 ${ styles.html() }
 2341 ```
 2342 
 2343 (If a partial is not found in the directory of the
 2344 template and the template path is given as a relative
 2345 path, it will also be sought in the `templates`
 2346 subdirectory of the user data directory.)
 2347 
 2348 Partials may optionally be applied to variables using
 2349 a colon:
 2350 
 2351 ```
 2352 ${ date:fancy() }
 2353 
 2354 ${ articles:bibentry() }
 2355 ```
 2356 
 2357 If `articles` is an array, this will iterate over its
 2358 values, applying the partial `bibentry()` to each one.  So the
 2359 second example above is equivalent to
 2360 
 2361 ```
 2362 ${ for(articles) }
 2363 ${ it:bibentry() }
 2364 ${ endfor }
 2365 ```
 2366 
 2367 Note that the anaphoric keyword `it` must be used when
 2368 iterating over partials.  In the above examples,
 2369 the `bibentry` partial should contain `it.title`
 2370 (and so on) instead of `articles.title`.
 2371 
 2372 Final newlines are omitted from included partials.
 2373 
 2374 Partials may include other partials.
 2375 
 2376 A separator between values of an array may be specified
 2377 in square brackets, immediately after the variable name
 2378 or partial:
 2379 
 2380 ```
 2381 ${months[, ]}$
 2382 
 2383 ${articles:bibentry()[; ]$
 2384 ```
 2385 
 2386 The separator in this case is literal and (unlike with `sep`
 2387 in an explicit `for` loop) cannot contain interpolated
 2388 variables or other template directives.
 2389 
 2390 ### Nesting
 2391 
 2392 To ensure that content is "nested," that is, subsequent lines
 2393 indented, use the `^` directive:
 2394 
 2395 ```
 2396 $item.number$  $^$$item.description$ ($item.price$)
 2397 ```
 2398 
 2399 In this example, if `item.description` has multiple lines,
 2400 they will all be indented to line up with the first line:
 2401 
 2402 ```
 2403 00123  A fine bottle of 18-year old
 2404        Oban whiskey. ($148)
 2405 ```
 2406 
 2407 To nest multiple lines to the same level, align them
 2408 with the `^` directive in the template. For example:
 2409 
 2410 ```
 2411 $item.number$  $^$$item.description$ ($item.price$)
 2412                (Available til $item.sellby$.)
 2413 ```
 2414 
 2415 will produce
 2416 
 2417 ```
 2418 00123  A fine bottle of 18-year old
 2419        Oban whiskey. ($148)
 2420        (Available til March 30, 2020.)
 2421 ```
 2422 
 2423 If a variable occurs by itself on a line, preceded by whitespace
 2424 and not followed by further text or directives on the same line,
 2425 and the variable's value contains multiple lines, it will be
 2426 nested automatically.
 2427 
 2428 ### Breakable spaces
 2429 
 2430 Normally, spaces in the template itself (as opposed to values of
 2431 the interpolated variables) are not breakable, but they can be
 2432 made breakable in part of the template by using the `~` keyword
 2433 (ended with another `~`).
 2434 
 2435 ```
 2436 $~$This long line may break if the document is rendered
 2437 with a short line length.$~$
 2438 ```
 2439 
 2440 ### Pipes
 2441 
 2442 A pipe transforms the value of a variable or partial. Pipes are
 2443 specified using a slash (`/`) between the variable name (or partial)
 2444 and the pipe name. Example:
 2445 
 2446 ```
 2447 $for(name)$
 2448 $name/uppercase$
 2449 $endfor$
 2450 
 2451 $for(metadata/pairs)$
 2452 - $it.key$: $it.value$
 2453 $endfor$
 2454 
 2455 $employee:name()/uppercase$
 2456 ```
 2457 
 2458 Pipes may be chained:
 2459 
 2460 ```
 2461 $for(employees/pairs)$
 2462 $it.key/alpha/uppercase$. $it.name$
 2463 $endfor$
 2464 ```
 2465 
 2466 Some pipes take parameters:
 2467 
 2468 ```
 2469 |----------------------|------------|
 2470 $for(employee)$
 2471 $it.name.first/uppercase/left 20 "| "$$it.name.salary/right 10 " | " " |"$
 2472 $endfor$
 2473 |----------------------|------------|
 2474 ```
 2475 
 2476 Currently the following pipes are predefined:
 2477 
 2478 - `pairs`:  Converts a map or array to an array of maps,
 2479   each with `key` and `value` fields.  If the original
 2480   value was an array, the `key` will be the array index,
 2481   starting with 1.
 2482 
 2483 - `uppercase`:  Converts text to uppercase.
 2484 
 2485 - `lowercase`:  Converts text to lowercase.
 2486 
 2487 - `length`:  Returns the length of the value:  number
 2488   of characters for a textual value, number of elements
 2489   for a map or array.
 2490 
 2491 - `reverse`:  Reverses a textual value or array,
 2492   and has no effect on other values.
 2493 
 2494 - `first`: Returns the first value of an array, if
 2495   applied to a non-empty array; otherwise returns
 2496   the original value.
 2497 
 2498 - `last`: Returns the last value of an array, if
 2499   applied to a non-empty array; otherwise returns
 2500   the original value.
 2501 
 2502 - `rest`: Returns all but the first value of an array, if
 2503   applied to a non-empty array; otherwise returns
 2504   the original value.
 2505 
 2506 - `allbutlast`: Returns all but the last value of an array, if
 2507   applied to a non-empty array; otherwise returns
 2508   the original value.
 2509 
 2510 - `chomp`:  Removes trailing newlines (and breakable space).
 2511 
 2512 - `nowrap`:  Disables line wrapping on breakable spaces.
 2513 
 2514 - `alpha`:  Converts textual values that can be
 2515   read as an integer into lowercase alphabetic
 2516   characters `a..z` (mod 26). This can be used to get lettered
 2517   enumeration from array indices.  To get uppercase
 2518   letters, chain with `uppercase`.
 2519 
 2520 - `roman`:  Converts textual values that can be
 2521   read as an integer into lowercase roman numerals.
 2522   This can be used to get lettered enumeration from array indices.
 2523   To get uppercase roman, chain with `uppercase`.
 2524 
 2525 - `left n "leftborder" "rightborder"`:  Renders a textual value
 2526   in a block of width `n`, aligned to the left, with an optional
 2527   left and right border.  Has no effect on other values. This
 2528   can be used to align material in tables.  Widths are positive
 2529   integers indicating the number of characters.  Borders
 2530   are strings inside double quotes; literal `"` and `\` characters
 2531   must be backslash-escaped.
 2532 
 2533 - `right n "leftborder" "rightborder"`:  Renders a textual value
 2534   in a block of width `n`, aligned to the right, and has no
 2535   effect on other values.
 2536 
 2537 - `center n "leftborder" "rightborder"`:  Renders a textual
 2538   value in a block of width `n`, aligned to the center, and has
 2539   no effect on other values.
 2540 
 2541 
 2542 ## Variables
 2543 
 2544 ### Metadata variables
 2545 
 2546 `title`, `author`, `date`
 2547 :   allow identification of basic aspects of the document.  Included
 2548     in PDF metadata through LaTeX and ConTeXt.  These can be set
 2549     through a [pandoc title block][Extension: `pandoc_title_block`],
 2550     which allows for multiple authors, or through a
 2551     [YAML metadata block][Extension: `yaml_metadata_block`]:
 2552 
 2553         ---
 2554         author:
 2555         - Aristotle
 2556         - Peter Abelard
 2557         ...
 2558 
 2559     Note that if you just want to set PDF or HTML metadata, without
 2560     including a title block in the document itself, you can
 2561     set the `title-meta`, `author-meta`, and `date-meta`
 2562     variables.  (By default these are set automatically, based
 2563     on `title`, `author`, and `date`.) The page title in HTML
 2564     is set by `pagetitle`, which is equal to `title` by default.
 2565 
 2566 `subtitle`
 2567 :   document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
 2568     documents
 2569 
 2570 `abstract`
 2571 :   document summary, included in HTML, LaTeX, ConTeXt, AsciiDoc, and docx
 2572     documents
 2573 
 2574 `abstract-title`
 2575 :   title of abstract, currently used only in HTML, EPUB, and docx.
 2576     This will be set automatically to a localized value,
 2577     depending on `lang`, but can be manually overridden.
 2578 
 2579 `keywords`
 2580 :   list of keywords to be included in HTML, PDF, ODT, pptx, docx
 2581     and AsciiDoc metadata; repeat as for `author`, above
 2582 
 2583 `subject`
 2584 :   document subject, included in ODT, PDF, docx, EPUB, and pptx metadata
 2585 
 2586 `description`
 2587 :   document description, included in ODT, docx and pptx metadata. Some
 2588     applications show this as `Comments` metadata.
 2589 
 2590 `category`
 2591 :   document category, included in docx and pptx metadata
 2592 
 2593 Additionally,
 2594 any root-level string metadata, not included in ODT, docx
 2595 or pptx metadata is added as a *custom property*.
 2596 The following [YAML] metadata block for instance:
 2597 
 2598     ---
 2599     title:  'This is the title'
 2600     subtitle: "This is the subtitle"
 2601     author:
 2602     - Author One
 2603     - Author Two
 2604     description: |
 2605         This is a long
 2606         description.
 2607 
 2608         It consists of two paragraphs
 2609     ...
 2610 
 2611 will include `title`, `author` and `description` as standard document
 2612 properties and `subtitle` as a custom property when converting to docx,
 2613 ODT or pptx.
 2614 
 2615 ### Language variables
 2616 
 2617 `lang`
 2618 :   identifies the main language of the document using IETF language
 2619     tags (following the [BCP 47] standard), such as `en` or `en-GB`.
 2620     The [Language subtag lookup] tool can look up or verify these tags.
 2621     This affects most formats, and controls hyphenation in PDF output
 2622     when using LaTeX (through [`babel`] and [`polyglossia`]) or ConTeXt.
 2623 
 2624     Use native pandoc [Divs and Spans] with the `lang` attribute to
 2625     switch the language:
 2626 
 2627         ---
 2628         lang: en-GB
 2629         ...
 2630 
 2631         Text in the main document language (British English).
 2632 
 2633         ::: {lang=fr-CA}
 2634         > Cette citation est écrite en français canadien.
 2635         :::
 2636 
 2637         More text in English. ['Zitat auf Deutsch.']{lang=de}
 2638 
 2639 `dir`
 2640 :   the base script direction, either `rtl` (right-to-left)
 2641     or `ltr` (left-to-right).
 2642 
 2643     For bidirectional documents, native pandoc `span`s and
 2644     `div`s with the `dir` attribute (value `rtl` or `ltr`) can
 2645     be used to override the base direction in some output
 2646     formats.  This may not always be necessary if the final
 2647     renderer (e.g. the browser, when generating HTML) supports
 2648     the [Unicode Bidirectional Algorithm].
 2649 
 2650     When using LaTeX for bidirectional documents, only the
 2651     `xelatex` engine is fully supported (use
 2652     `--pdf-engine=xelatex`).
 2653 
 2654 [BCP 47]: https://tools.ietf.org/html/bcp47
 2655 [Unicode Bidirectional Algorithm]: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
 2656 [Language subtag lookup]: https://r12a.github.io/app-subtags/
 2657 
 2658 ### Variables for HTML
 2659 
 2660 `document-css`
 2661 :   Enables inclusion of most of the [CSS] in the `styles.html`
 2662     [partial](#partials) (have a look with
 2663     `pandoc --print-default-data-file=templates/styles.html`).
 2664     Unless you use [`--css`](#option--css), this variable
 2665     is set to `true` by default. You can disable it with
 2666     e.g. `pandoc -M document-css=false`.
 2667 
 2668 `mainfont`
 2669 :   sets the CSS `font-family` property on the `html` element.
 2670 
 2671 `fontsize`
 2672 :   sets the base CSS `font-size`, which you'd usually set
 2673     to e.g. `20px`, but it also accepts `pt`
 2674     (12pt = 16px in most browsers).
 2675 
 2676 `fontcolor`
 2677 :   sets the CSS `color` property on the `html` element.
 2678 
 2679 `linkcolor`
 2680 :   sets the CSS `color` property on all links.
 2681 
 2682 `monofont`
 2683 :   sets the CSS `font-family` property on `code` elements.
 2684 
 2685 `monobackgroundcolor`
 2686 :   sets the CSS `background-color` property on `code` elements
 2687     and adds extra padding.
 2688 
 2689 `linestretch`
 2690 :   sets the CSS `line-height` property on the `html` element,
 2691     which is preferred to be unitless.
 2692 
 2693 `maxwidth`
 2694 :   sets the CSS `max-width` property (default is 32em).
 2695 
 2696 `backgroundcolor`
 2697 :   sets the CSS `background-color` property on the `html` element.
 2698 
 2699 `margin-left`, `margin-right`, `margin-top`, `margin-bottom`
 2700 :   sets the corresponding CSS `padding` properties on the `body` element.
 2701 
 2702 To override or extend some [CSS] for just one document, include for example:
 2703 
 2704     ---
 2705     header-includes: |
 2706       <style>
 2707       blockquote {
 2708         font-style: italic;
 2709       }
 2710       tr.even {
 2711         background-color: #f0f0f0;
 2712       }
 2713       td, th {
 2714         padding: 0.5em 2em 0.5em 0.5em;
 2715       }
 2716       tbody {
 2717         border-bottom: none;
 2718       }
 2719       </style>
 2720     ---
 2721 
 2722 [CSS]: https://developer.mozilla.org/en-US/docs/Learn/CSS
 2723 
 2724 ### Variables for HTML math
 2725 
 2726 `classoption`
 2727 :   when using [KaTeX](#option--katex), you can render display
 2728 math equations flush left using [YAML metadata](#layout) or with
 2729 `-M classoption=fleqn`.
 2730 
 2731 ### Variables for HTML slides
 2732 
 2733 These affect HTML output when [producing slide shows with
 2734 pandoc](#slide-shows).
 2735 
 2736 `institute`
 2737 :   author affiliations: can be a list when there are multiple authors
 2738 
 2739 `revealjs-url`
 2740 :   base URL for reveal.js documents (defaults to
 2741     `https://unpkg.com/reveal.js@^4/`)
 2742 
 2743 `s5-url`
 2744 :   base URL for S5 documents (defaults to `s5/default`)
 2745 
 2746 `slidy-url`
 2747 :   base URL for Slidy documents (defaults to
 2748     `https://www.w3.org/Talks/Tools/Slidy2`)
 2749 
 2750 `slideous-url`
 2751 :   base URL for Slideous documents (defaults to `slideous`)
 2752 
 2753 `title-slide-attributes`
 2754 :   additional attributes for the title slide of reveal.js slide shows.
 2755     See [background in reveal.js, beamer, and pptx] for an example.
 2756 
 2757 All [reveal.js configuration options] are available as variables.
 2758 To turn off boolean flags that default to true in reveal.js, use `0`.
 2759 
 2760 [reveal.js configuration options]: https://revealjs.com/config/
 2761 
 2762 ### Variables for Beamer slides
 2763 
 2764 These variables change the appearance of PDF slides using [`beamer`].
 2765 
 2766 `aspectratio`
 2767 :   slide aspect ratio (`43` for 4:3 [default], `169` for 16:9,
 2768     `1610` for 16:10, `149` for 14:9, `141` for 1.41:1, `54` for 5:4,
 2769     `32` for 3:2)
 2770 
 2771 `beameroption`
 2772 :   add extra beamer option with `\setbeameroption{}`
 2773 
 2774 `institute`
 2775 :   author affiliations: can be a list when there are multiple authors
 2776 
 2777 `logo`
 2778 :   logo image for slides
 2779 
 2780 `navigation`
 2781 :   controls navigation symbols (default is `empty` for no navigation
 2782     symbols; other valid values are `frame`, `vertical`, and `horizontal`)
 2783 
 2784 `section-titles`
 2785 :   enables "title pages" for new sections (default is true)
 2786 
 2787 `theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme`
 2788 :   beamer themes
 2789 
 2790 `themeoptions`
 2791 :   options for LaTeX beamer themes (a list).
 2792 
 2793 `titlegraphic`
 2794 :   image for title slide
 2795 
 2796 ### Variables for PowerPoint
 2797 
 2798 These variables control the visual aspects of a slide show that
 2799 are not easily controlled via templates.
 2800 
 2801 `monofont`
 2802 :   font to use for code.
 2803 
 2804 ### Variables for LaTeX
 2805 
 2806 Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
 2807 
 2808 #### Layout
 2809 
 2810 `block-headings`
 2811 :   make `\paragraph` and `\subparagraph` (fourth- and
 2812     fifth-level headings, or fifth- and sixth-level with book
 2813     classes) free-standing rather than run-in; requires further
 2814     formatting to distinguish from `\subsubsection` (third- or
 2815     fourth-level headings). Instead of using this option,
 2816     [KOMA-Script] can adjust headings more extensively:
 2817 
 2818         ---
 2819         documentclass: scrartcl
 2820         header-includes: |
 2821           \RedeclareSectionCommand[
 2822             beforeskip=-10pt plus -2pt minus -1pt,
 2823             afterskip=1sp plus -1sp minus 1sp,
 2824             font=\normalfont\itshape]{paragraph}
 2825           \RedeclareSectionCommand[
 2826             beforeskip=-10pt plus -2pt minus -1pt,
 2827             afterskip=1sp plus -1sp minus 1sp,
 2828             font=\normalfont\scshape,
 2829             indent=0pt]{subparagraph}
 2830         ...
 2831 
 2832 `classoption`
 2833 :   option for document class, e.g. `oneside`; repeat for multiple options:
 2834 
 2835         ---
 2836         classoption:
 2837         - twocolumn
 2838         - landscape
 2839         ...
 2840 
 2841 `documentclass`
 2842 :   document class: usually one of the standard classes,
 2843     [`article`], [`book`], and [`report`]; the [KOMA-Script]
 2844     equivalents, `scrartcl`, `scrbook`, and `scrreprt`, which
 2845     default to smaller margins; or [`memoir`]
 2846 
 2847 `geometry`
 2848 :   option for [`geometry`] package, e.g. `margin=1in`;
 2849     repeat for multiple options:
 2850 
 2851         ---
 2852         geometry:
 2853         - top=30mm
 2854         - left=20mm
 2855         - heightrounded
 2856         ...
 2857 
 2858 `hyperrefoptions`
 2859 :   option for [`hyperref`] package, e.g. `linktoc=all`;
 2860     repeat for multiple options:
 2861 
 2862         ---
 2863         hyperrefoptions:
 2864         - linktoc=all
 2865         - pdfwindowui
 2866         - pdfpagemode=FullScreen
 2867         ...
 2868 
 2869 `indent`
 2870 :   if true, pandoc will use document class settings for
 2871     indentation (the default LaTeX template otherwise removes
 2872     indentation and adds space between paragraphs)
 2873 
 2874 `linestretch`
 2875 :   adjusts line spacing using the [`setspace`]
 2876     package, e.g. `1.25`, `1.5`
 2877 
 2878 `margin-left`, `margin-right`, `margin-top`, `margin-bottom`
 2879 :   sets margins if `geometry` is not used (otherwise `geometry`
 2880     overrides these)
 2881 
 2882 `pagestyle`
 2883 :   control `\pagestyle{}`: the default article class
 2884     supports `plain` (default), `empty` (no running heads or page numbers),
 2885     and `headings` (section titles in running heads)
 2886 
 2887 `papersize`
 2888 :   paper size, e.g. `letter`, `a4`
 2889 
 2890 `secnumdepth`
 2891 :   numbering depth for sections (with `--number-sections` option
 2892     or `numbersections` variable)
 2893 
 2894 `beamerarticle`
 2895 :   produce an article from Beamer slides
 2896 
 2897 #### Fonts
 2898 
 2899 `fontenc`
 2900 :   allows font encoding to be specified through `fontenc` package (with
 2901     `pdflatex`); default is `T1` (see [LaTeX font encodings guide])
 2902 
 2903 `fontfamily`
 2904 :   font package for use with `pdflatex`:
 2905     [TeX Live] includes many options, documented in the [LaTeX Font Catalogue].
 2906     The default is [Latin Modern][`lm`].
 2907 
 2908 `fontfamilyoptions`
 2909 :   options for package used as `fontfamily`; repeat for multiple options.
 2910     For example, to use the Libertine font with proportional lowercase
 2911     (old-style) figures through the [`libertinus`] package:
 2912 
 2913         ---
 2914         fontfamily: libertinus
 2915         fontfamilyoptions:
 2916         - osf
 2917         - p
 2918         ...
 2919 
 2920 `fontsize`
 2921 :   font size for body text. The standard classes allow 10pt, 11pt, and
 2922     12pt.  To use another size, set `documentclass` to one of
 2923     the [KOMA-Script] classes, such as `scrartcl` or `scrbook`.
 2924 
 2925 `mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont`, `CJKsansfont`, `CJKmonofont`
 2926 :   font families for use with `xelatex` or
 2927     `lualatex`: take the name of any system font, using the
 2928     [`fontspec`] package.  `CJKmainfont` uses the [`xecjk`] package.
 2929 
 2930 `mainfontoptions`, `sansfontoptions`, `monofontoptions`, `mathfontoptions`, `CJKoptions`
 2931 :   options to use with `mainfont`, `sansfont`, `monofont`, `mathfont`,
 2932     `CJKmainfont` in `xelatex` and `lualatex`.  Allow for any
 2933     choices available through [`fontspec`]; repeat for multiple
 2934     options. For example, to use the [TeX Gyre] version of
 2935     Palatino with lowercase figures:
 2936 
 2937         ---
 2938         mainfont: TeX Gyre Pagella
 2939         mainfontoptions:
 2940         - Numbers=Lowercase
 2941         - Numbers=Proportional
 2942         ...
 2943 
 2944 `babelfonts`
 2945 :    a map of Babel language names (e.g. `chinese`) to the font
 2946      to be used with the language:
 2947 
 2948      ---
 2949      babelfonts:
 2950        chinese-hant: "Noto Serif CJK TC"
 2951        russian: "Noto Serif"
 2952      ...
 2953 
 2954 `microtypeoptions`
 2955 :    options to pass to the microtype package
 2956 
 2957 #### Links
 2958 
 2959 `colorlinks`
 2960 :   add color to link text; automatically enabled if any of
 2961     `linkcolor`, `filecolor`, `citecolor`, `urlcolor`, or `toccolor` are set
 2962 
 2963 `boxlinks`
 2964 :   add visible box around links (has no effect if `colorlinks` is set)
 2965 
 2966 `linkcolor`, `filecolor`, `citecolor`, `urlcolor`, `toccolor`
 2967 :   color for internal links, external links, citation links, linked
 2968     URLs, and links in table of contents, respectively: uses options
 2969     allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and
 2970     `x11names` lists
 2971 
 2972 `links-as-notes`
 2973 :   causes links to be printed as footnotes
 2974 
 2975 `urlstyle`
 2976 :   style for URLs (e.g., `tt`, `rm`, `sf`, and, the default, `same`)
 2977 
 2978 #### Front matter
 2979 
 2980 `lof`, `lot`
 2981 :   include list of figures, list of tables
 2982 
 2983 `thanks`
 2984 :   contents of acknowledgments footnote after document title
 2985 
 2986 `toc`
 2987 :   include table of contents (can also be set using
 2988     `--toc/--table-of-contents`)
 2989 
 2990 `toc-depth`
 2991 :   level of section to include in table of contents
 2992 
 2993 #### BibLaTeX Bibliographies
 2994 
 2995 These variables function when using BibLaTeX for [citation rendering].
 2996 
 2997 `biblatexoptions`
 2998 :   list of options for biblatex
 2999 
 3000 `biblio-style`
 3001 :   bibliography style, when used with `--natbib` and `--biblatex`
 3002 
 3003 `biblio-title`
 3004 :   bibliography title, when used with `--natbib` and `--biblatex`
 3005 
 3006 `bibliography`
 3007 :   bibliography to use for resolving references
 3008 
 3009 `natbiboptions`
 3010 :   list of options for natbib
 3011 
 3012 [KOMA-Script]: https://ctan.org/pkg/koma-script
 3013 [LaTeX Font Catalogue]: https://tug.org/FontCatalogue/
 3014 [LaTeX font encodings guide]: https://ctan.org/pkg/encguide
 3015 [TeX Gyre]: http://www.gust.org.pl/projects/e-foundry/tex-gyre
 3016 [`article`]: https://ctan.org/pkg/article
 3017 [`book`]: https://ctan.org/pkg/book
 3018 [`libertinus`]: https://ctan.org/pkg/libertinus
 3019 [`memoir`]: https://ctan.org/pkg/memoir
 3020 [`report`]: https://ctan.org/pkg/report
 3021 
 3022 ### Variables for ConTeXt
 3023 
 3024 Pandoc uses these variables when [creating a PDF] with ConTeXt.
 3025 
 3026 `fontsize`
 3027 :   font size for body text (e.g. `10pt`, `12pt`)
 3028 
 3029 `headertext`, `footertext`
 3030 :   text to be placed in running header or footer (see [ConTeXt Headers and
 3031     Footers]); repeat up to four times for different placement
 3032 
 3033 `indenting`
 3034 :   controls indentation of paragraphs, e.g. `yes,small,next` (see
 3035     [ConTeXt Indentation]); repeat for multiple options
 3036 
 3037 `interlinespace`
 3038 :   adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
 3039     repeat for multiple options
 3040 
 3041 `layout`
 3042 :   options for page margins and text arrangement (see [ConTeXt Layout]);
 3043     repeat for multiple options
 3044 
 3045 `linkcolor`, `contrastcolor`
 3046 :   color for links outside and inside a page, e.g. `red`, `blue` (see
 3047     [ConTeXt Color])
 3048 
 3049 `linkstyle`
 3050 :   typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`,
 3051     `type`, `cap`, `small`
 3052 
 3053 `lof`, `lot`
 3054 :   include list of figures, list of tables
 3055 
 3056 `mainfont`, `sansfont`, `monofont`, `mathfont`
 3057 :   font families: take the name of any system font (see
 3058     [ConTeXt Font Switching])
 3059 
 3060 `margin-left`, `margin-right`, `margin-top`, `margin-bottom`
 3061 :   sets margins, if `layout` is not used (otherwise `layout`
 3062     overrides these)
 3063 
 3064 `pagenumbering`
 3065 :   page number style and location (using [`setuppagenumbering`]);
 3066     repeat for multiple options
 3067 
 3068 `papersize`
 3069 :   paper size, e.g. `letter`, `A4`, `landscape` (see [ConTeXt Paper Setup]);
 3070     repeat for multiple options
 3071 
 3072 `pdfa`
 3073 :   adds to the preamble the setup necessary to generate PDF/A
 3074     of the type specified, e.g. `1a:2005`, `2a`. If no type is
 3075     specified (i.e. the value is set to True, by e.g.
 3076     `--metadata=pdfa` or `pdfa: true` in a YAML metadata block),
 3077     `1b:2005` will be used as default, for reasons of backwards
 3078     compatibility. Using `--variable=pdfa` without specified value
 3079     is not supported.  To successfully generate PDF/A the required
 3080     ICC color profiles have to be available and the content and all
 3081     included files (such as images) have to be standard-conforming.
 3082     The ICC profiles and output intent may be specified using the
 3083     variables `pdfaiccprofile` and `pdfaintent`.  See also [ConTeXt
 3084     PDFA] for more details.
 3085 
 3086 `pdfaiccprofile`
 3087 :   when used in conjunction with `pdfa`, specifies the ICC profile to use
 3088     in the PDF, e.g. `default.cmyk`. If left unspecified, `sRGB.icc` is
 3089     used as default. May be repeated to include multiple profiles. Note that
 3090     the profiles have to be available on the system. They can be obtained
 3091     from [ConTeXt ICC Profiles].
 3092 
 3093 `pdfaintent`
 3094 :   when used in conjunction with `pdfa`, specifies the output intent for
 3095     the colors, e.g. `ISO coated v2 300\letterpercent\space (ECI)`
 3096     If left unspecified, `sRGB IEC61966-2.1` is used as default.
 3097 
 3098 `toc`
 3099 :   include table of contents (can also be set using
 3100     `--toc/--table-of-contents`)
 3101 
 3102 `urlstyle`
 3103 :   typeface style for links without link text, e.g. `normal`, `bold`, `slanted`, `boldslanted`,
 3104     `type`, `cap`, `small`
 3105 
 3106 `whitespace`
 3107 :   spacing between paragraphs, e.g. `none`, `small` (using
 3108     [`setupwhitespace`])
 3109 
 3110 `includesource`
 3111 :   include all source documents as file attachments in the PDF file
 3112 
 3113 [ConTeXt Paper Setup]: https://wiki.contextgarden.net/PaperSetup
 3114 [ConTeXt Layout]: https://wiki.contextgarden.net/Layout
 3115 [ConTeXt Font Switching]: https://wiki.contextgarden.net/Font_Switching
 3116 [ConTeXt Color]: https://wiki.contextgarden.net/Color
 3117 [ConTeXt Headers and Footers]: https://wiki.contextgarden.net/Headers_and_Footers
 3118 [ConTeXt Indentation]: https://wiki.contextgarden.net/Indentation
 3119 [ConTeXt ICC Profiles]: https://wiki.contextgarden.net/PDFX#ICC_profiles
 3120 [ConTeXt PDFA]: https://wiki.contextgarden.net/PDF/A
 3121 [`setupwhitespace`]: https://wiki.contextgarden.net/Command/setupwhitespace
 3122 [`setupinterlinespace`]: https://wiki.contextgarden.net/Command/setupinterlinespace
 3123 [`setuppagenumbering`]: https://wiki.contextgarden.net/Command/setuppagenumbering
 3124 
 3125 ### Variables for `wkhtmltopdf`
 3126 
 3127 Pandoc uses these variables when [creating a PDF] with [`wkhtmltopdf`].
 3128 The `--css` option also affects the output.
 3129 
 3130 `footer-html`, `header-html`
 3131 :   add information to the header and footer
 3132 
 3133 `margin-left`, `margin-right`, `margin-top`, `margin-bottom`
 3134 :   set the page margins
 3135 
 3136 `papersize`
 3137 :   sets the PDF paper size
 3138 
 3139 ### Variables for man pages
 3140 
 3141 `adjusting`
 3142 :   adjusts text to left (`l`), right (`r`), center (`c`),
 3143     or both (`b`) margins
 3144 
 3145 `footer`
 3146 :   footer in man pages
 3147 
 3148 `header`
 3149 :   header in man pages
 3150 
 3151 `section`
 3152 :   section number in man pages
 3153 
 3154 ### Variables for Typst
 3155 
 3156 `margin`
 3157 :   A dictionary with the fields defined in the Typst documentation:
 3158     `x`, `y`, `top`, `bottom`, `left`, `right`.
 3159 
 3160 `papersize`
 3161 :    Paper size: `a4`, `us-letter`, etc.
 3162 
 3163 `mainfont`
 3164 :    Name of system font to use for the main font.
 3165 
 3166 `fontsize`
 3167 :    Font size (e.g., `12pt`).
 3168 
 3169 `section-numbering`
 3170 :    Schema to use for numbering sections, e.g. `1.A.1`.
 3171 
 3172 `columns`
 3173 :    Number of columns for body text.
 3174 
 3175 ### Variables for ms
 3176 
 3177 `fontfamily`
 3178 :   `A` (Avant Garde), `B` (Bookman), `C` (Helvetica), `HN`
 3179     (Helvetica Narrow), `P` (Palatino), or `T` (Times New Roman).
 3180     This setting does not affect source code, which is always
 3181     displayed using monospace Courier. These built-in fonts are
 3182     limited in their coverage of characters. Additional fonts may
 3183     be installed using the script [`install-font.sh`] provided
 3184     by Peter Schaffter and documented in detail on [his web
 3185     site][ms-font-steps].
 3186 
 3187 `indent`
 3188 :   paragraph indent (e.g. `2m`)
 3189 
 3190 `lineheight`
 3191 :   line height (e.g. `12p`)
 3192 
 3193 `pointsize`
 3194 :   point size (e.g. `10p`)
 3195 
 3196 [`install-font.sh`]: https://www.schaffter.ca/mom/bin/install-font.sh
 3197 [ms-font-steps]: https://www.schaffter.ca/mom/momdoc/appendices.html#steps
 3198 
 3199 ### Variables set automatically
 3200 
 3201 Pandoc sets these variables automatically in response to [options] or
 3202 document contents; users can also modify them. These vary depending
 3203 on the output format, and include the following:
 3204 
 3205 `body`
 3206 :   body of document
 3207 
 3208 `date-meta`
 3209 :   the `date` variable converted to ISO 8601 YYYY-MM-DD,
 3210     included in all HTML based formats (dzslides, epub,
 3211     html, html4, html5, revealjs, s5, slideous, slidy).
 3212     The recognized formats for `date` are: `mm/dd/yyyy`,
 3213     `mm/dd/yy`, `yyyy-mm-dd` (ISO 8601), `dd MM yyyy`
 3214     (e.g. either `02 Apr 2018` or `02 April 2018`),
 3215     `MM dd, yyyy` (e.g. `Apr. 02, 2018` or `April 02, 2018),
 3216     `yyyy[mm[dd]]` (e.g. `20180402, `201804` or `2018`).
 3217 
 3218 `header-includes`
 3219 :   contents specified by `-H/--include-in-header` (may have multiple
 3220     values)
 3221 
 3222 `include-before`
 3223 :   contents specified by `-B/--include-before-body` (may have
 3224     multiple values)
 3225 
 3226 `include-after`
 3227 :   contents specified by `-A/--include-after-body` (may have
 3228     multiple values)
 3229 
 3230 `meta-json`
 3231 :   JSON representation of all of the document's metadata. Field
 3232     values are transformed to the selected output format.
 3233 
 3234 `numbersections`
 3235 :   non-null value if `-N/--number-sections` was specified
 3236 
 3237 `sourcefile`, `outputfile`
 3238 :   source and destination filenames, as given on the command line.
 3239     `sourcefile` can also be a list if input comes from multiple files,
 3240     or empty if input is from stdin. You can use the following snippet in
 3241     your template to distinguish them:
 3242 
 3243         $if(sourcefile)$
 3244         $for(sourcefile)$
 3245         $sourcefile$
 3246         $endfor$
 3247         $else$
 3248         (stdin)
 3249         $endif$
 3250 
 3251     Similarly, `outputfile` can be `-` if output goes to the terminal.
 3252 
 3253     If you need absolute paths, use e.g. `$curdir$/$sourcefile$`.
 3254 
 3255 `curdir`
 3256 :   working directory from which pandoc is run.
 3257 
 3258 `pandoc-version`
 3259 :   pandoc version.
 3260 
 3261 `toc`
 3262 :   non-null value if `--toc/--table-of-contents` was specified
 3263 
 3264 `toc-title`
 3265 :   title of table of contents (works only with EPUB,
 3266     HTML, revealjs, opendocument, odt, docx, pptx, beamer, LaTeX)
 3267 
 3268 [pandoc-templates]: https://github.com/jgm/pandoc-templates
 3269 
 3270 # Extensions
 3271 
 3272 The behavior of some of the readers and writers can be adjusted by
 3273 enabling or disabling various extensions.
 3274 
 3275 An extension can be enabled by adding `+EXTENSION`
 3276 to the format name and disabled by adding `-EXTENSION`. For example,
 3277 `--from markdown_strict+footnotes` is strict Markdown with footnotes
 3278 enabled, while `--from markdown-footnotes-pipe_tables` is pandoc's
 3279 Markdown without footnotes or pipe tables.
 3280 
 3281 The markdown reader and writer make by far the most use of extensions.
 3282 Extensions only used by them are therefore covered in the
 3283 section [Pandoc's Markdown] below (see [Markdown variants] for
 3284 `commonmark` and `gfm`). In the following, extensions that also work
 3285 for other formats are covered.
 3286 
 3287 Note that markdown extensions added to the `ipynb` format
 3288 affect Markdown cells in Jupyter notebooks (as do command-line
 3289 options like `--markdown-headings`).
 3290 
 3291 ## Typography
 3292 
 3293 #### Extension: `smart` ####
 3294 
 3295 Interpret straight quotes as curly quotes, `---` as em-dashes,
 3296 `--` as en-dashes, and `...` as ellipses. Nonbreaking spaces are
 3297 inserted after certain abbreviations, such as "Mr."
 3298 
 3299 This extension can be enabled/disabled for the following formats:
 3300 
 3301 input formats
 3302 :  `markdown`, `commonmark`, `latex`, `mediawiki`, `org`, `rst`, `twiki`,
 3303    `html`
 3304 
 3305 output formats
 3306 :  `markdown`, `latex`, `context`, `rst`
 3307 
 3308 enabled by default in
 3309 :  `markdown`, `latex`, `context` (both input and output)
 3310 
 3311 Note: If you are *writing* Markdown, then the `smart` extension
 3312 has the reverse effect: what would have been curly quotes comes
 3313 out straight.
 3314 
 3315 In LaTeX, `smart` means to use the standard TeX ligatures
 3316 for quotation marks (` `` ` and ` '' ` for double quotes,
 3317 `` ` `` and `` ' `` for single quotes) and dashes (`--` for
 3318 en-dash and `---` for em-dash).  If `smart` is disabled,
 3319 then in reading LaTeX pandoc will parse these characters
 3320 literally.  In writing LaTeX, enabling `smart` tells pandoc
 3321 to use the ligatures when possible; if `smart` is disabled
 3322 pandoc will use unicode quotation mark and dash characters.
 3323 
 3324 ## Headings and sections
 3325 
 3326 #### Extension: `auto_identifiers` ####
 3327 
 3328 A heading without an explicitly specified identifier will be
 3329 automatically assigned a unique identifier based on the heading text.
 3330 
 3331 This extension can be enabled/disabled for the following formats:
 3332 
 3333 input formats
 3334 :  `markdown`, `latex`, `rst`, `mediawiki`, `textile`
 3335 
 3336 output formats
 3337 :  `markdown`, `muse`
 3338 
 3339 enabled by default in
 3340 :  `markdown`, `muse`
 3341 
 3342 The default algorithm used to derive the identifier from the
 3343 heading text is:
 3344 
 3345   - Remove all formatting, links, etc.
 3346   - Remove all footnotes.
 3347   - Remove all non-alphanumeric characters,
 3348     except underscores, hyphens, and periods.
 3349   - Replace all spaces and newlines with hyphens.
 3350   - Convert all alphabetic characters to lowercase.
 3351   - Remove everything up to the first letter (identifiers may
 3352     not begin with a number or punctuation mark).
 3353   - If nothing is left after this, use the identifier `section`.
 3354 
 3355 Thus, for example,
 3356 
 3357   Heading                           Identifier
 3358   -------------------------------   ----------------------------
 3359   `Heading identifiers in HTML`     `heading-identifiers-in-html`
 3360   `Maître d'hôtel`                  `maître-dhôtel`
 3361   `*Dogs*?--in *my* house?`         `dogs--in-my-house`
 3362   `[HTML], [S5], or [RTF]?`         `html-s5-or-rtf`
 3363   `3. Applications`                 `applications`
 3364   `33`                              `section`
 3365 
 3366 These rules should, in most cases, allow one to determine the identifier
 3367 from the heading text. The exception is when several headings have the
 3368 same text; in this case, the first will get an identifier as described
 3369 above; the second will get the same identifier with `-1` appended; the
 3370 third with `-2`; and so on.
 3371 
 3372 (However, a different algorithm is used if
 3373 `gfm_auto_identifiers` is enabled; see below.)
 3374 
 3375 These identifiers are used to provide link targets in the table of
 3376 contents generated by the `--toc|--table-of-contents` option. They
 3377 also make it easy to provide links from one section of a document to
 3378 another. A link to this section, for example, might look like this:
 3379 
 3380     See the section on
 3381     [heading identifiers](#heading-identifiers-in-html-latex-and-context).
 3382 
 3383 Note, however, that this method of providing links to sections works
 3384 only in HTML, LaTeX, and ConTeXt formats.
 3385 
 3386 If the `--section-divs` option is specified, then each section will
 3387 be wrapped in a `section` (or a `div`, if `html4` was specified),
 3388 and the identifier will be attached to the enclosing `<section>`
 3389 (or `<div>`) tag rather than the heading itself. This allows entire
 3390 sections to be manipulated using JavaScript or treated differently in
 3391 CSS.
 3392 
 3393 #### Extension: `ascii_identifiers` ####
 3394 
 3395 Causes the identifiers produced by `auto_identifiers` to be pure ASCII.
 3396 Accents are stripped off of accented Latin letters, and non-Latin
 3397 letters are omitted.
 3398 
 3399 #### Extension: `gfm_auto_identifiers` ####
 3400 
 3401 Changes the algorithm used by `auto_identifiers` to conform to
 3402 GitHub's method.  Spaces are converted to dashes (`-`),
 3403 uppercase characters to lowercase characters, and punctuation
 3404 characters other than `-` and `_` are removed.
 3405 Emojis are replaced by their names.
 3406 
 3407 ## Math Input
 3408 
 3409 The extensions [`tex_math_dollars`](#extension-tex_math_dollars),
 3410 [`tex_math_gfm`](#extension-tex_math_gfm),
 3411 [`tex_math_single_backslash`](#extension-tex_math_single_backslash), and
 3412 [`tex_math_double_backslash`](#extension-tex_math_double_backslash)
 3413 are described in the section about Pandoc's Markdown.
 3414 
 3415 However, they can also be used with HTML input. This is handy for
 3416 reading web pages formatted using MathJax, for example.
 3417 
 3418 ## Raw HTML/TeX
 3419 
 3420 The following extensions are described in more detail in
 3421 their respective sections of [Pandoc's Markdown]:
 3422 
 3423 - [`raw_html`](#extension-raw_html) allows HTML elements which
 3424   are not representable in pandoc's AST to be parsed as raw HTML.
 3425   By default, this is disabled for HTML input.
 3426 
 3427 - [`raw_tex`](#extension-raw_tex) allows raw LaTeX, TeX, and ConTeXt
 3428   to be included in a document.  This extension can be enabled/disabled
 3429   for the following formats (in addition to `markdown`):
 3430 
 3431   input formats
 3432   :  `latex`, `textile`, `html` (environments, `\ref`, and
 3433      `\eqref` only), `ipynb`
 3434 
 3435   output formats
 3436   :  `textile`, `commonmark`
 3437 
 3438   Note: as applied to `ipynb`, `raw_html` and `raw_tex` affect not
 3439   only raw TeX in markdown cells, but data with mime type
 3440   `text/html` in output cells.  Since the `ipynb` reader attempts
 3441   to preserve the richest possible outputs when several options
 3442   are given, you will get best results if you disable `raw_html`
 3443   and `raw_tex` when converting to formats like `docx` which don't
 3444   allow raw `html` or `tex`.
 3445 
 3446 - [`native_divs`](#extension-native_divs) causes HTML `div`
 3447   elements to be parsed as native pandoc Div blocks.
 3448   If you want them to be parsed as raw HTML, use
 3449   `-f html-native_divs+raw_html`.
 3450 
 3451 - [`native_spans`](#extension-native_spans) causes HTML `span`
 3452   elements to be parsed as native pandoc Span inlines.
 3453   If you want them to be parsed as raw HTML, use
 3454   `-f html-native_spans+raw_html`.  If you want to drop all
 3455   `div`s and `span`s when converting HTML to Markdown, you
 3456   can use `pandoc -f html-native_divs-native_spans -t markdown`.
 3457 
 3458 ## Literate Haskell support
 3459 
 3460 #### Extension: `literate_haskell` ####
 3461 
 3462 Treat the document as literate Haskell source.
 3463 
 3464 This extension can be enabled/disabled for the following formats:
 3465 
 3466 input formats
 3467 :  `markdown`, `rst`, `latex`
 3468 
 3469 output formats
 3470 :  `markdown`, `rst`, `latex`, `html`
 3471 
 3472 If you append `+lhs` (or `+literate_haskell`) to one of the formats
 3473 above, pandoc will treat the document as literate Haskell source.
 3474 This means that
 3475 
 3476   - In Markdown input, "bird track" sections will be parsed as Haskell
 3477     code rather than block quotations.  Text between `\begin{code}`
 3478     and `\end{code}` will also be treated as Haskell code.  For
 3479     ATX-style headings the character '=' will be used instead of '#'.
 3480 
 3481   - In Markdown output, code blocks with classes `haskell` and `literate`
 3482     will be rendered using bird tracks, and block quotations will be
 3483     indented one space, so they will not be treated as Haskell code.
 3484     In addition, headings will be rendered setext-style (with underlines)
 3485     rather than ATX-style (with '#' characters). (This is because ghc
 3486     treats '#' characters in column 1 as introducing line numbers.)
 3487 
 3488   - In restructured text input, "bird track" sections will be parsed
 3489     as Haskell code.
 3490 
 3491   - In restructured text output, code blocks with class `haskell` will
 3492     be rendered using bird tracks.
 3493 
 3494   - In LaTeX input, text in `code` environments will be parsed as
 3495     Haskell code.
 3496 
 3497   - In LaTeX output, code blocks with class `haskell` will be rendered
 3498     inside `code` environments.
 3499 
 3500   - In HTML output, code blocks with class `haskell` will be rendered
 3501     with class `literatehaskell` and bird tracks.
 3502 
 3503 Examples:
 3504 
 3505     pandoc -f markdown+lhs -t html
 3506 
 3507 reads literate Haskell source formatted with Markdown conventions and writes
 3508 ordinary HTML (without bird tracks).
 3509 
 3510     pandoc -f markdown+lhs -t html+lhs
 3511 
 3512 writes HTML with the Haskell code in bird tracks, so it can be copied
 3513 and pasted as literate Haskell source.
 3514 
 3515 Note that GHC expects the bird tracks in the first column, so indented
 3516 literate code blocks (e.g. inside an itemized environment) will not be
 3517 picked up by the Haskell compiler.
 3518 
 3519 ## Other extensions
 3520 
 3521 #### Extension: `empty_paragraphs` ####
 3522 
 3523 Allows empty paragraphs.  By default empty paragraphs are
 3524 omitted.
 3525 
 3526 This extension can be enabled/disabled for the following formats:
 3527 
 3528 input formats
 3529 :  `docx`, `html`
 3530 
 3531 output formats
 3532 :  `docx`, `odt`, `opendocument`, `html`
 3533 
 3534 #### Extension: `native_numbering` ####
 3535 
 3536 Enables native numbering of figures and tables. Enumeration
 3537 starts at 1.
 3538 
 3539 This extension can be enabled/disabled for the following formats:
 3540 
 3541 output formats
 3542 :  `odt`, `opendocument`, `docx`
 3543 
 3544 #### Extension: `xrefs_name` ####
 3545 
 3546 Links to headings, figures and tables inside the document are
 3547 substituted with cross-references that will use the name or caption
 3548 of the referenced item. The original link text is replaced once
 3549 the generated document is refreshed. This extension can be combined
 3550 with `xrefs_number` in which case numbers will appear before the
 3551 name.
 3552 
 3553 Text in cross-references is only made consistent with the referenced
 3554 item once the document has been refreshed.
 3555 
 3556 This extension can be enabled/disabled for the following formats:
 3557 
 3558 output formats
 3559 :  `odt`, `opendocument`
 3560 
 3561 #### Extension: `xrefs_number` ####
 3562 
 3563 Links to headings, figures and tables inside the document are
 3564 substituted with cross-references that will use the number
 3565 of the referenced item. The original link text is discarded.
 3566 This extension can be combined with `xrefs_name` in which case
 3567 the name or caption numbers will appear after the number.
 3568 
 3569 For the `xrefs_number` to be useful heading numbers must be enabled
 3570 in the generated document, also table and figure captions must be enabled
 3571 using for example the `native_numbering` extension.
 3572 
 3573 Numbers in cross-references are only visible in the final document once
 3574 it has been refreshed.
 3575 
 3576 This extension can be enabled/disabled for the following formats:
 3577 
 3578 output formats
 3579 :  `odt`, `opendocument`
 3580 
 3581 #### Extension: `styles` #### {#ext-styles}
 3582 
 3583 When converting from docx, read all docx styles as divs (for
 3584 paragraph styles) and spans (for character styles) regardless
 3585 of whether pandoc understands the meaning of these styles.
 3586 This can be used with [docx custom styles](#custom-styles).
 3587 Disabled by default.
 3588 
 3589 input formats
 3590 :  `docx`
 3591 
 3592 #### Extension: `amuse` ####
 3593 
 3594 In the `muse` input format, this enables Text::Amuse
 3595 extensions to Emacs Muse markup.
 3596 
 3597 #### Extension: `raw_markdown` ####
 3598 
 3599 In the `ipynb` input format, this causes Markdown cells
 3600 to be included as raw Markdown blocks (allowing lossless
 3601 round-tripping) rather than being parsed.  Use this only
 3602 when you are targeting `ipynb` or a markdown-based
 3603 output format.
 3604 
 3605 #### Extension: `citations` {#org-citations}
 3606 
 3607 When the `citations` extension is enabled in `org`,
 3608 org-cite and org-ref style citations will be parsed as
 3609 native pandoc citations.
 3610 
 3611   [org-cite]: https://orgmode.org/manual/Citations.html
 3612   [org-ref]:  https://github.com/jkitchin/org-ref
 3613 
 3614 When `citations` is enabled in `docx`, citations inserted
 3615 by Zotero or Mendeley or EndNote plugins will be parsed as native
 3616 pandoc citations.  (Otherwise, the formatted citations generated
 3617 by the bibliographic software will be parsed as regular text.)
 3618 
 3619 #### Extension: `fancy_lists` {#org-fancy-lists}
 3620 
 3621 Some aspects of [Pandoc's Markdown fancy lists](#extension-fancy_lists) are also
 3622 accepted in `org` input, mimicking the option `org-list-allow-alphabetical` in
 3623 Emacs. As in Org Mode, enabling this extension allows lowercase and uppercase
 3624 alphabetical markers for ordered lists to be parsed in addition to arabic ones.
 3625 Note that for Org, this does not include roman numerals or the `#` placeholder
 3626 that are enabled by the extension in Pandoc's Markdown.
 3627 
 3628 #### Extension: `element_citations` ####
 3629 
 3630 In the `jats` output formats, this causes reference items to
 3631 be replaced with `<element-citation>` elements. These
 3632 elements are not influenced by CSL styles, but all information
 3633 on the item is included in tags.
 3634 
 3635 #### Extension: `ntb` ####
 3636 
 3637 In the `context` output format this enables the use of [Natural Tables
 3638 (TABLE)](https://wiki.contextgarden.net/TABLE) instead of the default
 3639 [Extreme Tables (xtables)](https://wiki.contextgarden.net/xtables).
 3640 Natural tables allow more fine-grained global customization but come
 3641 at a performance penalty compared to extreme tables.
 3642 
 3643 #### Extension: `tagging` ####
 3644 
 3645 Enabling this extension with `context` output will produce markup
 3646 suitable for the production of tagged PDFs. This includes
 3647 additional markers for paragraphs and alternative markup for
 3648 emphasized text. The `emphasis-command` template variable is set
 3649 if the extension is enabled.
 3650 
 3651 
 3652 # Pandoc's Markdown
 3653 
 3654 Pandoc understands an extended and slightly revised version of
 3655 John Gruber's [Markdown] syntax.  This document explains the syntax,
 3656 noting differences from original Markdown. Except where noted, these
 3657 differences can be suppressed by using the `markdown_strict` format instead
 3658 of `markdown`. Extensions can be enabled or disabled to specify the
 3659 behavior more granularly. They are described in the following. See also
 3660 [Extensions] above, for extensions that work also on other formats.
 3661 
 3662 ## Philosophy
 3663 
 3664 Markdown is designed to be easy to write, and, even more importantly,
 3665 easy to read:
 3666 
 3667 > A Markdown-formatted document should be publishable as-is, as plain
 3668 > text, without looking like it's been marked up with tags or formatting
 3669 > instructions.
 3670 > -- [John Gruber](https://daringfireball.net/projects/markdown/syntax#philosophy)
 3671 
 3672 This principle has guided pandoc's decisions in finding syntax for
 3673 tables, footnotes, and other extensions.
 3674 
 3675 There is, however, one respect in which pandoc's aims are different
 3676 from the original aims of Markdown.  Whereas Markdown was originally
 3677 designed with HTML generation in mind, pandoc is designed for multiple
 3678 output formats.  Thus, while pandoc allows the embedding of raw HTML,
 3679 it discourages it, and provides other, non-HTMLish ways of representing
 3680 important document elements like definition lists, tables, mathematics, and
 3681 footnotes.
 3682 
 3683 ## Paragraphs
 3684 
 3685 A paragraph is one or more lines of text followed by one or more blank lines.
 3686 Newlines are treated as spaces, so you can reflow your paragraphs as you like.
 3687 If you need a hard line break, put two or more spaces at the end of a line.
 3688 
 3689 #### Extension: `escaped_line_breaks` ####
 3690 
 3691 A backslash followed by a newline is also a hard line break.
 3692 Note:  in multiline and grid table cells, this is the only way
 3693 to create a hard line break, since trailing spaces in the cells
 3694 are ignored.
 3695 
 3696 ## Headings
 3697 
 3698 There are two kinds of headings: Setext and ATX.
 3699 
 3700 ### Setext-style headings ###
 3701 
 3702 A setext-style heading is a line of text "underlined" with a row of `=` signs
 3703 (for a level-one heading) or `-` signs (for a level-two heading):
 3704 
 3705     A level-one heading
 3706     ===================
 3707 
 3708     A level-two heading
 3709     -------------------
 3710 
 3711 The heading text can contain inline formatting, such as emphasis (see
 3712 [Inline formatting], below).
 3713 
 3714 
 3715 ### ATX-style headings ###
 3716 
 3717 An ATX-style heading consists of one to six `#` signs and a line of
 3718 text, optionally followed by any number of `#` signs.  The number of
 3719 `#` signs at the beginning of the line is the heading level:
 3720 
 3721     ## A level-two heading
 3722 
 3723     ### A level-three heading ###
 3724 
 3725 As with setext-style headings, the heading text can contain formatting:
 3726 
 3727     # A level-one heading with a [link](/url) and *emphasis*
 3728 
 3729 #### Extension: `blank_before_header` ####
 3730 
 3731 Original Markdown syntax does not require a blank line before a heading.
 3732 Pandoc does require this (except, of course, at the beginning of the
 3733 document). The reason for the requirement is that it is all too easy for a
 3734 `#` to end up at the beginning of a line by accident (perhaps through line
 3735 wrapping). Consider, for example:
 3736 
 3737     I like several of their flavors of ice cream:
 3738     #22, for example, and #5.
 3739 
 3740 #### Extension: `space_in_atx_header` ####
 3741 
 3742 Many Markdown implementations do not require a space between the
 3743 opening `#`s of an ATX heading and the heading text, so that
 3744 `#5 bolt` and `#hashtag` count as headings.  With this extension,
 3745 pandoc does require the space.
 3746 
 3747 ### Heading identifiers ###
 3748 
 3749 See also the [`auto_identifiers`
 3750 extension](#extension-auto_identifiers) above.
 3751 
 3752 #### Extension: `header_attributes` ####
 3753 
 3754 Headings can be assigned attributes using this syntax at the end
 3755 of the line containing the heading text:
 3756 
 3757     {#identifier .class .class key=value key=value}
 3758 
 3759 Thus, for example, the following headings will all be assigned the identifier
 3760 `foo`:
 3761 
 3762     # My heading {#foo}
 3763 
 3764     ## My heading ##    {#foo}
 3765 
 3766     My other heading   {#foo}
 3767     ---------------
 3768 
 3769 (This syntax is compatible with [PHP Markdown Extra].)
 3770 
 3771 Note that although this syntax allows assignment of classes and key/value
 3772 attributes, writers generally don't use all of this information.  Identifiers,
 3773 classes, and key/value attributes are used in HTML and HTML-based formats such
 3774 as EPUB and slidy.  Identifiers are used for labels and link anchors in the
 3775 LaTeX, ConTeXt, Textile, Jira markup, and AsciiDoc writers.
 3776 
 3777 Headings with the class `unnumbered` will not be numbered, even if
 3778 `--number-sections` is specified.  A single hyphen (`-`) in an attribute
 3779 context is equivalent to `.unnumbered`, and preferable in non-English
 3780 documents.  So,
 3781 
 3782     # My heading {-}
 3783 
 3784 is just the same as
 3785 
 3786     # My heading {.unnumbered}
 3787 
 3788 If the `unlisted` class is present in addition to `unnumbered`,
 3789 the heading will not be included in a table of contents.
 3790 (Currently this feature is only implemented for certain
 3791 formats: those based on LaTeX and HTML, PowerPoint, and RTF.)
 3792 
 3793 #### Extension: `implicit_header_references` ####
 3794 
 3795 Pandoc behaves as if reference links have been defined for each heading.
 3796 So, to link to a heading
 3797 
 3798     # Heading identifiers in HTML
 3799 
 3800 you can simply write
 3801 
 3802     [Heading identifiers in HTML]
 3803 
 3804 or
 3805 
 3806     [Heading identifiers in HTML][]
 3807 
 3808 or
 3809 
 3810     [the section on heading identifiers][heading identifiers in
 3811     HTML]
 3812 
 3813 instead of giving the identifier explicitly:
 3814 
 3815     [Heading identifiers in HTML](#heading-identifiers-in-html)
 3816 
 3817 If there are multiple headings with identical text, the corresponding
 3818 reference will link to the first one only, and you will need to use explicit
 3819 links to link to the others, as described above.
 3820 
 3821 Like regular reference links, these references are case-insensitive.
 3822 
 3823 Explicit link reference definitions always take priority over
 3824 implicit heading references.  So, in the following example, the
 3825 link will point to `bar`, not to `#foo`:
 3826 
 3827     # Foo
 3828 
 3829     [foo]: bar
 3830 
 3831     See [foo]
 3832 
 3833 ## Block quotations
 3834 
 3835 Markdown uses email conventions for quoting blocks of text.
 3836 A block quotation is one or more paragraphs or other block elements
 3837 (such as lists or headings), with each line preceded by a `>` character
 3838 and an optional space. (The `>` need not start at the left margin, but
 3839 it should not be indented more than three spaces.)
 3840 
 3841     > This is a block quote. This
 3842     > paragraph has two lines.
 3843     >
 3844     > 1. This is a list inside a block quote.
 3845     > 2. Second item.
 3846 
 3847 A "lazy" form, which requires the `>` character only on the first
 3848 line of each block, is also allowed:
 3849 
 3850     > This is a block quote. This
 3851     paragraph has two lines.
 3852 
 3853     > 1. This is a list inside a block quote.
 3854     2. Second item.
 3855 
 3856 Among the block elements that can be contained in a block quote are
 3857 other block quotes. That is, block quotes can be nested:
 3858 
 3859     > This is a block quote.
 3860     >
 3861     > > A block quote within a block quote.
 3862 
 3863 If the `>` character is followed by an optional space, that space
 3864 will be considered part of the block quote marker and not part of
 3865 the indentation of the contents.  Thus, to put an indented code
 3866 block in a block quote, you need five spaces after the `>`:
 3867 
 3868     >     code
 3869 
 3870 #### Extension: `blank_before_blockquote` ####
 3871 
 3872 Original Markdown syntax does not require a blank line before a
 3873 block quote.  Pandoc does require this (except, of course, at
 3874 the beginning of the document). The reason for the requirement
 3875 is that it is all too easy for a `>` to end up at the beginning
 3876 of a line by accident (perhaps through line wrapping). So,
 3877 unless the `markdown_strict` format is used, the following does
 3878 not produce a nested block quote in pandoc:
 3879 
 3880     > This is a block quote.
 3881     >> Not nested, since `blank_before_blockquote` is enabled by default
 3882 
 3883 
 3884 ## Verbatim (code) blocks
 3885 
 3886 ### Indented code blocks ###
 3887 
 3888 A block of text indented four spaces (or one tab) is treated as verbatim
 3889 text: that is, special characters do not trigger special formatting,
 3890 and all spaces and line breaks are preserved.  For example,
 3891 
 3892         if (a > 3) {
 3893           moveShip(5 * gravity, DOWN);
 3894         }
 3895 
 3896 The initial (four space or one tab) indentation is not considered part
 3897 of the verbatim text, and is removed in the output.
 3898 
 3899 Note: blank lines in the verbatim text need not begin with four spaces.
 3900 
 3901 
 3902 ### Fenced code blocks ###
 3903 
 3904 #### Extension: `fenced_code_blocks` ####
 3905 
 3906 In addition to standard indented code blocks, pandoc supports
 3907 *fenced* code blocks.  These begin with a row of three or more
 3908 tildes (`~`) and end with a row of tildes that must be at least as long as
 3909 the starting row. Everything between these lines is treated as code. No
 3910 indentation is necessary:
 3911 
 3912     ~~~~~~~
 3913     if (a > 3) {
 3914       moveShip(5 * gravity, DOWN);
 3915     }
 3916     ~~~~~~~
 3917 
 3918 Like regular code blocks, fenced code blocks must be separated
 3919 from surrounding text by blank lines.
 3920 
 3921 If the code itself contains a row of tildes or backticks, just use a longer
 3922 row of tildes or backticks at the start and end:
 3923 
 3924     ~~~~~~~~~~~~~~~~
 3925     ~~~~~~~~~~
 3926     code including tildes
 3927     ~~~~~~~~~~
 3928     ~~~~~~~~~~~~~~~~
 3929 
 3930 #### Extension: `backtick_code_blocks` ####
 3931 
 3932 Same as `fenced_code_blocks`, but uses backticks (`` ` ``) instead of tildes
 3933 (`~`).
 3934 
 3935 #### Extension: `fenced_code_attributes` ####
 3936 
 3937 Optionally, you may attach attributes to fenced or backtick code block using
 3938 this syntax:
 3939 
 3940     ~~~~ {#mycode .haskell .numberLines startFrom="100"}
 3941     qsort []     = []
 3942     qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
 3943                    qsort (filter (>= x) xs)
 3944     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3945 
 3946 Here `mycode` is an identifier, `haskell` and `numberLines` are
 3947 classes, and `startFrom` is an attribute with value `100`. Some
 3948 output formats can use this information to do syntax
 3949 highlighting. Currently, the only output formats that use this
 3950 information are HTML, LaTeX, Docx, Ms, and PowerPoint. If
 3951 highlighting is supported for your output format and language,
 3952 then the code block above will appear highlighted, with numbered
 3953 lines. (To see which languages are supported, type `pandoc
 3954 --list-highlight-languages`.) Otherwise, the code block above
 3955 will appear as follows:
 3956 
 3957     <pre id="mycode" class="haskell numberLines" startFrom="100">
 3958       <code>
 3959       ...
 3960       </code>
 3961     </pre>
 3962 
 3963 The `numberLines` (or `number-lines`) class will cause the lines
 3964 of the code block to be numbered, starting with `1` or the value
 3965 of the `startFrom` attribute.  The `lineAnchors` (or
 3966 `line-anchors`) class will cause the lines to be clickable
 3967 anchors in HTML output.
 3968 
 3969 A shortcut form can also be used for specifying the language of
 3970 the code block:
 3971 
 3972     ```haskell
 3973     qsort [] = []
 3974     ```
 3975 
 3976 This is equivalent to:
 3977 
 3978     ``` {.haskell}
 3979     qsort [] = []
 3980     ```
 3981 
 3982 This shortcut form may be combined with attributes:
 3983 
 3984     ```haskell {.numberLines}
 3985     qsort [] = []
 3986     ```
 3987 
 3988 Which is equivalent to:
 3989 
 3990     ``` {.haskell .numberLines}
 3991     qsort [] = []
 3992     ```
 3993 
 3994 If the `fenced_code_attributes` extension is disabled, but
 3995 input contains class attribute(s) for the code block, the first
 3996 class attribute will be printed after the opening fence as a bare
 3997 word.
 3998 
 3999 To prevent all highlighting, use the `--no-highlight` flag.
 4000 To set the highlighting style, use `--highlight-style`.
 4001 For more information on highlighting, see [Syntax highlighting],
 4002 below.
 4003 
 4004 ## Line blocks
 4005 
 4006 #### Extension: `line_blocks` ####
 4007 
 4008 A line block is a sequence of lines beginning with a vertical bar (`|`)
 4009 followed by a space.  The division into lines will be preserved in
 4010 the output, as will any leading spaces; otherwise, the lines will
 4011 be formatted as Markdown.  This is useful for verse and addresses:
 4012 
 4013     | The limerick packs laughs anatomical
 4014     | In space that is quite economical.
 4015     |    But the good ones I've seen
 4016     |    So seldom are clean
 4017     | And the clean ones so seldom are comical
 4018 
 4019     | 200 Main St.
 4020     | Berkeley, CA 94718
 4021 
 4022 The lines can be hard-wrapped if needed, but the continuation
 4023 line must begin with a space.
 4024 
 4025     | The Right Honorable Most Venerable and Righteous Samuel L.
 4026       Constable, Jr.
 4027     | 200 Main St.
 4028     | Berkeley, CA 94718
 4029 
 4030 Inline formatting (such as emphasis) is allowed in the content
 4031 (though it can't cross line boundaries). Block-level formatting
 4032 (such as block quotes or lists) is not recognized.
 4033 
 4034 This syntax is borrowed from [reStructuredText].
 4035 
 4036 ## Lists
 4037 
 4038 ### Bullet lists ###
 4039 
 4040 A bullet list is a list of bulleted list items.  A bulleted list
 4041 item begins with a bullet (`*`, `+`, or `-`).  Here is a simple
 4042 example:
 4043 
 4044     * one
 4045     * two
 4046     * three
 4047 
 4048 This will produce a "compact" list. If you want a "loose" list, in which
 4049 each item is formatted as a paragraph, put spaces between the items:
 4050 
 4051     * one
 4052 
 4053     * two
 4054 
 4055     * three
 4056 
 4057 The bullets need not be flush with the left margin; they may be
 4058 indented one, two, or three spaces. The bullet must be followed
 4059 by whitespace.
 4060 
 4061 List items look best if subsequent lines are flush with the first
 4062 line (after the bullet):
 4063 
 4064     * here is my first
 4065       list item.
 4066     * and my second.
 4067 
 4068 But Markdown also allows a "lazy" format:
 4069 
 4070     * here is my first
 4071     list item.
 4072     * and my second.
 4073 
 4074 ### Block content in list items ###
 4075 
 4076 A list item may contain multiple paragraphs and other block-level
 4077 content. However, subsequent paragraphs must be preceded by a blank line
 4078 and indented to line up with the first non-space content after
 4079 the list marker.
 4080 
 4081       * First paragraph.
 4082 
 4083         Continued.
 4084 
 4085       * Second paragraph. With a code block, which must be indented
 4086         eight spaces:
 4087 
 4088             { code }
 4089 
 4090 Exception: if the list marker is followed by an indented code
 4091 block, which must begin 5 spaces after the list marker, then
 4092 subsequent paragraphs must begin two columns after the last
 4093 character of the list marker:
 4094 
 4095     *     code
 4096 
 4097       continuation paragraph
 4098 
 4099 List items may include other lists.  In this case the preceding blank
 4100 line is optional.  The nested list must be indented to line up with
 4101 the first non-space character after the list marker of the
 4102 containing list item.
 4103 
 4104     * fruits
 4105       + apples
 4106         - macintosh
 4107         - red delicious
 4108       + pears
 4109       + peaches
 4110     * vegetables
 4111       + broccoli
 4112       + chard
 4113 
 4114 As noted above, Markdown allows you to write list items "lazily," instead of
 4115 indenting continuation lines. However, if there are multiple paragraphs or
 4116 other blocks in a list item, the first line of each must be indented.
 4117 
 4118     + A lazy, lazy, list
 4119     item.
 4120 
 4121     + Another one; this looks
 4122     bad but is legal.
 4123 
 4124         Second paragraph of second
 4125     list item.
 4126 
 4127 ### Ordered lists ###
 4128 
 4129 Ordered lists work just like bulleted lists, except that the items
 4130 begin with enumerators rather than bullets.
 4131 
 4132 In original Markdown, enumerators are decimal numbers followed
 4133 by a period and a space.  The numbers themselves are ignored, so
 4134 there is no difference between this list:
 4135 
 4136     1.  one
 4137     2.  two
 4138     3.  three
 4139 
 4140 and this one:
 4141 
 4142     5.  one
 4143     7.  two
 4144     1.  three
 4145 
 4146 #### Extension: `fancy_lists` ####
 4147 
 4148 Unlike original Markdown, pandoc allows ordered list items to be marked
 4149 with uppercase and lowercase letters and roman numerals, in addition to
 4150 Arabic numerals. List markers may be enclosed in parentheses or followed by a
 4151 single right-parenthesis or period. They must be separated from the
 4152 text that follows by at least one space, and, if the list marker is a
 4153 capital letter with a period, by at least two spaces.[^2]
 4154 
 4155 [^2]:  The point of this rule is to ensure that normal paragraphs
 4156     starting with people's initials, like
 4157 
 4158         B. Russell won a Nobel Prize (but not for "On Denoting").
 4159 
 4160     do not get treated as list items.
 4161 
 4162     This rule will not prevent
 4163 
 4164         (C) 2007 Joe Smith
 4165 
 4166     from being interpreted as a list item.  In this case, a backslash
 4167     escape can be used:
 4168 
 4169         (C\) 2007 Joe Smith
 4170 
 4171 The `fancy_lists` extension also allows '`#`' to be used as an
 4172 ordered list marker in place of a numeral:
 4173 
 4174     #. one
 4175     #. two
 4176 
 4177 Note:  the '`#`' ordered list marker doesn't work with `commonmark`.
 4178 
 4179 #### Extension: `startnum` ####
 4180 
 4181 Pandoc also pays attention to the type of list marker used, and to the
 4182 starting number, and both of these are preserved where possible in the
 4183 output format. Thus, the following yields a list with numbers followed
 4184 by a single parenthesis, starting with 9, and a sublist with lowercase
 4185 roman numerals:
 4186 
 4187      9)  Ninth
 4188     10)  Tenth
 4189     11)  Eleventh
 4190            i. subone
 4191           ii. subtwo
 4192          iii. subthree
 4193 
 4194 Pandoc will start a new list each time a different type of list
 4195 marker is used.  So, the following will create three lists:
 4196 
 4197     (2) Two
 4198     (5) Three
 4199     1.  Four
 4200     *   Five
 4201 
 4202 If default list markers are desired, use `#.`:
 4203 
 4204     #.  one
 4205     #.  two
 4206     #.  three
 4207 
 4208 #### Extension: `task_lists` ####
 4209 
 4210 Pandoc supports task lists, using the syntax of GitHub-Flavored Markdown.
 4211 
 4212     - [ ] an unchecked task list item
 4213     - [x] checked item
 4214 
 4215 ### Definition lists ###
 4216 
 4217 #### Extension: `definition_lists` ####
 4218 
 4219 Pandoc supports definition lists, using the syntax of
 4220 [PHP Markdown Extra] with some extensions.[^3]
 4221 
 4222     Term 1
 4223 
 4224     :   Definition 1
 4225 
 4226     Term 2 with *inline markup*
 4227 
 4228     :   Definition 2
 4229 
 4230             { some code, part of Definition 2 }
 4231 
 4232         Third paragraph of definition 2.
 4233 
 4234 Each term must fit on one line, which may optionally be followed by
 4235 a blank line, and must be followed by one or more definitions.
 4236 A definition begins with a colon or tilde, which may be indented one
 4237 or two spaces.
 4238 
 4239 A term may have multiple definitions, and each definition may
 4240 consist of one or more block elements (paragraph, code block,
 4241 list, etc.), each indented four spaces or one tab stop.  The
 4242 body of the definition (not including the first line)
 4243 should be indented four spaces. However, as with
 4244 other Markdown lists, you can "lazily" omit indentation except
 4245 at the beginning of a paragraph or other block element:
 4246 
 4247     Term 1
 4248 
 4249     :   Definition
 4250     with lazy continuation.
 4251 
 4252         Second paragraph of the definition.
 4253 
 4254 If you leave space before the definition (as in the example above),
 4255 the text of the definition will be treated as a paragraph.  In some
 4256 output formats, this will mean greater spacing between term/definition
 4257 pairs. For a more compact definition list, omit the space before the
 4258 definition:
 4259 
 4260     Term 1
 4261       ~ Definition 1
 4262 
 4263     Term 2
 4264       ~ Definition 2a
 4265       ~ Definition 2b
 4266 
 4267 Note that space between items in a definition list is required.
 4268 (A variant that loosens this requirement, but disallows "lazy"
 4269 hard wrapping, can be activated with the [`compact_definition_lists`
 4270 extension][Extension: `compact_definition_lists`].)
 4271 
 4272 [^3]:  I have been influenced by the suggestions of [David
 4273   Wheeler](https://justatheory.com/2009/02/modest-markdown-proposal/).
 4274 
 4275 ### Numbered example lists ###
 4276 
 4277 #### Extension: `example_lists` ####
 4278 
 4279 The special list marker `@` can be used for sequentially numbered
 4280 examples. The first list item with a `@` marker will be numbered '1',
 4281 the next '2', and so on, throughout the document. The numbered examples
 4282 need not occur in a single list; each new list using `@` will take up
 4283 where the last stopped. So, for example:
 4284 
 4285     (@)  My first example will be numbered (1).
 4286     (@)  My second example will be numbered (2).
 4287 
 4288     Explanation of examples.
 4289 
 4290     (@)  My third example will be numbered (3).
 4291 
 4292 Numbered examples can be labeled and referred to elsewhere in the
 4293 document:
 4294 
 4295     (@good)  This is a good example.
 4296 
 4297     As (@good) illustrates, ...
 4298 
 4299 The label can be any string of alphanumeric characters, underscores,
 4300 or hyphens.
 4301 
 4302 Note:  continuation paragraphs in example lists must always
 4303 be indented four spaces, regardless of the length of the
 4304 list marker.  That is, example lists always behave as if the
 4305 `four_space_rule` extension is set.  This is because example
 4306 labels tend to be long, and indenting content to the
 4307 first non-space character after the label would be awkward.
 4308 
 4309 
 4310 ### Ending a list ###
 4311 
 4312 What if you want to put an indented code block after a list?
 4313 
 4314     -   item one
 4315     -   item two
 4316 
 4317         { my code block }
 4318 
 4319 Trouble! Here pandoc (like other Markdown implementations) will treat
 4320 `{ my code block }` as the second paragraph of item two, and not as
 4321 a code block.
 4322 
 4323 To "cut off" the list after item two, you can insert some non-indented
 4324 content, like an HTML comment, which won't produce visible output in
 4325 any format:
 4326 
 4327     -   item one
 4328     -   item two
 4329 
 4330     <!-- end of list -->
 4331 
 4332         { my code block }
 4333 
 4334 You can use the same trick if you want two consecutive lists instead
 4335 of one big list:
 4336 
 4337     1.  one
 4338     2.  two
 4339     3.  three
 4340 
 4341     <!-- -->
 4342 
 4343     1.  uno
 4344     2.  dos
 4345     3.  tres
 4346 
 4347 ## Horizontal rules
 4348 
 4349 A line containing a row of three or more `*`, `-`, or `_` characters
 4350 (optionally separated by spaces) produces a horizontal rule:
 4351 
 4352     *  *  *  *
 4353 
 4354     ---------------
 4355 
 4356 We strongly recommend that horizontal rules be separated from
 4357 surrounding text by blank lines.  If a horizontal rule is not
 4358 followed by a blank line, pandoc may try to interpret the
 4359 lines that follow as a YAML metadata block or a table.
 4360 
 4361 ## Tables
 4362 
 4363 Four kinds of tables may be used. The first three kinds presuppose the use of
 4364 a fixed-width font, such as Courier. The fourth kind can be used with
 4365 proportionally spaced fonts, as it does not require lining up columns.
 4366 
 4367 #### Extension: `table_captions` ####
 4368 
 4369 A caption may optionally be provided with all 4 kinds of tables (as
 4370 illustrated in the examples below). A caption is a paragraph beginning
 4371 with the string `Table:` (or `table:` or just `:`), which will be stripped
 4372 off. It may appear either before or after the table.
 4373 
 4374 #### Extension: `simple_tables` ####
 4375 
 4376 Simple tables look like this:
 4377 
 4378       Right     Left     Center     Default
 4379     -------     ------ ----------   -------
 4380          12     12        12            12
 4381         123     123       123          123
 4382           1     1          1             1
 4383 
 4384     Table:  Demonstration of simple table syntax.
 4385 
 4386 The header and table rows must each fit on one line.  Column
 4387 alignments are determined by the position of the header text relative
 4388 to the dashed line below it:[^4]
 4389 
 4390   - If the dashed line is flush with the header text on the right side
 4391     but extends beyond it on the left, the column is right-aligned.
 4392   - If the dashed line is flush with the header text on the left side
 4393     but extends beyond it on the right, the column is left-aligned.
 4394   - If the dashed line extends beyond the header text on both sides,
 4395     the column is centered.
 4396   - If the dashed line is flush with the header text on both sides,
 4397     the default alignment is used (in most cases, this will be left).
 4398 
 4399 [^4]:  This scheme is due to Michel Fortin, who proposed it on the
 4400        [Markdown discussion list](http://six.pairlist.net/pipermail/markdown-discuss/2005-March/001097.html).
 4401 
 4402 The table must end with a blank line, or a line of dashes followed by
 4403 a blank line.
 4404 
 4405 The column header row may be omitted, provided a dashed line is used
 4406 to end the table. For example:
 4407 
 4408     -------     ------ ----------   -------
 4409          12     12        12             12
 4410         123     123       123           123
 4411           1     1          1              1
 4412     -------     ------ ----------   -------
 4413 
 4414 When the header row is omitted, column alignments are determined on the basis
 4415 of the first line of the table body. So, in the tables above, the columns
 4416 would be right, left, center, and right aligned, respectively.
 4417 
 4418 #### Extension: `multiline_tables` ####
 4419 
 4420 Multiline tables allow header and table rows to span multiple lines
 4421 of text (but cells that span multiple columns or rows of the table are
 4422 not supported).  Here is an example:
 4423 
 4424     -------------------------------------------------------------
 4425      Centered   Default           Right Left
 4426       Header    Aligned         Aligned Aligned
 4427     ----------- ------- --------------- -------------------------
 4428        First    row                12.0 Example of a row that
 4429                                         spans multiple lines.
 4430 
 4431       Second    row                 5.0 Here's another one. Note
 4432                                         the blank line between
 4433                                         rows.
 4434     -------------------------------------------------------------
 4435 
 4436     Table: Here's the caption. It, too, may span
 4437     multiple lines.
 4438 
 4439 These work like simple tables, but with the following differences:
 4440 
 4441   - They must begin with a row of dashes, before the header text
 4442     (unless the header row is omitted).
 4443   - They must end with a row of dashes, then a blank line.
 4444   - The rows must be separated by blank lines.
 4445 
 4446 In multiline tables, the table parser pays attention to the widths of
 4447 the columns, and the writers try to reproduce these relative widths in
 4448 the output. So, if you find that one of the columns is too narrow in the
 4449 output, try widening it in the Markdown source.
 4450 
 4451 The header may be omitted in multiline tables as well as simple tables:
 4452 
 4453     ----------- ------- --------------- -------------------------
 4454        First    row                12.0 Example of a row that
 4455                                         spans multiple lines.
 4456 
 4457       Second    row                 5.0 Here's another one. Note
 4458                                         the blank line between
 4459                                         rows.
 4460     ----------- ------- --------------- -------------------------
 4461 
 4462     : Here's a multiline table without a header.
 4463 
 4464 It is possible for a multiline table to have just one row, but the row
 4465 should be followed by a blank line (and then the row of dashes that ends
 4466 the table), or the table may be interpreted as a simple table.
 4467 
 4468 #### Extension: `grid_tables` ####
 4469 
 4470 Grid tables look like this:
 4471 
 4472     : Sample grid table.
 4473 
 4474     +---------------+---------------+--------------------+
 4475     | Fruit         | Price         | Advantages         |
 4476     +===============+===============+====================+
 4477     | Bananas       | $1.34         | - built-in wrapper |
 4478     |               |               | - bright color     |
 4479     +---------------+---------------+--------------------+
 4480     | Oranges       | $2.10         | - cures scurvy     |
 4481     |               |               | - tasty            |
 4482     +---------------+---------------+--------------------+
 4483 
 4484 The row of `=`s separates the header from the table body,
 4485 and can be omitted for a headerless table. The cells of grid
 4486 tables may contain arbitrary block elements (multiple
 4487 paragraphs, code blocks, lists, etc.).
 4488 
 4489 Cells can span multiple columns or rows:
 4490 
 4491     +---------------------+----------+
 4492     | Property            | Earth    |
 4493     +=============+=======+==========+
 4494     |             | min   | -89.2 °C |
 4495     | Temperature +-------+----------+
 4496     | 1961-1990   | mean  | 14 °C    |
 4497     |             +-------+----------+
 4498     |             | max   | 56.7 °C  |
 4499     +-------------+-------+----------+
 4500 
 4501 A table header may contain more than one row:
 4502 
 4503     +---------------------+-----------------------+
 4504     | Location            | Temperature 1961-1990 |
 4505     |                     | in degree Celsius     |
 4506     |                     +-------+-------+-------+
 4507     |                     | min   | mean  | max   |
 4508     +=====================+=======+=======+=======+
 4509     | Antarctica          | -89.2 | N/A   | 19.8  |
 4510     +---------------------+-------+-------+-------+
 4511     | Earth               | -89.2 | 14    | 56.7  |
 4512     +---------------------+-------+-------+-------+
 4513 
 4514 Alignments can be specified as with pipe tables, by putting
 4515 colons at the boundaries of the separator line after the
 4516 header:
 4517 
 4518     +---------------+---------------+--------------------+
 4519     | Right         | Left          | Centered           |
 4520     +==============:+:==============+:==================:+
 4521     | Bananas       | $1.34         | built-in wrapper   |
 4522     +---------------+---------------+--------------------+
 4523 
 4524 For headerless tables, the colons go on the top line instead:
 4525 
 4526     +--------------:+:--------------+:------------------:+
 4527     | Right         | Left          | Centered           |
 4528     +---------------+---------------+--------------------+
 4529 
 4530 A table foot can be defined by enclosing it with separator lines
 4531 that use `=` instead of `-`:
 4532 
 4533      +---------------+---------------+
 4534      | Fruit         | Price         |
 4535      +===============+===============+
 4536      | Bananas       | $1.34         |
 4537      +---------------+---------------+
 4538      | Oranges       | $2.10         |
 4539      +===============+===============+
 4540      | Sum           | $3.44         |
 4541      +===============+===============+
 4542 
 4543 The foot must always be placed at the very bottom of the table.
 4544 
 4545 Grid tables can be created easily using Emacs' table-mode
 4546 (`M-x table-insert`).
 4547 
 4548 #### Extension: `pipe_tables` ####
 4549 
 4550 Pipe tables look like this:
 4551 
 4552     | Right | Left | Default | Center |
 4553     |------:|:-----|---------|:------:|
 4554     |   12  |  12  |    12   |    12  |
 4555     |  123  |  123 |   123   |   123  |
 4556     |    1  |    1 |     1   |     1  |
 4557 
 4558       : Demonstration of pipe table syntax.
 4559 
 4560 The syntax is identical to [PHP Markdown Extra tables].  The beginning and
 4561 ending pipe characters are optional, but pipes are required between all
 4562 columns.  The colons indicate column alignment as shown.  The header
 4563 cannot be omitted.  To simulate a headerless table, include a header
 4564 with blank cells.
 4565 
 4566 Since the pipes indicate column boundaries, columns need not be vertically
 4567 aligned, as they are in the above example.  So, this is a perfectly
 4568 legal (though ugly) pipe table:
 4569 
 4570     fruit| price
 4571     -----|-----:
 4572     apple|2.05
 4573     pear|1.37
 4574     orange|3.09
 4575 
 4576 The cells of pipe tables cannot contain block elements like paragraphs
 4577 and lists, and cannot span multiple lines.  If any line of the
 4578 markdown source is longer than the column width (see `--columns`),
 4579 then the table will take up the full text width and the cell
 4580 contents will wrap, with the relative cell widths determined by
 4581 the number of dashes in the line separating the table header
 4582 from the table body. (For example `---|-` would make the first column 3/4
 4583 and the second column 1/4 of the full text width.)
 4584 On the other hand, if no lines are wider than column width, then
 4585 cell contents will not be wrapped, and the cells will be sized
 4586 to their contents.
 4587 
 4588 Note:  pandoc also recognizes pipe tables of the following
 4589 form, as can be produced by Emacs' orgtbl-mode:
 4590 
 4591     | One | Two   |
 4592     |-----+-------|
 4593     | my  | table |
 4594     | is  | nice  |
 4595 
 4596 The difference is that `+` is used instead of `|`. Other orgtbl features
 4597 are not supported. In particular, to get non-default column alignment,
 4598 you'll need to add colons as above.
 4599 
 4600 [PHP Markdown Extra tables]: https://michelf.ca/projects/php-markdown/extra/#table
 4601 
 4602 ## Metadata blocks
 4603 
 4604 #### Extension: `pandoc_title_block` ####
 4605 
 4606 If the file begins with a title block
 4607 
 4608     % title
 4609     % author(s) (separated by semicolons)
 4610     % date
 4611 
 4612 it will be parsed as bibliographic information, not regular text.  (It
 4613 will be used, for example, in the title of standalone LaTeX or HTML
 4614 output.)  The block may contain just a title, a title and an author,
 4615 or all three elements. If you want to include an author but no
 4616 title, or a title and a date but no author, you need a blank line:
 4617 
 4618 ```
 4619 %
 4620 % Author
 4621 ```
 4622 
 4623 ```
 4624 % My title
 4625 %
 4626 % June 15, 2006
 4627 ```
 4628 
 4629 The title may occupy multiple lines, but continuation lines must
 4630 begin with leading space, thus:
 4631 
 4632 ```
 4633 % My title
 4634   on multiple lines
 4635 ```
 4636 
 4637 If a document has multiple authors, the authors may be put on
 4638 separate lines with leading space, or separated by semicolons, or
 4639 both.  So, all of the following are equivalent:
 4640 
 4641 ```
 4642 % Author One
 4643   Author Two
 4644 ```
 4645 
 4646 ```
 4647 % Author One; Author Two
 4648 ```
 4649 
 4650 ```
 4651 % Author One;
 4652   Author Two
 4653 ```
 4654 
 4655 The date must fit on one line.
 4656 
 4657 All three metadata fields may contain standard inline formatting
 4658 (italics, links, footnotes, etc.).
 4659 
 4660 Title blocks will always be parsed, but they will affect the output only
 4661 when the `--standalone` (`-s`) option is chosen. In HTML output, titles
 4662 will appear twice: once in the document head -- this is the title that
 4663 will appear at the top of the window in a browser -- and once at the
 4664 beginning of the document body. The title in the document head can have
 4665 an optional prefix attached (`--title-prefix` or `-T` option). The title
 4666 in the body appears as an H1 element with class "title", so it can be
 4667 suppressed or reformatted with CSS. If a title prefix is specified with
 4668 `-T` and no title block appears in the document, the title prefix will
 4669 be used by itself as the HTML title.
 4670 
 4671 The man page writer extracts a title, man page section number, and
 4672 other header and footer information from the title line. The title
 4673 is assumed to be the first word on the title line, which may optionally
 4674 end with a (single-digit) section number in parentheses. (There should
 4675 be no space between the title and the parentheses.)  Anything after
 4676 this is assumed to be additional footer and header text. A single pipe
 4677 character (`|`) should be used to separate the footer text from the header
 4678 text.  Thus,
 4679 
 4680     % PANDOC(1)
 4681 
 4682 will yield a man page with the title `PANDOC` and section 1.
 4683 
 4684     % PANDOC(1) Pandoc User Manuals
 4685 
 4686 will also have "Pandoc User Manuals" in the footer.
 4687 
 4688     % PANDOC(1) Pandoc User Manuals | Version 4.0
 4689 
 4690 will also have "Version 4.0" in the header.
 4691 
 4692 #### Extension: `yaml_metadata_block` ####
 4693 
 4694 A [YAML] metadata block is a valid YAML object, delimited by a line of three
 4695 hyphens (`---`) at the top and a line of three hyphens (`---`) or three dots
 4696 (`...`) at the bottom.  The initial line `---` must not be followed by a blank
 4697 line. A YAML metadata block may occur anywhere in the document, but if
 4698 it is not at the beginning, it must be preceded by a blank line.
 4699 
 4700 Note that, because of the way pandoc concatenates input files
 4701 when several are provided, you may also keep the metadata in a
 4702 separate YAML file and pass it to pandoc as an argument, along
 4703 with your Markdown files:
 4704 
 4705     pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html
 4706 
 4707 Just be sure that the YAML file begins with `---` and ends with `---` or
 4708 `...`. Alternatively, you can use the `--metadata-file` option. Using
 4709 that approach however, you cannot reference content (like footnotes)
 4710 from the main markdown input document.
 4711 
 4712 Metadata will be taken from the fields of the YAML object and added to any
 4713 existing document metadata.  Metadata can contain lists and objects (nested
 4714 arbitrarily), but all string scalars will be interpreted as Markdown.  Fields
 4715 with names ending in an underscore will be ignored by pandoc.  (They may be
 4716 given a role by external processors.)  Field names must not be
 4717 interpretable as YAML numbers or boolean values (so, for
 4718 example, `yes`, `True`, and `15` cannot be used as field names).
 4719 
 4720 A document may contain multiple metadata blocks.  If two
 4721 metadata blocks attempt to set the same field, the value from
 4722 the second block will be taken.
 4723 
 4724 Each metadata block is handled internally as an independent YAML document.
 4725 This means, for example, that any YAML anchors defined in a block cannot be
 4726 referenced in another block.
 4727 
 4728 When pandoc is used with `-t markdown` to create a Markdown document,
 4729 a YAML metadata block will be produced only if the `-s/--standalone`
 4730 option is used.  All of the metadata will appear in a single block
 4731 at the beginning of the document.
 4732 
 4733 Note that [YAML] escaping rules must be followed. Thus, for example,
 4734 if a title contains a colon, it must be quoted, and if it contains a
 4735 backslash escape, then it must be ensured that it is not treated as a
 4736 [YAML escape sequence]. The pipe character (`|`) can be used to begin
 4737 an indented block that will be interpreted literally, without need for
 4738 escaping. This form is necessary when the field contains blank lines
 4739 or block-level formatting:
 4740 
 4741     ---
 4742     title:  'This is the title: it contains a colon'
 4743     author:
 4744     - Author One
 4745     - Author Two
 4746     keywords: [nothing, nothingness]
 4747     abstract: |
 4748       This is the abstract.
 4749 
 4750       It consists of two paragraphs.
 4751     ...
 4752 
 4753 The literal block after the `|` must be indented relative to the
 4754 line containing the `|`.  If it is not, the YAML will be invalid
 4755 and pandoc will not interpret it as metadata.  For an overview
 4756 of the complex rules governing YAML, see the [Wikipedia entry on
 4757 YAML syntax].
 4758 
 4759 Template variables will be set automatically from the metadata.  Thus, for
 4760 example, in writing HTML, the variable `abstract` will be set to the HTML
 4761 equivalent of the Markdown in the `abstract` field:
 4762 
 4763     <p>This is the abstract.</p>
 4764     <p>It consists of two paragraphs.</p>
 4765 
 4766 Variables can contain arbitrary YAML structures, but the template must match
 4767 this structure.  The `author` variable in the default templates expects a
 4768 simple list or string, but can be changed to support more complicated
 4769 structures.  The following combination, for example, would add an affiliation
 4770 to the author if one is given:
 4771 
 4772     ---
 4773     title: The document title
 4774     author:
 4775     - name: Author One
 4776       affiliation: University of Somewhere
 4777     - name: Author Two
 4778       affiliation: University of Nowhere
 4779     ...
 4780 
 4781 To use the structured authors in the example above, you would need a custom
 4782 template:
 4783 
 4784     $for(author)$
 4785     $if(author.name)$
 4786     $author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$
 4787     $else$
 4788     $author$
 4789     $endif$
 4790     $endfor$
 4791 
 4792 Raw content to include in the document's header may be specified
 4793 using `header-includes`; however, it is important to mark up
 4794 this content as raw code for a particular output format, using
 4795 the [`raw_attribute` extension](#extension-raw_attribute), or it
 4796 will be interpreted as markdown. For example:
 4797 
 4798     header-includes:
 4799     - |
 4800       ```{=latex}
 4801       \let\oldsection\section
 4802       \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
 4803       ```
 4804 
 4805 Note:  the `yaml_metadata_block` extension works with
 4806 `commonmark` as well as `markdown` (and it is enabled by default
 4807 in `gfm` and `commonmark_x`).  However, in these formats the
 4808 following restrictions apply:
 4809 
 4810 - The YAML metadata block must occur at the beginning of the
 4811   document (and there can be only one).  If multiple files are
 4812   given as arguments to pandoc, only the first can be a YAML
 4813   metadata block.
 4814 
 4815 - The leaf nodes of the YAML structure are parsed in isolation from
 4816   each other and from the rest of the document.  So, for
 4817   example,  you can't use a reference link in these contexts
 4818   if the link definition is somewhere else in the document.
 4819 
 4820 [YAML escape sequence]: https://yaml.org/spec/1.2/spec.html#id2776092
 4821 [Wikipedia entry on YAML syntax]:  https://en.wikipedia.org/wiki/YAML#Syntax
 4822 
 4823 ## Backslash escapes
 4824 
 4825 #### Extension: `all_symbols_escapable` ####
 4826 
 4827 Except inside a code block or inline code, any punctuation or space
 4828 character preceded by a backslash will be treated literally, even if it
 4829 would normally indicate formatting.  Thus, for example, if one writes
 4830 
 4831     *\*hello\**
 4832 
 4833 one will get
 4834 
 4835     <em>*hello*</em>
 4836 
 4837 instead of
 4838 
 4839     <strong>hello</strong>
 4840 
 4841 This rule is easier to remember than original Markdown's rule,
 4842 which allows only the following characters to be backslash-escaped:
 4843 
 4844     \`*_{}[]()>#+-.!
 4845 
 4846 (However, if the `markdown_strict` format is used, the original Markdown rule
 4847 will be used.)
 4848 
 4849 A backslash-escaped space is parsed as a nonbreaking space. In TeX output,
 4850 it will appear as `~`. In HTML and XML output, it will appear as a
 4851 literal unicode nonbreaking space character (note that it will thus
 4852 actually look "invisible" in the generated HTML source; you can still
 4853 use the `--ascii` command-line option to make it appear as an explicit
 4854 entity).
 4855 
 4856 A backslash-escaped newline (i.e. a backslash occurring at the end of
 4857 a line) is parsed as a hard line break.  It will appear in TeX output as
 4858 `\\` and in HTML as `<br />`.  This is a nice alternative to
 4859 Markdown's "invisible" way of indicating hard line breaks using
 4860 two trailing spaces on a line.
 4861 
 4862 Backslash escapes do not work in verbatim contexts.
 4863 
 4864 ## Inline formatting
 4865 
 4866 ### Emphasis ###
 4867 
 4868 To *emphasize* some text, surround it with `*`s or `_`, like this:
 4869 
 4870     This text is _emphasized with underscores_, and this
 4871     is *emphasized with asterisks*.
 4872 
 4873 Double `*` or `_` produces **strong emphasis**:
 4874 
 4875     This is **strong emphasis** and __with underscores__.
 4876 
 4877 A `*` or `_` character surrounded by spaces, or backslash-escaped,
 4878 will not trigger emphasis:
 4879 
 4880     This is * not emphasized *, and \*neither is this\*.
 4881 
 4882 #### Extension: `intraword_underscores` ####
 4883 
 4884 Because `_` is sometimes used inside words and identifiers,
 4885 pandoc does not interpret a `_` surrounded by alphanumeric
 4886 characters as an emphasis marker.  If you want to emphasize
 4887 just part of a word, use `*`:
 4888 
 4889     feas*ible*, not feas*able*.
 4890 
 4891 ### Strikeout ###
 4892 
 4893 #### Extension: `strikeout` ####
 4894 
 4895 To strike out a section of text with a horizontal line, begin and end it
 4896 with `~~`. Thus, for example,
 4897 
 4898     This ~~is deleted text.~~
 4899 
 4900 
 4901 ### Superscripts and subscripts ###
 4902 
 4903 #### Extension: `superscript`, `subscript` ####
 4904 
 4905 Superscripts may be written by surrounding the superscripted text by `^`
 4906 characters; subscripts may be written by surrounding the subscripted
 4907 text by `~` characters.  Thus, for example,
 4908 
 4909     H~2~O is a liquid.  2^10^ is 1024.
 4910 
 4911 The text between `^...^` or `~...~` may not contain spaces or
 4912 newlines.  If the superscripted or subscripted text contains
 4913 spaces, these spaces must be escaped with backslashes.  (This is
 4914 to prevent accidental superscripting and subscripting through
 4915 the ordinary use of `~` and `^`, and also bad interactions with
 4916 footnotes.) Thus, if you want the letter P with 'a cat' in
 4917 subscripts, use `P~a\ cat~`, not `P~a cat~`.
 4918 
 4919 ### Verbatim ###
 4920 
 4921 To make a short span of text verbatim, put it inside backticks:
 4922 
 4923     What is the difference between `>>=` and `>>`?
 4924 
 4925 If the verbatim text includes a backtick, use double backticks:
 4926 
 4927     Here is a literal backtick `` ` ``.
 4928 
 4929 (The spaces after the opening backticks and before the closing
 4930 backticks will be ignored.)
 4931 
 4932 The general rule is that a verbatim span starts with a string
 4933 of consecutive backticks (optionally followed by a space)
 4934 and ends with a string of the same number of backticks (optionally
 4935 preceded by a space).
 4936 
 4937 Note that backslash-escapes (and other Markdown constructs) do not
 4938 work in verbatim contexts:
 4939 
 4940     This is a backslash followed by an asterisk: `\*`.
 4941 
 4942 #### Extension: `inline_code_attributes` ####
 4943 
 4944 Attributes can be attached to verbatim text, just as with
 4945 [fenced code blocks]:
 4946 
 4947     `<$>`{.haskell}
 4948 
 4949 ### Underline ###
 4950 
 4951 To underline text, use the `underline` class:
 4952 
 4953     [Underline]{.underline}
 4954 
 4955 Or, without the `bracketed_spans` extension (but with `native_spans`):
 4956 
 4957     <span class="underline">Underline</span>
 4958 
 4959 This will work in all output formats that support underline.
 4960 
 4961 ### Small caps ###
 4962 
 4963 To write small caps, use the `smallcaps` class:
 4964 
 4965     [Small caps]{.smallcaps}
 4966 
 4967 Or, without the `bracketed_spans` extension:
 4968 
 4969     <span class="smallcaps">Small caps</span>
 4970 
 4971 For compatibility with other Markdown flavors, CSS is also supported:
 4972 
 4973     <span style="font-variant:small-caps;">Small caps</span>
 4974 
 4975 This will work in all output formats that support small caps.
 4976 
 4977 ### Highlighting ###
 4978 
 4979 To highlight text, use the `mark` class:
 4980 
 4981     [Mark]{.mark}
 4982 
 4983 Or, without the `bracketed_spans` extension (but with `native_spans`):
 4984 
 4985     <span class="mark">Mark</span>
 4986 
 4987 This will work in all output formats that support highlighting.
 4988 
 4989 
 4990 ## Math
 4991 
 4992 #### Extension: `tex_math_dollars` ####
 4993 
 4994 Anything between two `$` characters will be treated as TeX math.  The
 4995 opening `$` must have a non-space character immediately to its right,
 4996 while the closing `$` must have a non-space character immediately to its
 4997 left, and must not be followed immediately by a digit.  Thus,
 4998 `$20,000 and $30,000` won't parse as math.  If for some reason
 4999 you need to enclose text in literal `$` characters, backslash-escape
 5000 them and they won't be treated as math delimiters.
 5001 
 5002 For display math, use `$$` delimiters.  (In this case, the delimiters
 5003 may be separated from the formula by whitespace.  However, there can be
 5004 no blank lines between the opening and closing `$$` delimiters.)
 5005 
 5006 TeX math will be printed in all output formats. How it is rendered
 5007 depends on the output format:
 5008 
 5009 LaTeX
 5010   ~ It will appear verbatim surrounded by `\(...\)` (for inline
 5011     math) or `\[...\]` (for display math).
 5012 
 5013 Markdown, Emacs Org mode, ConTeXt, ZimWiki
 5014   ~ It will appear verbatim surrounded by `$...$` (for inline
 5015     math) or `$$...$$` (for display math).
 5016 
 5017 XWiki
 5018   ~ It will appear verbatim surrounded by `{{formula}}..{{/formula}}`.
 5019 
 5020 reStructuredText
 5021   ~ It will be rendered using an [interpreted text role `:math:`].
 5022 
 5023 AsciiDoc
 5024   ~ For AsciiDoc output math will appear verbatim surrounded by
 5025     `latexmath:[...]`. For `asciidoc_legacy` the bracketed
 5026     material will also include inline or display math delimiters.
 5027 
 5028 Texinfo
 5029   ~ It will be rendered inside a `@math` command.
 5030 
 5031 roff man, Jira markup
 5032   ~ It will be rendered verbatim without `$`'s.
 5033 
 5034 MediaWiki, DokuWiki
 5035   ~ It will be rendered inside `<math>` tags.
 5036 
 5037 Textile
 5038   ~ It will be rendered inside `<span class="math">` tags.
 5039 
 5040 RTF, OpenDocument
 5041   ~ It will be rendered, if possible, using Unicode characters,
 5042     and will otherwise appear verbatim.
 5043 
 5044 ODT
 5045   ~ It will be rendered, if possible, using MathML.
 5046 
 5047 DocBook
 5048   ~ If the `--mathml` flag is used, it will be rendered using MathML
 5049     in an `inlineequation` or `informalequation` tag.  Otherwise it
 5050     will be rendered, if possible, using Unicode characters.
 5051 
 5052 Docx and PowerPoint
 5053   ~ It will be rendered using OMML math markup.
 5054 
 5055 FictionBook2
 5056   ~ If the `--webtex` option is used, formulas are rendered as images
 5057     using CodeCogs or other compatible web service, downloaded
 5058     and embedded in the e-book. Otherwise, they will appear verbatim.
 5059 
 5060 HTML, Slidy, DZSlides, S5, EPUB
 5061   ~ The way math is rendered in HTML will depend on the
 5062     command-line options selected. Therefore see [Math rendering in HTML]
 5063     above.
 5064 
 5065 [interpreted text role `:math:`]: https://docutils.sourceforge.io/docs/ref/rst/roles.html#math
 5066 
 5067 ## Raw HTML
 5068 
 5069 #### Extension: `raw_html` ####
 5070 
 5071 Markdown allows you to insert raw HTML (or DocBook) anywhere in a document
 5072 (except verbatim contexts, where `<`, `>`, and `&` are interpreted
 5073 literally).  (Technically this is not an extension, since standard
 5074 Markdown allows it, but it has been made an extension so that it can
 5075 be disabled if desired.)
 5076 
 5077 The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous,
 5078 DZSlides, EPUB, Markdown, CommonMark, Emacs Org mode, and Textile
 5079 output, and suppressed in other formats.
 5080 
 5081 For a more explicit way of including raw HTML in a Markdown
 5082 document, see the [`raw_attribute` extension][Extension: `raw_attribute`].
 5083 
 5084 In the CommonMark format, if `raw_html` is enabled, superscripts,
 5085 subscripts, strikeouts and small capitals will be represented as HTML.
 5086 Otherwise, plain-text fallbacks will be used. Note that even if
 5087 `raw_html` is disabled, tables will be rendered with HTML syntax if
 5088 they cannot use pipe syntax.
 5089 
 5090 #### Extension: `markdown_in_html_blocks` ####
 5091 
 5092 Original Markdown allows you to include HTML "blocks":  blocks
 5093 of HTML between balanced tags that are separated from the surrounding text
 5094 with blank lines, and start and end at the left margin.  Within
 5095 these blocks, everything is interpreted as HTML, not Markdown;
 5096 so (for example), `*` does not signify emphasis.
 5097 
 5098 Pandoc behaves this way when the `markdown_strict` format is used; but
 5099 by default, pandoc interprets material between HTML block tags as Markdown.
 5100 Thus, for example, pandoc will turn
 5101 
 5102     <table>
 5103     <tr>
 5104     <td>*one*</td>
 5105     <td>[a link](https://google.com)</td>
 5106     </tr>
 5107     </table>
 5108 
 5109 into
 5110 
 5111     <table>
 5112     <tr>
 5113     <td><em>one</em></td>
 5114     <td><a href="https://google.com">a link</a></td>
 5115     </tr>
 5116     </table>
 5117 
 5118 whereas `Markdown.pl` will preserve it as is.
 5119 
 5120 There is one exception to this rule:  text between `<script>`,
 5121 `<style>`, and `<textarea>` tags is not interpreted as Markdown.
 5122 
 5123 This departure from original Markdown should make it easier to mix
 5124 Markdown with HTML block elements.  For example, one can surround
 5125 a block of Markdown text with `<div>` tags without preventing it
 5126 from being interpreted as Markdown.
 5127 
 5128 #### Extension: `native_divs` ####
 5129 
 5130 Use native pandoc `Div` blocks for content inside `<div>` tags.
 5131 For the most part this should give the same output as
 5132 `markdown_in_html_blocks`, but it makes it easier to write pandoc
 5133 filters to manipulate groups of blocks.
 5134 
 5135 #### Extension: `native_spans` ####
 5136 
 5137 Use native pandoc `Span` blocks for content inside `<span>` tags.
 5138 For the most part this should give the same output as `raw_html`,
 5139 but it makes it easier to write pandoc filters to manipulate groups
 5140 of inlines.
 5141 
 5142 #### Extension: `raw_tex` ####
 5143 
 5144 In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
 5145 included in a document. Inline TeX commands will be preserved and passed
 5146 unchanged to the LaTeX and ConTeXt writers. Thus, for example, you can use
 5147 LaTeX to include BibTeX citations:
 5148 
 5149     This result was proved in \cite{jones.1967}.
 5150 
 5151 Note that in LaTeX environments, like
 5152 
 5153     \begin{tabular}{|l|l|}\hline
 5154     Age & Frequency \\ \hline
 5155     18--25  & 15 \\
 5156     26--35  & 33 \\
 5157     36--45  & 22 \\ \hline
 5158     \end{tabular}
 5159 
 5160 the material between the begin and end tags will be interpreted as raw
 5161 LaTeX, not as Markdown.
 5162 
 5163 For a more explicit and flexible way of including raw TeX in a
 5164 Markdown document, see the [`raw_attribute`
 5165 extension][Extension: `raw_attribute`].
 5166 
 5167 Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
 5168 Emacs Org mode, and ConTeXt.
 5169 
 5170 ### Generic raw attribute ###
 5171 
 5172 #### Extension: `raw_attribute` ####
 5173 
 5174 Inline spans and fenced code blocks with a special
 5175 kind of attribute will be parsed as raw content with the
 5176 designated format.  For example, the following produces a raw
 5177 roff `ms` block:
 5178 
 5179     ```{=ms}
 5180     .MYMACRO
 5181     blah blah
 5182     ```
 5183 And the following produces a raw `html` inline element:
 5184 
 5185     This is `<a>html</a>`{=html}
 5186 
 5187 This can be useful to insert raw xml into `docx` documents, e.g.
 5188 a pagebreak:
 5189 
 5190     ```{=openxml}
 5191     <w:p>
 5192       <w:r>
 5193         <w:br w:type="page"/>
 5194       </w:r>
 5195     </w:p>
 5196     ```
 5197 
 5198 The format name should match the target format name (see
 5199 `-t/--to`, above, for a list, or use `pandoc
 5200 --list-output-formats`). Use `openxml` for `docx` output,
 5201 `opendocument` for `odt` output, `html5` for `epub3` output,
 5202 `html4` for `epub2` output, and `latex`, `beamer`,
 5203 `ms`, or `html5` for `pdf` output (depending on what you
 5204 use for `--pdf-engine`).
 5205 
 5206 This extension presupposes that the relevant kind of
 5207 inline code or fenced code block is enabled.  Thus, for
 5208 example, to use a raw attribute with a backtick code block,
 5209 `backtick_code_blocks` must be enabled.
 5210 
 5211 The raw attribute cannot be combined with regular attributes.
 5212 
 5213 ## LaTeX macros
 5214 
 5215 #### Extension: `latex_macros` ####
 5216 
 5217 When this extension is enabled, pandoc will parse LaTeX
 5218 macro definitions and apply the resulting macros to all LaTeX
 5219 math and raw LaTeX.  So, for example, the following will work in
 5220 all output formats, not just LaTeX:
 5221 
 5222     \newcommand{\tuple}[1]{\langle #1 \rangle}
 5223 
 5224     $\tuple{a, b, c}$
 5225 
 5226 Note that LaTeX macros will not be applied if they occur
 5227 inside a raw span or block marked with the
 5228 [`raw_attribute` extension](#extension-raw_attribute).
 5229 
 5230 When `latex_macros` is disabled, the raw LaTeX and math will
 5231 not have macros applied. This is usually a better approach when
 5232 you are targeting LaTeX or PDF.
 5233 
 5234 Macro definitions in LaTeX will be passed through as raw LaTeX
 5235 only if `latex_macros` is not enabled.  Macro definitions in
 5236 Markdown source (or other formats allowing `raw_tex`) will
 5237 be passed through regardless of whether `latex_macros` is
 5238 enabled.
 5239 
 5240 ## Links
 5241 
 5242 Markdown allows links to be specified in several ways.
 5243 
 5244 ### Automatic links ###
 5245 
 5246 If you enclose a URL or email address in pointy brackets, it
 5247 will become a link:
 5248 
 5249     <https://google.com>
 5250     <sam@green.eggs.ham>
 5251 
 5252 ### Inline links ###
 5253 
 5254 An inline link consists of the link text in square brackets,
 5255 followed by the URL in parentheses. (Optionally, the URL can
 5256 be followed by a link title, in quotes.)
 5257 
 5258     This is an [inline link](/url), and here's [one with
 5259     a title](https://fsf.org "click here for a good time!").
 5260 
 5261 There can be no space between the bracketed part and the parenthesized part.
 5262 The link text can contain formatting (such as emphasis), but the title cannot.
 5263 
 5264 Email addresses in inline links are not autodetected, so they have to be
 5265 prefixed with `mailto`:
 5266 
 5267     [Write me!](mailto:sam@green.eggs.ham)
 5268 
 5269 ### Reference links ###
 5270 
 5271 An *explicit* reference link has two parts, the link itself and the link
 5272 definition, which may occur elsewhere in the document (either
 5273 before or after the link).
 5274 
 5275 The link consists of link text in square brackets, followed by a label in
 5276 square brackets. (There cannot be space between the two unless the
 5277 `spaced_reference_links` extension is enabled.) The link definition
 5278 consists of the bracketed label, followed by a colon and a space, followed by
 5279 the URL, and optionally (after a space) a link title either in quotes or in
 5280 parentheses.  The label must not be parseable as a citation (assuming
 5281 the `citations` extension is enabled):  citations take precedence over
 5282 link labels.
 5283 
 5284 Here are some examples:
 5285 
 5286     [my label 1]: /foo/bar.html  "My title, optional"
 5287     [my label 2]: /foo
 5288     [my label 3]: https://fsf.org (The Free Software Foundation)
 5289     [my label 4]: /bar#special  'A title in single quotes'
 5290 
 5291 The URL may optionally be surrounded by angle brackets:
 5292 
 5293     [my label 5]: <http://foo.bar.baz>
 5294 
 5295 The title may go on the next line:
 5296 
 5297     [my label 3]: https://fsf.org
 5298       "The Free Software Foundation"
 5299 
 5300 Note that link labels are not case sensitive.  So, this will work:
 5301 
 5302     Here is [my link][FOO]
 5303 
 5304     [Foo]: /bar/baz
 5305 
 5306 In an *implicit* reference link, the second pair of brackets is
 5307 empty:
 5308 
 5309     See [my website][].
 5310 
 5311     [my website]: http://foo.bar.baz
 5312 
 5313 Note:  In `Markdown.pl` and most other Markdown implementations,
 5314 reference link definitions cannot occur in nested constructions
 5315 such as list items or block quotes.  Pandoc lifts this
 5316 arbitrary-seeming restriction.  So the following is fine in pandoc,
 5317 though not in most other implementations:
 5318 
 5319     > My block [quote].
 5320     >
 5321     > [quote]: /foo
 5322 
 5323 #### Extension: `shortcut_reference_links` ####
 5324 
 5325 In a *shortcut* reference link, the second pair of brackets may
 5326 be omitted entirely:
 5327 
 5328     See [my website].
 5329 
 5330     [my website]: http://foo.bar.baz
 5331 
 5332 ### Internal links ###
 5333 
 5334 To link to another section of the same document, use the automatically
 5335 generated identifier (see [Heading identifiers]). For example:
 5336 
 5337     See the [Introduction](#introduction).
 5338 
 5339 or
 5340 
 5341     See the [Introduction].
 5342 
 5343     [Introduction]: #introduction
 5344 
 5345 Internal links are currently supported for HTML formats (including
 5346 HTML slide shows and EPUB), LaTeX, and ConTeXt.
 5347 
 5348 ## Images
 5349 
 5350 A link immediately preceded by a `!` will be treated as an image.
 5351 The link text will be used as the image's alt text:
 5352 
 5353     ![la lune](lalune.jpg "Voyage to the moon")
 5354 
 5355     ![movie reel]
 5356 
 5357     [movie reel]: movie.gif
 5358 
 5359 #### Extension: `implicit_figures` ####
 5360 
 5361 An image with nonempty alt text, occurring by itself in a
 5362 paragraph, will be rendered as a figure with a caption.  The
 5363 image's alt text will be used as the caption.
 5364 
 5365     ![This is the caption](/url/of/image.png)
 5366 
 5367 How this is rendered depends on the output format. Some output
 5368 formats (e.g. RTF) do not yet support figures.  In those
 5369 formats, you'll just get an image in a paragraph by itself, with
 5370 no caption.
 5371 
 5372 If you just want a regular inline image, just make sure it is not
 5373 the only thing in the paragraph. One way to do this is to insert a
 5374 nonbreaking space after the image:
 5375 
 5376     ![This image won't be a figure](/url/of/image.png)\
 5377 
 5378 Note that in reveal.js slide shows, an image in a paragraph
 5379 by itself that has the `r-stretch` class will fill the screen,
 5380 and the caption and figure tags will be omitted.
 5381 
 5382 #### Extension: `link_attributes` ####
 5383 
 5384 Attributes can be set on links and images:
 5385 
 5386     An inline ![image](foo.jpg){#id .class width=30 height=20px}
 5387     and a reference ![image][ref] with attributes.
 5388 
 5389     [ref]: foo.jpg "optional title" {#id .class key=val key2="val 2"}
 5390 
 5391 (This syntax is compatible with [PHP Markdown Extra] when only `#id`
 5392 and `.class` are used.)
 5393 
 5394 For HTML and EPUB, all known HTML5 attributes except `width` and
 5395 `height` (but including `srcset` and `sizes`) are passed through
 5396 as is. Unknown attributes are passed through as custom
 5397 attributes, with `data-` prepended. The other writers ignore
 5398 attributes that are not specifically supported by their output format.
 5399 
 5400 The `width` and `height` attributes on images are treated specially. When
 5401 used without a unit, the unit is assumed to be pixels. However, any of
 5402 the following unit identifiers can be used: `px`, `cm`, `mm`, `in`, `inch`
 5403 and `%`. There must not be any spaces between the number and the unit.
 5404 For example:
 5405 
 5406 ```
 5407 ![](file.jpg){ width=50% }
 5408 ```
 5409 
 5410 - Dimensions may be converted to a form that is compatible with
 5411   the output format (for example, dimensions given in pixels will
 5412   be converted to inches when converting HTML to LaTeX). Conversion
 5413   between pixels and physical measurements is affected by the
 5414   `--dpi` option (by default, 96 dpi is assumed, unless the image
 5415   itself contains dpi information).
 5416 - The `%` unit is generally relative to some available space.
 5417   For example the above example will render to the following.
 5418   - HTML: `<img href="file.jpg" style="width: 50%;" />`
 5419   - LaTeX: `\includegraphics[width=0.5\textwidth,height=\textheight]{file.jpg}`
 5420     (If you're using a custom template, you need to configure `graphicx`
 5421     as in the default template.)
 5422   - ConTeXt: `\externalfigure[file.jpg][width=0.5\textwidth]`
 5423 - Some output formats have a notion of a class
 5424   ([ConTeXt](https://wiki.contextgarden.net/Using_Graphics#Multiple_Image_Settings))
 5425   or a unique identifier (LaTeX `\caption`), or both (HTML).
 5426 - When no `width` or `height` attributes are specified, the fallback
 5427   is to look at the image resolution and the dpi metadata embedded in
 5428   the image file.
 5429 
 5430 ## Divs and Spans
 5431 
 5432 Using the `native_divs` and `native_spans` extensions
 5433 (see [above][Extension: `native_divs`]), HTML syntax can
 5434 be used as part of markdown to create native `Div` and `Span`
 5435 elements in the pandoc AST (as opposed to raw HTML).
 5436 However, there is also nicer syntax available:
 5437 
 5438 #### Extension: `fenced_divs` ####
 5439 
 5440 Allow special fenced syntax for native `Div` blocks.  A Div
 5441 starts with a fence containing at least three consecutive
 5442 colons plus some attributes. The attributes may optionally
 5443 be followed by another string of consecutive colons.
 5444 
 5445 Note:  the `commonmark` parser doesn't permit colons after
 5446 the attributes.
 5447 
 5448 The attribute syntax is exactly as in fenced code blocks (see
 5449 [Extension: `fenced_code_attributes`]).  As with fenced
 5450 code blocks, one can use either attributes in curly braces
 5451 or a single unbraced word, which will be treated as a class
 5452 name.  The Div ends with another line containing a string of at
 5453 least three consecutive colons.  The fenced Div should be
 5454 separated by blank lines from preceding and following blocks.
 5455 
 5456 Example:
 5457 
 5458     ::::: {#special .sidebar}
 5459     Here is a paragraph.
 5460 
 5461     And another.
 5462     :::::
 5463 
 5464 Fenced divs can be nested.  Opening fences are distinguished
 5465 because they *must* have attributes:
 5466 
 5467     ::: Warning ::::::
 5468     This is a warning.
 5469 
 5470     ::: Danger
 5471     This is a warning within a warning.
 5472     :::
 5473     ::::::::::::::::::
 5474 
 5475 Fences without attributes are always closing fences.  Unlike
 5476 with fenced code blocks, the number of colons in the closing
 5477 fence need not match the number in the opening fence.  However,
 5478 it can be helpful for visual clarity to use fences of different
 5479 lengths to distinguish nested divs from their parents.
 5480 
 5481 
 5482 #### Extension: `bracketed_spans` ####
 5483 
 5484 A bracketed sequence of inlines, as one would use to begin
 5485 a link, will be treated as a `Span` with attributes if it is
 5486 followed immediately by attributes:
 5487 
 5488     [This is *some text*]{.class key="val"}
 5489 
 5490 ## Footnotes
 5491 
 5492 #### Extension: `footnotes` ####
 5493 
 5494 Pandoc's Markdown allows footnotes, using the following syntax:
 5495 
 5496     Here is a footnote reference,[^1] and another.[^longnote]
 5497 
 5498     [^1]: Here is the footnote.
 5499 
 5500     [^longnote]: Here's one with multiple blocks.
 5501 
 5502         Subsequent paragraphs are indented to show that they
 5503     belong to the previous footnote.
 5504 
 5505             { some.code }
 5506 
 5507         The whole paragraph can be indented, or just the first
 5508         line.  In this way, multi-paragraph footnotes work like
 5509         multi-paragraph list items.
 5510 
 5511     This paragraph won't be part of the note, because it
 5512     isn't indented.
 5513 
 5514 The identifiers in footnote references may not contain spaces, tabs,
 5515 newlines, or the characters `^`, `[`, or `]`. These identifiers
 5516 are used only to correlate the footnote reference with the note
 5517 itself; in the output, footnotes will be numbered sequentially.
 5518 
 5519 The footnotes themselves need not be placed at the end of the
 5520 document.  They may appear anywhere except inside other block elements
 5521 (lists, block quotes, tables, etc.).  Each footnote should be
 5522 separated from surrounding content (including other footnotes)
 5523 by blank lines.
 5524 
 5525 #### Extension: `inline_notes` ####
 5526 
 5527 Inline footnotes are also allowed (though, unlike regular notes,
 5528 they cannot contain multiple paragraphs).  The syntax is as follows:
 5529 
 5530     Here is an inline note.^[Inline notes are easier to write, since
 5531     you don't have to pick an identifier and move down to type the
 5532     note.]
 5533 
 5534 Inline and regular footnotes may be mixed freely.
 5535 
 5536 ## Citation syntax
 5537 
 5538 #### Extension: `citations` ####
 5539 
 5540 To cite a bibliographic item with an identifier foo, use the
 5541 syntax `@foo`.  Normal citations should be included in square
 5542 brackets, with semicolons separating distinct items:
 5543 
 5544     Blah blah [@doe99; @smith2000; @smith2004].
 5545 
 5546 How this is rendered depends on the citation style.  In an
 5547 author-date style, it might render as
 5548 
 5549     Blah blah (Doe 1999, Smith 2000, 2004).
 5550 
 5551 In a footnote style, it might render as
 5552 
 5553     Blah blah.[^1]
 5554 
 5555     [^1]:  John Doe, "Frogs," *Journal of Amphibians* 44 (1999);
 5556     Susan Smith, "Flies," *Journal of Insects* (2000);
 5557     Susan Smith, "Bees," *Journal of Insects* (2004).
 5558 
 5559 See the [CSL user documentation] for more information about CSL
 5560 styles and how they affect rendering.
 5561 
 5562 Unless a citation key starts with a letter, digit, or `_`,
 5563 and contains only alphanumerics and single internal punctuation
 5564 characters (`:.#$%&-+?<>~/`), it must be surrounded
 5565 by curly braces, which are not considered part of the key.
 5566 In `@Foo_bar.baz.`, the key is `Foo_bar.baz` because the final
 5567 period is not *internal* punctuation, so it is not included in
 5568 the key.  In `@{Foo_bar.baz.}`, the key is `Foo_bar.baz.`, including
 5569 the final period.
 5570 In `@Foo_bar--baz`, the key is `Foo_bar` because the repeated internal
 5571 punctuation characters terminate the key.
 5572 The curly braces are recommended if you use URLs as
 5573 keys: `[@{https://example.com/bib?name=foobar&date=2000}, p.  33]`.
 5574 
 5575 Citation items may optionally include a prefix, a locator, and
 5576 a suffix.  In
 5577 
 5578     Blah blah [see @doe99, pp. 33-35 and *passim*; @smith04, chap. 1].
 5579 
 5580 the first item (`doe99`) has prefix `see `, locator `pp.  33-35`,
 5581 and suffix `and *passim*`.  The second item (`smith04`) has
 5582 locator `chap. 1` and no prefix or suffix.
 5583 
 5584 Pandoc uses some heuristics to separate the locator from the
 5585 rest of the subject.  It is sensitive to the locator terms
 5586 defined in the [CSL locale files].  Either abbreviated or
 5587 unabbreviated forms are accepted. In the `en-US` locale, locator
 5588 terms can be written in either singular or plural forms, as
 5589 `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
 5590 `col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`,
 5591 `fol.`/`fols.`; `number`, `no.`/`nos.`; `line`, `l.`/`ll.`;
 5592 `note`, `n.`/`nn.`; `opus`, `op.`/`opp.`; `page`, `p.`/`pp.`;
 5593 `paragraph`, `para.`/`paras.`; `part`, `pt.`/`pts.`; `section`,
 5594 `sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`; `verse`,
 5595 `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
 5596 locator term is used, "page" is assumed.
 5597 
 5598 In complex cases, you can force something to be treated as
 5599 a locator by enclosing it in curly braces or prevent parsing
 5600 the suffix as locator by prepending curly braces:
 5601 
 5602     [@smith{ii, A, D-Z}, with a suffix]
 5603     [@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
 5604     [@smith{}, 99 years later]
 5605 
 5606 A minus sign (`-`) before the `@` will suppress mention of
 5607 the author in the citation.  This can be useful when the
 5608 author is already mentioned in the text:
 5609 
 5610     Smith says blah [-@smith04].
 5611 
 5612 You can also write an author-in-text citation, by omitting the
 5613 square brackets:
 5614 
 5615     @smith04 says blah.
 5616 
 5617     @smith04 [p. 33] says blah.
 5618 
 5619 This will cause the author's name to be rendered, followed by
 5620 the bibliographical details.  Use this form when you want to
 5621 make the citation the subject of a sentence.
 5622 
 5623 When you are using a note style, it is usually better to let
 5624 citeproc create the footnotes from citations rather than writing
 5625 an explicit note.  If you do write an explicit note that
 5626 contains a citation, note that normal citations will be put in
 5627 parentheses, while author-in-text citations will not.  For
 5628 this reason, it is sometimes preferable to use the
 5629 author-in-text style inside notes when using a note style.
 5630 
 5631 [CSL user documentation]: https://citationstyles.org/authors/
 5632 [CSL]: https://docs.citationstyles.org/en/stable/specification.html
 5633 [CSL markup specs]: https://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields
 5634 [Chicago Manual of Style]: https://chicagomanualofstyle.org
 5635 [Citation Style Language]: https://citationstyles.org
 5636 [Zotero Style Repository]: https://www.zotero.org/styles
 5637 [finding and editing styles]: https://citationstyles.org/authors/
 5638 [CSL locale files]: https://github.com/citation-style-language/locales
 5639 
 5640 ## Non-default extensions
 5641 
 5642 The following Markdown syntax extensions are not enabled by default
 5643 in pandoc, but may be enabled by adding `+EXTENSION` to the format
 5644 name, where `EXTENSION` is the name of the extension.  Thus, for
 5645 example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
 5646 
 5647 #### Extension: `rebase_relative_paths` ####
 5648 
 5649 Rewrite relative paths for Markdown links and images, depending
 5650 on the path of the file containing the link or image link.  For
 5651 each link or image, pandoc will compute the directory of the
 5652 containing file, relative to the working directory, and prepend
 5653 the resulting path to the link or image path.
 5654 
 5655 The use of this extension is best understood by example.
 5656 Suppose you have a subdirectory for each chapter of a book,
 5657 `chap1`, `chap2`, `chap3`. Each contains a file `text.md` and a
 5658 number of images used in the chapter.  You would like to have
 5659 `![image](spider.jpg)` in `chap1/text.md` refer to
 5660 `chap1/spider.jpg` and `![image](spider.jpg)` in `chap2/text.md`
 5661 refer to `chap2/spider.jpg`.  To do this, use
 5662 
 5663     pandoc chap*/*.md -f markdown+rebase_relative_paths
 5664 
 5665 Without this extension, you would have to use
 5666 `![image](chap1/spider.jpg)` in `chap1/text.md` and
 5667 `![image](chap2/spider.jpg)` in `chap2/text.md`.  Links with
 5668 relative paths will be rewritten in the same way as images.
 5669 
 5670 Absolute paths and URLs are not changed.  Neither are empty
 5671 paths or paths consisting entirely of a fragment, e.g., `#foo`.
 5672 
 5673 Note that relative paths in reference links and images will
 5674 be rewritten relative to the file containing the link
 5675 reference definition, not the file containing the reference link
 5676 or image itself, if these differ.
 5677 
 5678 #### Extension: `mark` ####
 5679 
 5680 To highlight out a section of text, begin and end it with
 5681 with `==`. Thus, for example,
 5682 
 5683     This ==is deleted text.==
 5684 
 5685 #### Extension: `attributes` ####
 5686 
 5687 Allows attributes to be attached to any inline or block-level
 5688 element when parsing `commonmark`.
 5689 The syntax for the attributes is the same as that
 5690 used in [`header_attributes`][Extension: `header_attributes`].
 5691 
 5692 - Attributes that occur immediately after an inline
 5693   element affect that element.  If they follow a space, then they
 5694   belong to the space.  (Hence, this option subsumes
 5695   `inline_code_attributes` and `link_attributes`.)
 5696 - Attributes that occur immediately before a block
 5697   element, on a line by themselves, affect that
 5698   element.
 5699 - Consecutive attribute specifiers may be used,
 5700   either for blocks or for inlines.  Their attributes
 5701   will be combined.
 5702 - Attributes that occur at the end of the text of
 5703   a Setext or ATX heading (separated by whitespace
 5704   from the text) affect the heading element. (Hence, this
 5705   option subsumes `header_attributes`.)
 5706 - Attributes that occur after the opening fence
 5707   in a fenced code block affect the code block element. (Hence,
 5708   this option subsumes `fenced_code_attributes`.)
 5709 - Attributes that occur at the end of a reference
 5710   link definition affect links that refer to that
 5711   definition.
 5712 
 5713 Note that pandoc's AST does not currently allow attributes
 5714 to be attached to arbitrary elements.  Hence a Span or Div
 5715 container will be added if needed.
 5716 
 5717 #### Extension: `old_dashes` ####
 5718 
 5719 Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
 5720 `-` before a numeral is an en-dash, and `--` is an em-dash.
 5721 This option only has an effect if `smart` is enabled. It is
 5722 selected automatically for `textile` input.
 5723 
 5724 #### Extension: `angle_brackets_escapable` ####
 5725 
 5726 Allow `<` and `>` to be backslash-escaped, as they can be in
 5727 GitHub flavored Markdown but not original Markdown.  This is
 5728 implied by pandoc's default `all_symbols_escapable`.
 5729 
 5730 #### Extension: `lists_without_preceding_blankline` ####
 5731 
 5732 Allow a list to occur right after a paragraph, with no intervening
 5733 blank space.
 5734 
 5735 #### Extension: `four_space_rule` ####
 5736 
 5737 Selects the pandoc <= 2.0 behavior for parsing lists, so that
 5738 four spaces indent are needed for list item continuation
 5739 paragraphs.
 5740 
 5741 #### Extension: `spaced_reference_links` ####
 5742 
 5743 Allow whitespace between the two components of a reference link,
 5744 for example,
 5745 
 5746     [foo] [bar].
 5747 
 5748 #### Extension: `hard_line_breaks` ####
 5749 
 5750 Causes all newlines within a paragraph to be interpreted as hard line
 5751 breaks instead of spaces.
 5752 
 5753 #### Extension: `ignore_line_breaks` ####
 5754 
 5755 Causes newlines within a paragraph to be ignored, rather than being
 5756 treated as spaces or as hard line breaks.  This option is intended for
 5757 use with East Asian languages where spaces are not used between words,
 5758 but text is divided into lines for readability.
 5759 
 5760 #### Extension: `east_asian_line_breaks` ####
 5761 
 5762 Causes newlines within a paragraph to be ignored, rather than
 5763 being treated as spaces or as hard line breaks, when they occur
 5764 between two East Asian wide characters.  This is a better choice
 5765 than `ignore_line_breaks` for texts that include a mix of East
 5766 Asian wide characters and other characters.
 5767 
 5768 #### Extension: `emoji` ####
 5769 
 5770 Parses textual emojis like `:smile:` as Unicode emoticons.
 5771 
 5772 #### Extension: `tex_math_gfm` ####
 5773 
 5774 Supports two GitHub-specific formats for math.
 5775 Inline math: ``$`e=mc^2`$``.
 5776 
 5777 Display math:
 5778 
 5779 ````
 5780 ``` math
 5781 e=mc^2
 5782 ```
 5783 ````
 5784 
 5785 #### Extension: `tex_math_single_backslash` ####
 5786 
 5787 Causes anything between `\(` and `\)` to be interpreted as inline
 5788 TeX math, and anything between `\[` and `\]` to be interpreted
 5789 as display TeX math.  Note: a drawback of this extension is that
 5790 it precludes escaping `(` and `[`.
 5791 
 5792 #### Extension: `tex_math_double_backslash` ####
 5793 
 5794 Causes anything between `\\(` and `\\)` to be interpreted as inline
 5795 TeX math, and anything between `\\[` and `\\]` to be interpreted
 5796 as display TeX math.
 5797 
 5798 #### Extension: `markdown_attribute` ####
 5799 
 5800 By default, pandoc interprets material inside block-level tags as Markdown.
 5801 This extension changes the behavior so that Markdown is only parsed
 5802 inside block-level tags if the tags have the attribute `markdown=1`.
 5803 
 5804 #### Extension: `mmd_title_block` ####
 5805 
 5806 Enables a [MultiMarkdown] style title block at the top of
 5807 the document, for example:
 5808 
 5809     Title:   My title
 5810     Author:  John Doe
 5811     Date:    September 1, 2008
 5812     Comment: This is a sample mmd title block, with
 5813              a field spanning multiple lines.
 5814 
 5815 See the MultiMarkdown documentation for details.  If `pandoc_title_block` or
 5816 `yaml_metadata_block` is enabled, it will take precedence over
 5817 `mmd_title_block`.
 5818 
 5819 #### Extension: `abbreviations` ####
 5820 
 5821 Parses PHP Markdown Extra abbreviation keys, like
 5822 
 5823     *[HTML]: Hypertext Markup Language
 5824 
 5825 Note that the pandoc document model does not support
 5826 abbreviations, so if this extension is enabled, abbreviation keys are
 5827 simply skipped (as opposed to being parsed as paragraphs).
 5828 
 5829 #### Extension: `autolink_bare_uris` ####
 5830 
 5831 Makes all absolute URIs into links, even when not surrounded by
 5832 pointy braces `<...>`.
 5833 
 5834 #### Extension: `mmd_link_attributes` ####
 5835 
 5836 Parses multimarkdown style key-value attributes on link
 5837 and image references. This extension should not be confused with the
 5838 [`link_attributes`](#extension-link_attributes) extension.
 5839 
 5840     This is a reference ![image][ref] with multimarkdown attributes.
 5841 
 5842     [ref]: https://path.to/image "Image title" width=20px height=30px
 5843            id=myId class="myClass1 myClass2"
 5844 
 5845 #### Extension: `mmd_header_identifiers` ####
 5846 
 5847 Parses multimarkdown style heading identifiers (in square brackets,
 5848 after the heading but before any trailing `#`s in an ATX heading).
 5849 
 5850 #### Extension: `compact_definition_lists` ####
 5851 
 5852 Activates the definition list syntax of pandoc 1.12.x and earlier.
 5853 This syntax differs from the one described above under [Definition lists]
 5854 in several respects:
 5855 
 5856   - No blank line is required between consecutive items of the
 5857     definition list.
 5858   - To get a "tight" or "compact" list, omit space between consecutive
 5859     items; the space between a term and its definition does not affect
 5860     anything.
 5861   - Lazy wrapping of paragraphs is not allowed:  the entire definition must
 5862     be indented four spaces.[^6]
 5863 
 5864 [^6]:  To see why laziness is incompatible with relaxing the requirement
 5865     of a blank line between items, consider the following example:
 5866 
 5867         bar
 5868         :    definition
 5869         foo
 5870         :    definition
 5871 
 5872     Is this a single list item with two definitions of "bar," the first of
 5873     which is lazily wrapped, or two list items?  To remove the ambiguity
 5874     we must either disallow lazy wrapping or require a blank line between
 5875     list items.
 5876 
 5877 #### Extension: `gutenberg` ####
 5878 
 5879 Use [Project Gutenberg] conventions for `plain` output:
 5880 all-caps for strong emphasis, surround by underscores
 5881 for regular emphasis, add extra blank space around headings.
 5882 
 5883   [Project Gutenberg]: https://www.gutenberg.org
 5884 
 5885 #### Extension: `sourcepos` ####
 5886 
 5887 Include source position attributes when parsing `commonmark`.
 5888 For elements that accept attributes, a `data-pos` attribute
 5889 is added; other elements are placed in a surrounding
 5890 Div or Span element with a `data-pos` attribute.
 5891 
 5892 #### Extension: `short_subsuperscripts` ####
 5893 
 5894 Parse multimarkdown style subscripts and superscripts, which start with
 5895 a '~' or '^' character, respectively, and include the alphanumeric sequence
 5896 that follows. For example:
 5897 
 5898     x^2 = 4
 5899 
 5900 or
 5901 
 5902     Oxygen is O~2.
 5903 
 5904 #### Extension: `wikilinks_title_after_pipe` ####
 5905 
 5906 Pandoc supports multiple markdown wikilink syntaxes, regardless of
 5907 whether the title is before or after the pipe.
 5908 
 5909 Using `--from=markdown+wikilinks_title_after_pipe` results in
 5910 ```[[Wiki]]
 5911 [[URL|title]]
 5912 ```
 5913 
 5914 while using `--from=markdown+wikilinks_title_before_pipe` results
 5915 in
 5916 ```[[Wiki]]
 5917 [[title|URL]]
 5918 ```
 5919 
 5920 ## Markdown variants
 5921 
 5922 In addition to pandoc's extended Markdown, the following Markdown
 5923 variants are supported:
 5924 
 5925 - `markdown_phpextra` (PHP Markdown Extra)
 5926 - `markdown_github` (deprecated GitHub-Flavored Markdown)
 5927 - `markdown_mmd` (MultiMarkdown)
 5928 - `markdown_strict` (Markdown.pl)
 5929 - `commonmark` (CommonMark)
 5930 - `gfm` (Github-Flavored Markdown)
 5931 - `commonmark_x` (CommonMark with many pandoc extensions)
 5932 
 5933 To see which extensions are supported for a given format,
 5934 and which are enabled by default, you can use the command
 5935 
 5936     pandoc --list-extensions=FORMAT
 5937 
 5938 where `FORMAT` is replaced with the name of the format.
 5939 
 5940 Note that the list of extensions for `commonmark`,
 5941 `gfm`, and `commonmark_x` are defined relative to default
 5942 commonmark.  So, for example, `backtick_code_blocks`
 5943 does not appear as an extension, since it is enabled by
 5944 default and cannot be disabled.
 5945 
 5946 # Citations
 5947 
 5948 When the `--citeproc` option is used, pandoc can automatically generate
 5949 citations and a bibliography in a number of styles.  Basic usage is
 5950 
 5951     pandoc --citeproc myinput.txt
 5952 
 5953 To use this feature, you will need to have
 5954 
 5955 - a document containing citations (see [Citation syntax]);
 5956 - a source of bibliographic data: either an external bibliography
 5957   file or a list of `references` in the document's YAML metadata;
 5958 - optionally, a [CSL] citation style.
 5959 
 5960 ## Specifying bibliographic data
 5961 
 5962 You can specify an external bibliography using the
 5963 `bibliography` metadata field in a YAML metadata section or the
 5964 `--bibliography` command line argument. If you want to use
 5965 multiple bibliography files, you can supply multiple
 5966 `--bibliography` arguments or set `bibliography` metadata field
 5967 to YAML array.  A bibliography may have any of these formats:
 5968 
 5969   Format            File extension
 5970   ------------      --------------
 5971   BibLaTeX          .bib
 5972   BibTeX            .bibtex
 5973   CSL JSON          .json
 5974   CSL YAML          .yaml
 5975   RIS               .ris
 5976 
 5977 Note that `.bib` can be used with both BibTeX and BibLaTeX files;
 5978 use the extension `.bibtex` to force interpretation as BibTeX.
 5979 
 5980 In BibTeX and BibLaTeX databases, pandoc parses LaTeX markup
 5981 inside fields such as `title`; in CSL YAML databases, pandoc
 5982 Markdown; and in CSL JSON databases, an [HTML-like markup][CSL
 5983 markup specs]:
 5984 
 5985 `<i>...</i>`
 5986 :   italics
 5987 
 5988 `<b>...</b>`
 5989 :   bold
 5990 
 5991 `<span style="font-variant:small-caps;">...</span>` or `<sc>...</sc>`
 5992 :   small capitals
 5993 
 5994 `<sub>...</sub>`
 5995 :   subscript
 5996 
 5997 `<sup>...</sup>`
 5998 :   superscript
 5999 
 6000 `<span class="nocase">...</span>`
 6001 :   prevent a phrase from being capitalized as title case
 6002 
 6003 As an alternative to specifying a bibliography file using
 6004 `--bibliography` or the YAML metadata field `bibliography`, you
 6005 can include the citation data directly in the `references` field
 6006 of the document's YAML metadata. The field should contain an
 6007 array of YAML-encoded references, for example:
 6008 
 6009     ---
 6010     references:
 6011     - type: article-journal
 6012       id: WatsonCrick1953
 6013       author:
 6014       - family: Watson
 6015         given: J. D.
 6016       - family: Crick
 6017         given: F. H. C.
 6018       issued:
 6019         date-parts:
 6020         - - 1953
 6021           - 4
 6022           - 25
 6023       title: 'Molecular structure of nucleic acids: a structure for
 6024         deoxyribose nucleic acid'
 6025       title-short: Molecular structure of nucleic acids
 6026       container-title: Nature
 6027       volume: 171
 6028       issue: 4356
 6029       page: 737-738
 6030       DOI: 10.1038/171737a0
 6031       URL: https://www.nature.com/articles/171737a0
 6032       language: en-GB
 6033     ...
 6034 
 6035 If both an external bibliography and inline (YAML metadata)
 6036 references are provided, both will be used. In case of
 6037 conflicting `id`s, the inline references will take precedence.
 6038 
 6039 Note that pandoc can be used to produce such a YAML metadata
 6040 section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
 6041 
 6042     pandoc chem.bib -s -f biblatex -t markdown
 6043     pandoc chem.json -s -f csljson -t markdown
 6044 
 6045 Indeed, pandoc can convert between any of these
 6046 citation formats:
 6047 
 6048     pandoc chem.bib -s -f biblatex -t csljson
 6049     pandoc chem.yaml -s -f markdown -t biblatex
 6050 
 6051 Running pandoc on a bibliography file with the `--citeproc`
 6052 option will create a formatted bibliography in the format
 6053 of your choice:
 6054 
 6055     pandoc chem.bib -s --citeproc -o chem.html
 6056     pandoc chem.bib -s --citeproc -o chem.pdf
 6057 
 6058 ### Capitalization in titles
 6059 
 6060 If you are using a bibtex or biblatex bibliography, then observe
 6061 the following rules:
 6062 
 6063   - English titles should be in title case.  Non-English titles should
 6064     be in sentence case, and the `langid` field in biblatex should be
 6065     set to the relevant language.  (The following values are treated
 6066     as English:  `american`, `british`, `canadian`, `english`,
 6067     `australian`, `newzealand`, `USenglish`, or `UKenglish`.)
 6068 
 6069   - As is standard with bibtex/biblatex, proper names should be
 6070     protected with curly braces so that they won't be lowercased
 6071     in styles that call for sentence case.  For example:
 6072 
 6073         title = {My Dinner with {Andre}}
 6074 
 6075   - In addition, words that should remain lowercase (or camelCase)
 6076     should be protected:
 6077 
 6078         title = {Spin Wave Dispersion on the {nm} Scale}
 6079 
 6080     Though this is not necessary in bibtex/biblatex, it is necessary
 6081     with citeproc, which stores titles internally in sentence case,
 6082     and converts to title case in styles that require it.  Here we
 6083     protect "nm" so that it doesn't get converted to "Nm" at this stage.
 6084 
 6085 If you are using a CSL bibliography (either JSON or YAML), then observe
 6086 the following rules:
 6087 
 6088   - All titles should be in sentence case.
 6089 
 6090   - Use the `language` field for non-English titles to prevent their
 6091     conversion to title case in styles that call for this. (Conversion
 6092     happens only if `language` begins with `en` or is left empty.)
 6093 
 6094   - Protect words that should not be converted to title case using
 6095     this syntax:
 6096 
 6097         Spin wave dispersion on the <span class="nocase">nm</span> scale
 6098 
 6099 ### Conference Papers, Published vs. Unpublished
 6100 
 6101 For a formally published conference paper, use the biblatex entry type
 6102 `inproceedings` (which will be mapped to CSL `paper-conference`).
 6103 
 6104 For an unpublished manuscript, use the biblatex entry type
 6105 `unpublished` without an `eventtitle` field (this entry type
 6106 will be mapped to CSL `manuscript`).
 6107 
 6108 For a talk, an unpublished conference paper, or a poster
 6109 presentation, use the biblatex entry type `unpublished` with an
 6110 `eventtitle` field (this entry type will be mapped to CSL
 6111 `speech`). Use the biblatex `type` field to indicate the type,
 6112 e.g. "Paper", or "Poster". `venue` and `eventdate` may be useful
 6113 too, though `eventdate` will not be rendered by most CSL styles.
 6114 Note that `venue` is for the event's venue, unlike `location`
 6115 which describes the publisher's location; do not use the latter
 6116 for an unpublished conference paper.
 6117 
 6118 
 6119 ## Specifying a citation style
 6120 
 6121 Citations and references can be formatted using any style supported by the
 6122 [Citation Style Language], listed in the [Zotero Style Repository].
 6123 These files are specified using the `--csl` option or the `csl`
 6124 (or `citation-style`) metadata field.  By default, pandoc will
 6125 use the [Chicago Manual of Style] author-date format.  (You can
 6126 override this default by copying a CSL style of your choice
 6127 to `default.csl` in your user data directory.)
 6128 The CSL project provides further information on [finding and
 6129 editing styles].
 6130 
 6131 The `--citation-abbreviations` option (or the
 6132 `citation-abbreviations` metadata field) may be used to specify
 6133 a JSON file containing abbreviations of journals that should be
 6134 used in formatted bibliographies when `form="short"` is
 6135 specified.  The format of the file can be illustrated with an
 6136 example:
 6137 
 6138 
 6139     { "default": {
 6140         "container-title": {
 6141                 "Lloyd's Law Reports": "Lloyd's Rep",
 6142                 "Estates Gazette": "EG",
 6143                 "Scots Law Times": "SLT"
 6144         }
 6145       }
 6146     }
 6147 
 6148 
 6149 ## Citations in note styles
 6150 
 6151 Pandoc's citation processing is designed to allow you to
 6152 move between author-date, numerical, and note styles without
 6153 modifying the markdown source.  When you're using a note
 6154 style, avoid inserting footnotes manually. Instead, insert
 6155 citations just as you would in an author-date style---for
 6156 example,
 6157 
 6158     Blah blah [@foo, p. 33].
 6159 
 6160 The footnote will be created automatically. Pandoc will take
 6161 care of removing the space and moving the note before or
 6162 after the period, depending on the setting of
 6163 `notes-after-punctuation`, as described below in [Other relevant
 6164 metadata fields].
 6165 
 6166 In some cases you may need to put a citation inside a regular
 6167 footnote.  Normal citations in footnotes (such as `[@foo, p.
 6168 33]`) will be rendered in parentheses.  In-text citations (such
 6169 as `@foo [p. 33]`) will be rendered without parentheses. (A
 6170 comma will be added if appropriate.)  Thus:
 6171 
 6172     [^1]:  Some studies [@foo; @bar, p. 33] show that
 6173     frubulicious zoosnaps are quantical.  For a survey
 6174     of the literature, see @baz [chap. 1].
 6175 
 6176 
 6177 ## Placement of the bibliography
 6178 
 6179 If the style calls for a list of works cited, it will be placed
 6180 in a div with id `refs`, if one exists:
 6181 
 6182     ::: {#refs}
 6183     :::
 6184 
 6185 Otherwise, it will be placed at the end of the document.
 6186 Generation of the bibliography can be suppressed by setting
 6187 `suppress-bibliography: true` in the YAML metadata.
 6188 
 6189 If you wish the bibliography to have a section heading, you can
 6190 set `reference-section-title` in the metadata, or put the heading
 6191 at the beginning of the div with id `refs` (if you are using it)
 6192 or at the end of your document:
 6193 
 6194     last paragraph...
 6195 
 6196     # References
 6197 
 6198 The bibliography will be inserted after this heading.  Note that
 6199 the `unnumbered` class will be added to this heading, so that the
 6200 section will not be numbered.
 6201 
 6202 If you want to put the bibliography into a variable in your
 6203 template, one way to do that is to put the div with id `refs`
 6204 into a metadata field, e.g.
 6205 
 6206     ---
 6207     refs: |
 6208        ::: {#refs}
 6209        :::
 6210     ...
 6211 
 6212 You can then put the variable `$refs$` into your template where
 6213 you want the bibliography to be placed.
 6214 
 6215 ## Including uncited items in the bibliography
 6216 
 6217 If you want to include items in the bibliography without actually
 6218 citing them in the body text, you can define a dummy `nocite` metadata
 6219 field and put the citations there:
 6220 
 6221     ---
 6222     nocite: |
 6223       @item1, @item2
 6224     ...
 6225 
 6226     @item3
 6227 
 6228 In this example, the document will contain a citation for `item3`
 6229 only, but the bibliography will contain entries for `item1`, `item2`, and
 6230 `item3`.
 6231 
 6232 It is possible to create a bibliography with all the citations,
 6233 whether or not they appear in the document, by using a wildcard:
 6234 
 6235     ---
 6236     nocite: |
 6237       @*
 6238     ...
 6239 
 6240 For LaTeX output, you can also use [`natbib`] or [`biblatex`] to
 6241 render the bibliography. In order to do so, specify bibliography
 6242 files as outlined above, and add `--natbib` or `--biblatex`
 6243 argument to pandoc invocation. Bear in mind that bibliography
 6244 files have to be in either BibTeX (for `--natbib`)
 6245 or BibLaTeX (for `--biblatex`) format.
 6246 
 6247 ## Other relevant metadata fields
 6248 
 6249 A few other metadata fields affect bibliography formatting:
 6250 
 6251 `link-citations`
 6252 :   If true, citations will be hyperlinked to the
 6253     corresponding bibliography entries (for author-date and
 6254     numerical styles only).  Defaults to false.
 6255 
 6256 `link-bibliography`
 6257 :   If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will
 6258     be rendered as hyperlinks.  (If an entry contains a DOI, PMCID,
 6259     PMID, or URL, but none of these fields are rendered by the style,
 6260     then the title, or in the absence of a title the whole entry, will
 6261     be hyperlinked.)  Defaults to true.
 6262 
 6263 `lang`
 6264 :   The `lang` field will affect how the style is localized,
 6265     for example in the translation of labels, the use
 6266     of quotation marks, and the way items are sorted.
 6267     (For backwards compatibility, `locale` may be used instead
 6268     of `lang`, but this use is deprecated.)
 6269 
 6270     A BCP 47 language tag is expected:  for example, `en`,
 6271     `de`, `en-US`, `fr-CA`, `ug-Cyrl`.  The unicode extension
 6272     syntax (after `-u-`) may be used to specify options for
 6273     collation (sorting) more precisely. Here are some examples:
 6274 
 6275     - `zh-u-co-pinyin` -- Chinese with the Pinyin collation.
 6276     - `es-u-co-trad` -- Spanish with the traditional collation
 6277       (with `Ch` sorting after `C`).
 6278     - `fr-u-kb` -- French with "backwards" accent sorting
 6279       (with `coté` sorting after `côte`).
 6280     - `en-US-u-kf-upper` -- English with uppercase letters sorting
 6281        before lower (default is lower before upper).
 6282 
 6283 `notes-after-punctuation`
 6284 :    If true (the default for note styles), pandoc will put
 6285      footnote references or superscripted numerical citations
 6286      after following punctuation.  For example, if the source
 6287      contains `blah blah [@jones99].`, the result will look like
 6288      `blah blah.[^1]`, with the note moved after the period and
 6289      the space collapsed.  If false, the space will still be
 6290      collapsed, but the footnote will not be moved after the
 6291      punctuation.  The option may also be used in numerical styles
 6292      that use superscripts for citation numbers (but for these
 6293      styles the default is not to move the citation).
 6294 
 6295 
 6296 # Slide shows
 6297 
 6298 You can use pandoc to produce an HTML + JavaScript slide presentation
 6299 that can be viewed via a web browser.  There are five ways to do this,
 6300 using [S5], [DZSlides], [Slidy], [Slideous], or [reveal.js].
 6301 You can also produce a PDF slide show using LaTeX [`beamer`], or
 6302 slide shows in Microsoft [PowerPoint] format.
 6303 
 6304 Here's the Markdown source for a simple slide show, `habits.txt`:
 6305 
 6306     % Habits
 6307     % John Doe
 6308     % March 22, 2005
 6309 
 6310     # In the morning
 6311 
 6312     ## Getting up
 6313 
 6314     - Turn off alarm
 6315     - Get out of bed
 6316 
 6317     ## Breakfast
 6318 
 6319     - Eat eggs
 6320     - Drink coffee
 6321 
 6322     # In the evening
 6323 
 6324     ## Dinner
 6325 
 6326     - Eat spaghetti
 6327     - Drink wine
 6328 
 6329     ------------------
 6330 
 6331     ![picture of spaghetti](images/spaghetti.jpg)
 6332 
 6333     ## Going to sleep
 6334 
 6335     - Get in bed
 6336     - Count sheep
 6337 
 6338 To produce an HTML/JavaScript slide show, simply type
 6339 
 6340     pandoc -t FORMAT -s habits.txt -o habits.html
 6341 
 6342 where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
 6343 
 6344 For Slidy, Slideous, reveal.js, and S5, the file produced by
 6345 pandoc with the `-s/--standalone` option embeds a link to
 6346 JavaScript and CSS files, which are assumed to be available at
 6347 the relative path `s5/default` (for S5), `slideous` (for
 6348 Slideous), `reveal.js` (for reveal.js), or at the Slidy website
 6349 at `w3.org` (for Slidy).  (These paths can be changed by setting
 6350 the `slidy-url`, `slideous-url`, `revealjs-url`, or `s5-url`
 6351 variables; see [Variables for HTML slides], above.) For
 6352 DZSlides, the (relatively short) JavaScript and CSS are included
 6353 in the file by default.
 6354 
 6355 With all HTML slide formats, the `--self-contained` option can
 6356 be used to produce a single file that contains all of the data
 6357 necessary to display the slide show, including linked scripts,
 6358 stylesheets, images, and videos.
 6359 
 6360 To produce a PDF slide show using beamer, type
 6361 
 6362     pandoc -t beamer habits.txt -o habits.pdf
 6363 
 6364 Note that a reveal.js slide show can also be converted to a PDF
 6365 by printing it to a file from the browser.
 6366 
 6367 To produce a PowerPoint slide show, type
 6368 
 6369     pandoc habits.txt -o habits.pptx
 6370 
 6371 ## Structuring the slide show
 6372 
 6373 By default, the *slide level* is the highest heading level in
 6374 the hierarchy that is followed immediately by content, and not another
 6375 heading, somewhere in the document. In the example above, level-1 headings
 6376 are always followed by level-2 headings, which are followed by content,
 6377 so the slide level is 2. This default can be overridden using the
 6378 `--slide-level` option.
 6379 
 6380 The document is carved up into slides according to the following
 6381 rules:
 6382 
 6383   * A horizontal rule always starts a new slide.
 6384 
 6385   * A heading at the slide level always starts a new slide.
 6386 
 6387   * Headings *below* the slide level in the hierarchy create
 6388     headings *within* a slide.  (In beamer, a "block" will be
 6389     created.  If the heading has the class `example`, an
 6390     `exampleblock` environment will be used; if it has the class
 6391     `alert`, an `alertblock` will be used; otherwise a regular
 6392     `block` will be used.)
 6393 
 6394   * Headings *above* the slide level in the hierarchy create
 6395     "title slides," which just contain the section title
 6396     and help to break the slide show into sections.
 6397     Non-slide content under these headings will be included
 6398     on the title slide (for HTML slide shows) or in a
 6399     subsequent slide with the same title (for beamer).
 6400 
 6401   * A title page is constructed automatically from the document's title
 6402     block, if present. (In the case of beamer, this can be disabled
 6403     by commenting out some lines in the default template.)
 6404 
 6405 These rules are designed to support many different styles of slide show. If
 6406 you don't care about structuring your slides into sections and subsections,
 6407 you can either just use level-1 headings for all slides (in that case, level 1
 6408 will be the slide level) or you can set `--slide-level=0`.
 6409 
 6410 Note:  in reveal.js slide shows, if slide level is 2, a two-dimensional
 6411 layout will be produced, with level-1 headings building horizontally
 6412 and level-2 headings building vertically. It is not recommended that
 6413 you use deeper nesting of section levels with reveal.js unless you set
 6414 `--slide-level=0` (which lets reveal.js produce a one-dimensional layout
 6415 and only interprets horizontal rules as slide boundaries).
 6416 
 6417 ### PowerPoint layout choice
 6418 
 6419 When creating slides, the pptx writer chooses from a number of pre-defined
 6420 layouts, based on the content of the slide:
 6421 
 6422 Title Slide
 6423 :   This layout is used for the initial slide, which is generated and
 6424     filled from the metadata fields `date`, `author`, and `title`, if
 6425     they are present.
 6426 
 6427 Section Header
 6428 :   This layout is used for what pandoc calls “title slides”, i.e.
 6429     slides which start with a header which is above the slide level in
 6430     the hierarchy.
 6431 
 6432 Two Content
 6433 :   This layout is used for two-column slides, i.e. slides containing a
 6434     div with class `columns` which contains at least two divs with class
 6435     `column`.
 6436 
 6437 Comparison
 6438 :   This layout is used instead of “Two Content” for any two-column
 6439     slides in which at least one column contains text followed by
 6440     non-text (e.g. an image or a table).
 6441 
 6442 Content with Caption
 6443 :   This layout is used for any non-two-column slides which contain text
 6444     followed by non-text (e.g. an image or a table).
 6445 
 6446 Blank
 6447 :   This layout is used for any slides which only contain blank content,
 6448     e.g. a slide containing only speaker notes, or a slide containing
 6449     only a non-breaking space.
 6450 
 6451 Title and Content
 6452 :   This layout is used for all slides which do not match the criteria
 6453     for another layout.
 6454 
 6455 These layouts are chosen from the default pptx reference doc included with
 6456 pandoc, unless an alternative reference doc is specified using
 6457 `--reference-doc`.
 6458 
 6459 ## Incremental lists
 6460 
 6461 By default, these writers produce lists that display "all at once."
 6462 If you want your lists to display incrementally (one item at a time),
 6463 use the `-i` option. If you want a particular list to depart from the
 6464 default, put it in a `div` block with class `incremental` or
 6465 `nonincremental`. So, for example, using the `fenced div` syntax, the
 6466 following would be incremental regardless of the document default:
 6467 
 6468     ::: incremental
 6469 
 6470     - Eat spaghetti
 6471     - Drink wine
 6472 
 6473     :::
 6474 
 6475 or
 6476 
 6477     ::: nonincremental
 6478 
 6479     - Eat spaghetti
 6480     - Drink wine
 6481 
 6482     :::
 6483 
 6484 While using `incremental` and `nonincremental` divs is the
 6485 recommended method of setting incremental lists on a per-case basis,
 6486 an older method is also supported: putting lists inside a blockquote
 6487 will depart from the document default (that is, it will display
 6488 incrementally without the `-i` option and all at once with the `-i`
 6489 option):
 6490 
 6491     > - Eat spaghetti
 6492     > - Drink wine
 6493 
 6494 Both methods allow incremental and nonincremental lists to be mixed
 6495 in a single document.
 6496 
 6497 If you want to include a block-quoted list, you can work around
 6498 this behavior by putting the list inside a fenced div, so that
 6499 it is not the direct child of the block quote:
 6500 
 6501     > ::: wrapper
 6502     > - a
 6503     > - list in a quote
 6504     > :::
 6505 
 6506 ## Inserting pauses
 6507 
 6508 You can add "pauses" within a slide by including a paragraph containing
 6509 three dots, separated by spaces:
 6510 
 6511     # Slide with a pause
 6512 
 6513     content before the pause
 6514 
 6515     . . .
 6516 
 6517     content after the pause
 6518 
 6519 Note: this feature is not yet implemented for PowerPoint output.
 6520 
 6521 ## Styling the slides
 6522 
 6523 You can change the style of HTML slides by putting customized CSS files
 6524 in `$DATADIR/s5/default` (for S5), `$DATADIR/slidy` (for Slidy),
 6525 or `$DATADIR/slideous` (for Slideous),
 6526 where `$DATADIR` is the user data directory (see `--data-dir`, above).
 6527 The originals may be found in pandoc's system data directory (generally
 6528 `$CABALDIR/pandoc-VERSION/s5/default`). Pandoc will look there for any
 6529 files it does not find in the user data directory.
 6530 
 6531 For dzslides, the CSS is included in the HTML file itself, and may
 6532 be modified there.
 6533 
 6534 All [reveal.js configuration options] can be set through variables.
 6535 For example, themes can be used by setting the `theme` variable:
 6536 
 6537     -V theme=moon
 6538 
 6539 Or you can specify a custom stylesheet using the `--css` option.
 6540 
 6541 To style beamer slides, you can specify a `theme`, `colortheme`,
 6542 `fonttheme`, `innertheme`, and `outertheme`, using the `-V` option:
 6543 
 6544     pandoc -t beamer habits.txt -V theme:Warsaw -o habits.pdf
 6545 
 6546 Note that heading attributes will turn into slide attributes
 6547 (on a `<div>` or `<section>`) in HTML slide formats, allowing you
 6548 to style individual slides.  In beamer, a number of heading
 6549 classes and attributes are recognized as frame options and
 6550 will be passed through as options to the frame: see
 6551 [Frame attributes in beamer], below.
 6552 
 6553 ## Speaker notes
 6554 
 6555 Speaker notes are supported in reveal.js, PowerPoint (pptx),
 6556 and beamer output. You can add notes to your Markdown document thus:
 6557 
 6558     ::: notes
 6559 
 6560     This is my note.
 6561 
 6562     - It can contain Markdown
 6563     - like this list
 6564 
 6565     :::
 6566 
 6567 To show the notes window in reveal.js, press `s` while viewing the
 6568 presentation. Speaker notes in PowerPoint will be available, as usual,
 6569 in handouts and presenter view.
 6570 
 6571 Notes are not yet supported for other slide formats, but the notes
 6572 will not appear on the slides themselves.
 6573 
 6574 ## Columns
 6575 
 6576 To put material in side by side columns, you can use a native
 6577 div container with class `columns`, containing two or more div
 6578 containers with class `column` and a `width` attribute:
 6579 
 6580     :::::::::::::: {.columns}
 6581     ::: {.column width="40%"}
 6582     contents...
 6583     :::
 6584     ::: {.column width="60%"}
 6585     contents...
 6586     :::
 6587     ::::::::::::::
 6588 
 6589 ### Additional columns attributes in beamer
 6590 
 6591 The div containers with classes `columns` and `column` can optionally have
 6592 an `align` attribute.
 6593 The class `columns` can optionally have a `totalwidth` attribute or an
 6594 `onlytextwidth` class.
 6595 
 6596     :::::::::::::: {.columns align=center totalwidth=8em}
 6597     ::: {.column width="40%"}
 6598     contents...
 6599     :::
 6600     ::: {.column width="60%" align=bottom}
 6601     contents...
 6602     :::
 6603     ::::::::::::::
 6604 
 6605 The `align` attributes on `columns` and `column` can be used with the
 6606 values `top`, `top-baseline`, `center` and `bottom` to vertically align
 6607 the columns. It defaults to `top` in `columns`.
 6608 
 6609 The `totalwidth` attribute limits the width of the columns to the given value.
 6610 
 6611     :::::::::::::: {.columns align=top .onlytextwidth}
 6612     ::: {.column width="40%" align=center}
 6613     contents...
 6614     :::
 6615     ::: {.column width="60%"}
 6616     contents...
 6617     :::
 6618     ::::::::::::::
 6619 
 6620 The class `onlytextwidth` sets the `totalwidth` to `\textwidth`.
 6621 
 6622 See Section 12.7 of the [Beamer User's Guide] for more details.
 6623 
 6624 ## Frame attributes in beamer
 6625 
 6626 Sometimes it is necessary to add the LaTeX `[fragile]` option to
 6627 a frame in beamer (for example, when using the `minted` environment).
 6628 This can be forced by adding the `fragile` class to the heading
 6629 introducing the slide:
 6630 
 6631     # Fragile slide {.fragile}
 6632 
 6633 All of the other frame attributes described in Section 8.1 of
 6634 the [Beamer User's Guide] may also be used: `allowdisplaybreaks`,
 6635 `allowframebreaks`, `b`, `c`, `s`, `t`, `environment`, `label`, `plain`,
 6636 `shrink`, `standout`, `noframenumbering`, `squeeze`.
 6637 `allowframebreaks` is recommended especially for bibliographies, as
 6638 it allows multiple slides to be created if the content overfills the
 6639 frame:
 6640 
 6641     # References {.allowframebreaks}
 6642 
 6643 In addition, the `frameoptions` attribute may be used to
 6644 pass arbitrary frame options to a beamer slide:
 6645 
 6646     # Heading {frameoptions="squeeze,shrink,customoption=foobar"}
 6647 
 6648 ## Background in reveal.js, beamer, and pptx
 6649 
 6650 Background images can be added to self-contained reveal.js slide shows,
 6651 beamer slide shows, and pptx slide shows.
 6652 
 6653 ### On all slides (beamer, reveal.js, pptx)
 6654 
 6655 With beamer and reveal.js, the configuration option `background-image` can be
 6656 used either in the YAML metadata block or as a command-line variable to get the same image on every slide.
 6657 
 6658 Note that for reveal.js, the `background-image` will be used as
 6659 a `parallaxBackgroundImage` (see below).
 6660 
 6661 For pptx, you can use a [reference doc](#option--reference-doc) in which
 6662 background images have been set on the [relevant
 6663 layouts](#powerpoint-layout-choice).
 6664 
 6665 #### `parallaxBackgroundImage` (reveal.js)
 6666 
 6667 For reveal.js, there is also the reveal.js-native option
 6668 `parallaxBackgroundImage`, which produces a parallax scrolling background.
 6669 You must also set `parallaxBackgroundSize`, and can optionally set
 6670 `parallaxBackgroundHorizontal`
 6671 and `parallaxBackgroundVertical` to configure the scrolling behaviour.
 6672 See the [reveal.js
 6673 documentation](https://revealjs.com/backgrounds/#parallax-background)
 6674 for more details about the meaning of these options.
 6675 
 6676 In reveal.js's overview mode, the parallaxBackgroundImage will show up
 6677 only on the first slide.
 6678 
 6679 ### On individual slides (reveal.js, pptx)
 6680 
 6681 To set an image for a particular reveal.js or pptx slide, add
 6682 `{background-image="/path/to/image"}` to the first slide-level heading on the
 6683 slide (which may even be empty).
 6684 
 6685 As the [HTML writers pass unknown attributes
 6686 through](#extension-link_attributes), other reveal.js background settings also
 6687 work on individual slides, including `background-size`, `background-repeat`,
 6688 `background-color`, `transition`, and `transition-speed`. (The `data-` prefix
 6689 will automatically be added.)
 6690 
 6691 Note: `data-background-image` is also supported in pptx for consistency with
 6692 reveal.js – if `background-image` isn’t found, `data-background-image` will be
 6693 checked.
 6694 
 6695 ### On the title slide (reveal.js, pptx)
 6696 
 6697 To add a background image to the automatically generated title slide for
 6698 reveal.js, use the `title-slide-attributes` variable in the YAML metadata block.
 6699 It must contain a map of attribute names and values. (Note that the `data-`
 6700 prefix is required here, as it isn’t added automatically.)
 6701 
 6702 For pptx, pass a [reference doc](#option--reference-doc) with the background
 6703 image set on the “Title Slide” layout.
 6704 
 6705 ### Example (reveal.js)
 6706 
 6707 ```
 6708 ---
 6709 title: My Slide Show
 6710 parallaxBackgroundImage: /path/to/my/background_image.png
 6711 title-slide-attributes:
 6712     data-background-image: /path/to/title_image.png
 6713     data-background-size: contain
 6714 ---
 6715 
 6716 ## Slide One
 6717 
 6718 Slide 1 has background_image.png as its background.
 6719 
 6720 ## {background-image="/path/to/special_image.jpg"}
 6721 
 6722 Slide 2 has a special image for its background, even though the heading has no content.
 6723 ```
 6724 
 6725 # EPUBs
 6726 
 6727 ## EPUB Metadata
 6728 
 6729 EPUB metadata may be specified using the `--epub-metadata` option, but
 6730 if the source document is Markdown, it is better to use a [YAML metadata
 6731 block][Extension: `yaml_metadata_block`].  Here is an example:
 6732 
 6733     ---
 6734     title:
 6735     - type: main
 6736       text: My Book
 6737     - type: subtitle
 6738       text: An investigation of metadata
 6739     creator:
 6740     - role: author
 6741       text: John Smith
 6742     - role: editor
 6743       text: Sarah Jones
 6744     identifier:
 6745     - scheme: DOI
 6746       text: doi:10.234234.234/33
 6747     publisher:  My Press
 6748     rights: © 2007 John Smith, CC BY-NC
 6749     ibooks:
 6750       version: 1.3.4
 6751     ...
 6752 
 6753 The following fields are recognized:
 6754 
 6755 `identifier`
 6756   ~ Either a string value or an object with fields `text` and
 6757     `scheme`.  Valid values for `scheme` are `ISBN-10`,
 6758     `GTIN-13`, `UPC`, `ISMN-10`, `DOI`, `LCCN`, `GTIN-14`,
 6759     `ISBN-13`, `Legal deposit number`, `URN`, `OCLC`,
 6760     `ISMN-13`, `ISBN-A`, `JP`, `OLCC`.
 6761 
 6762 `title`
 6763   ~ Either a string value, or an object with fields `file-as` and
 6764     `type`, or a list of such objects.  Valid values for `type` are
 6765     `main`, `subtitle`, `short`, `collection`, `edition`, `extended`.
 6766 
 6767 `creator`
 6768   ~ Either a string value, or an object with fields `role`, `file-as`,
 6769     and `text`, or a list of such objects.  Valid values for `role` are
 6770     [MARC relators], but
 6771     pandoc will attempt to translate the human-readable versions
 6772     (like "author" and "editor") to the appropriate marc relators.
 6773 
 6774 `contributor`
 6775   ~ Same format as `creator`.
 6776 
 6777 `date`
 6778   ~ A string value in `YYYY-MM-DD` format.  (Only the year is necessary.)
 6779     Pandoc will attempt to convert other common date formats.
 6780 
 6781 `lang` (or legacy: `language`)
 6782   ~ A string value in [BCP 47] format.  Pandoc will default to the local
 6783     language if nothing is specified.
 6784 
 6785 `subject`
 6786   ~ Either a string value, or an object with fields `text`, `authority`,
 6787     and `term`, or a list of such objects. Valid values for `authority`
 6788     are either a [reserved authority value] (currently `AAT`, `BIC`,
 6789     `BISAC`, `CLC`, `DDC`, `CLIL`, `EuroVoc`, `MEDTOP`, `LCSH`, `NDC`,
 6790     `Thema`, `UDC`, and `WGS`) or an absolute IRI identifying a custom
 6791     scheme. Valid values for `term` are defined by the scheme.
 6792 
 6793 `description`
 6794   ~ A string value.
 6795 
 6796 `type`
 6797   ~ A string value.
 6798 
 6799 `format`
 6800   ~ A string value.
 6801 
 6802 `relation`
 6803   ~ A string value.
 6804 
 6805 `coverage`
 6806   ~ A string value.
 6807 
 6808 `rights`
 6809   ~ A string value.
 6810 
 6811 `belongs-to-collection`
 6812   ~ A string value.  Identifies the name of a collection to which
 6813     the EPUB Publication belongs.
 6814 
 6815 `group-position`
 6816   ~ The `group-position` field indicates the numeric position in which
 6817     the EPUB Publication belongs relative to other works belonging to
 6818     the same `belongs-to-collection` field.
 6819 
 6820 `cover-image`
 6821   ~ A string value (path to cover image).
 6822 
 6823 `css` (or legacy: `stylesheet`)
 6824   ~ A string value (path to CSS stylesheet).
 6825 
 6826 `page-progression-direction`
 6827   ~ Either `ltr` or `rtl`. Specifies the `page-progression-direction`
 6828     attribute for the [`spine` element].
 6829 
 6830 `ibooks`
 6831   ~ iBooks-specific metadata, with the following fields:
 6832 
 6833     - `version`: (string)
 6834     - `specified-fonts`: `true`|`false` (default `false`)
 6835     - `ipad-orientation-lock`: `portrait-only`|`landscape-only`
 6836     - `iphone-orientation-lock`: `portrait-only`|`landscape-only`
 6837     - `binding`: `true`|`false` (default `true`)
 6838     - `scroll-axis`: `vertical`|`horizontal`|`default`
 6839 
 6840 [MARC relators]: https://loc.gov/marc/relators/relaterm.html
 6841 [reserved authority value]: https://idpf.github.io/epub-registries/authorities/
 6842 [`spine` element]: http://idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem
 6843 
 6844 ## The `epub:type` attribute
 6845 
 6846 For `epub3` output, you can mark up the heading that corresponds to an EPUB
 6847 chapter using the [`epub:type` attribute][epub-type]. For example, to set
 6848 the attribute to the value `prologue`, use this markdown:
 6849 
 6850     # My chapter {epub:type=prologue}
 6851 
 6852 Which will result in:
 6853 
 6854     <body epub:type="frontmatter">
 6855       <section epub:type="prologue">
 6856         <h1>My chapter</h1>
 6857 
 6858 Pandoc will output `<body epub:type="bodymatter">`, unless
 6859 you use one of the following values, in which case either
 6860 `frontmatter` or `backmatter` will be output.
 6861 
 6862 `epub:type` of first section      `epub:type` of body
 6863 ----------------------------      ------------------
 6864 prologue                          frontmatter
 6865 abstract                          frontmatter
 6866 acknowledgments                   frontmatter
 6867 copyright-page                    frontmatter
 6868 dedication                        frontmatter
 6869 credits                           frontmatter
 6870 keywords                          frontmatter
 6871 imprint                           frontmatter
 6872 contributors                      frontmatter
 6873 other-credits                     frontmatter
 6874 errata                            frontmatter
 6875 revision-history                  frontmatter
 6876 titlepage                         frontmatter
 6877 halftitlepage                     frontmatter
 6878 seriespage                        frontmatter
 6879 foreword                          frontmatter
 6880 preface                           frontmatter
 6881 frontispiece                      frontmatter
 6882 appendix                          backmatter
 6883 colophon                          backmatter
 6884 bibliography                      backmatter
 6885 index                             backmatter
 6886 
 6887 [epub-type]: http://www.idpf.org/epub/31/spec/epub-contentdocs.html#sec-epub-type-attribute
 6888 
 6889 ## Linked media
 6890 
 6891 By default, pandoc will download media referenced from any `<img>`, `<audio>`,
 6892 `<video>` or `<source>` element present in the generated EPUB,
 6893 and include it in the EPUB container, yielding a completely
 6894 self-contained EPUB.  If you want to link to external media resources
 6895 instead, use raw HTML in your source and add `data-external="1"` to the tag
 6896 with the `src` attribute.  For example:
 6897 
 6898     <audio controls="1">
 6899       <source src="https://example.com/music/toccata.mp3"
 6900               data-external="1" type="audio/mpeg">
 6901       </source>
 6902     </audio>
 6903 
 6904 If the input format already is HTML then `data-external="1"` will work
 6905 as expected for `<img>` elements. Similarly, for Markdown, external
 6906 images can be declared with `![img](url){external=1}`. Note that this
 6907 only works for images; the other media elements have no native
 6908 representation in pandoc's AST and require the use of raw HTML.
 6909 
 6910 ## EPUB styling
 6911 
 6912 By default, pandoc will include some basic styling
 6913 contained in its `epub.css` data file.  (To see this,
 6914 use `pandoc --print-default-data-file epub.css`.)
 6915 To use a different CSS file, just use the `--css` command
 6916 line option.  A few inline styles are defined in addition; these
 6917 are essential for correct formatting of pandoc's HTML output.
 6918 
 6919 The `document-css` variable may be set if the more opinionated
 6920 styling of pandoc's default HTML templates is desired (and
 6921 in that case the variables defined in [Variables for HTML] may
 6922 be used to fine-tune the style).
 6923 
 6924 # Chunked HTML
 6925 
 6926 `pandoc -t chunkedhtml` will produce a zip archive of linked
 6927 HTML files, one for each section of the original document.
 6928 Internal links will automatically be adjusted to point to
 6929 the right place, images linked to under the working directory
 6930 will be incorporated, and navigation links will be added.
 6931 In addition, a JSON file `sitemap.json` will be included
 6932 describing the hierarchical structure of the files.
 6933 
 6934 If an output file without an extension is specified, then
 6935 it will be interpreted as a directory and the zip archive
 6936 will be automatically unpacked into it (unless it already
 6937 exists, in which case an error will be raised).  Otherwise
 6938 a `.zip` file will be produced.
 6939 
 6940 The navigation links can be customized by adjusting the
 6941 template.  By default, a table of contents is included only
 6942 on the top page. To include it on every page, set the
 6943 `toc` variable manually.
 6944 
 6945 # Jupyter notebooks
 6946 
 6947 When creating a [Jupyter notebook], pandoc will try to infer the
 6948 notebook structure.  Code blocks with the class `code` will be
 6949 taken as code cells, and intervening content will be taken as
 6950 Markdown cells.  Attachments will automatically be created for
 6951 images in Markdown cells. Metadata will be taken from the
 6952 `jupyter` metadata field.  For example:
 6953 
 6954 ````
 6955 ---
 6956 title: My notebook
 6957 jupyter:
 6958   nbformat: 4
 6959   nbformat_minor: 5
 6960   kernelspec:
 6961      display_name: Python 2
 6962      language: python
 6963      name: python2
 6964   language_info:
 6965      codemirror_mode:
 6966        name: ipython
 6967        version: 2
 6968      file_extension: ".py"
 6969      mimetype: "text/x-python"
 6970      name: "python"
 6971      nbconvert_exporter: "python"
 6972      pygments_lexer: "ipython2"
 6973      version: "2.7.15"
 6974 ---
 6975 
 6976 # Lorem ipsum
 6977 
 6978 **Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus
 6979 bibendum felis dictum sodales.
 6980 
 6981 ``` code
 6982 print("hello")
 6983 ```
 6984 
 6985 ## Pyout
 6986 
 6987 ``` code
 6988 from IPython.display import HTML
 6989 HTML("""
 6990 <script>
 6991 console.log("hello");
 6992 </script>
 6993 <b>HTML</b>
 6994 """)
 6995 ```
 6996 
 6997 ## Image
 6998 
 6999 This image ![image](myimage.png) will be
 7000 included as a cell attachment.
 7001 ````
 7002 
 7003 If you want to add cell attributes, group cells differently, or
 7004 add output to code cells, then you need to include divs to
 7005 indicate the structure. You can use either [fenced
 7006 divs][Extension: `fenced_divs`] or [native divs][Extension:
 7007 `native_divs`] for this.  Here is an example:
 7008 
 7009 ````
 7010 :::::: {.cell .markdown}
 7011 # Lorem
 7012 
 7013 **Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus
 7014 bibendum felis dictum sodales.
 7015 ::::::
 7016 
 7017 :::::: {.cell .code execution_count=1}
 7018 ``` {.python}
 7019 print("hello")
 7020 ```
 7021 
 7022 ::: {.output .stream .stdout}
 7023 ```
 7024 hello
 7025 ```
 7026 :::
 7027 ::::::
 7028 
 7029 :::::: {.cell .code execution_count=2}
 7030 ``` {.python}
 7031 from IPython.display import HTML
 7032 HTML("""
 7033 <script>
 7034 console.log("hello");
 7035 </script>
 7036 <b>HTML</b>
 7037 """)
 7038 ```
 7039 
 7040 ::: {.output .execute_result execution_count=2}
 7041 ```{=html}
 7042 <script>
 7043 console.log("hello");
 7044 </script>
 7045 <b>HTML</b>
 7046 hello
 7047 ```
 7048 :::
 7049 ::::::
 7050 ````
 7051 
 7052 If you include raw HTML or TeX in an output cell, use the
 7053 [raw attribute](#extension-raw_attribute), as shown
 7054 in the last cell of the example above.  Although pandoc can
 7055 process "bare" raw HTML and TeX, the result is often
 7056 interspersed raw elements and normal textual elements, and
 7057 in an output cell pandoc expects a single, connected raw
 7058 block.  To avoid using raw HTML or TeX except when
 7059 marked explicitly using raw attributes, we recommend
 7060 specifying the extensions `-raw_html-raw_tex+raw_attribute` when
 7061 translating between Markdown and ipynb notebooks.
 7062 
 7063 Note that options and extensions that affect reading and
 7064 writing of Markdown will also affect Markdown cells in ipynb
 7065 notebooks.  For example, `--wrap=preserve` will preserve
 7066 soft line breaks in Markdown cells; `--markdown-headings=setext` will
 7067 cause Setext-style headings to be used; and `--preserve-tabs` will
 7068 prevent tabs from being turned to spaces.
 7069 
 7070 # Syntax highlighting
 7071 
 7072 Pandoc will automatically highlight syntax in [fenced code blocks] that
 7073 are marked with a language name.  The Haskell library [skylighting] is
 7074 used for highlighting. Currently highlighting is supported only for
 7075 HTML, EPUB, Docx, Ms, and LaTeX/PDF output. To see a list of language names
 7076 that pandoc will recognize, type `pandoc --list-highlight-languages`.
 7077 
 7078 The color scheme can be selected using the `--highlight-style` option.
 7079 The default color scheme is `pygments`, which imitates the default color
 7080 scheme used by the Python library pygments (though pygments is not actually
 7081 used to do the highlighting).  To see a list of highlight styles,
 7082 type `pandoc --list-highlight-styles`.
 7083 
 7084 If you are not satisfied with the predefined styles, you can
 7085 use `--print-highlight-style` to generate a JSON `.theme` file which
 7086 can be modified and used as the argument to `--highlight-style`. To
 7087 get a JSON version of the `pygments` style, for example:
 7088 
 7089     pandoc --print-highlight-style pygments > my.theme
 7090 
 7091 Then edit `my.theme` and use it like this:
 7092 
 7093     pandoc --highlight-style my.theme
 7094 
 7095 If you are not satisfied with the built-in highlighting, or you
 7096 want to highlight a language that isn't supported, you can use the
 7097 `--syntax-definition` option to load a [KDE-style XML syntax definition
 7098 file](https://docs.kde.org/stable5/en/kate/katepart/highlight.html).
 7099 Before writing your own, have a look at KDE's [repository of syntax
 7100 definitions](https://github.com/KDE/syntax-highlighting/tree/master/data/syntax).
 7101 
 7102 To disable highlighting, use the `--no-highlight` option.
 7103 
 7104 [skylighting]: https://github.com/jgm/skylighting
 7105 
 7106 # Custom Styles
 7107 
 7108 Custom styles can be used in the docx and ICML formats.
 7109 
 7110 ## Output
 7111 
 7112 By default, pandoc's docx and ICML output applies a predefined set of styles
 7113 for blocks such as paragraphs and block quotes, and uses largely default
 7114 formatting (italics, bold) for inlines. This will work for most
 7115 purposes, especially alongside a `reference.docx` file. However, if you
 7116 need to apply your own styles to blocks, or match a preexisting set of
 7117 styles, pandoc allows you to define custom styles for blocks and text
 7118 using `div`s and `span`s, respectively.
 7119 
 7120 If you define a `div` or `span` with the attribute `custom-style`,
 7121 pandoc will apply your specified style to the contained elements (with
 7122 the exception of elements whose function depends on a style, like
 7123 headings, code blocks, block quotes, or links). So, for example, using
 7124 the `bracketed_spans` syntax,
 7125 
 7126     [Get out]{custom-style="Emphatically"}, he said.
 7127 
 7128 would produce a docx file with "Get out" styled with character
 7129 style `Emphatically`. Similarly, using the `fenced_divs` syntax,
 7130 
 7131     Dickinson starts the poem simply:
 7132 
 7133     ::: {custom-style="Poetry"}
 7134     | A Bird came down the Walk---
 7135     | He did not know I saw---
 7136     :::
 7137 
 7138 would style the two contained lines with the `Poetry` paragraph style.
 7139 
 7140 For docx output, styles will be defined in the output file as inheriting
 7141 from normal text, if the styles are not yet in your reference.docx.
 7142 If they are already defined, pandoc will not alter the definition.
 7143 
 7144 This feature allows for greatest customization in conjunction with
 7145 [pandoc filters]. If you want all paragraphs after block quotes to be
 7146 indented, you can write a filter to apply the styles necessary. If you
 7147 want all italics to be transformed to the `Emphasis` character style
 7148 (perhaps to change their color), you can write a filter which will
 7149 transform all italicized inlines to inlines within an `Emphasis`
 7150 custom-style `span`.
 7151 
 7152 For docx output, you don't need to enable any extensions for
 7153 custom styles to work.
 7154 
 7155 [pandoc filters]: https://pandoc.org/filters.html
 7156 
 7157 ## Input
 7158 
 7159 The docx reader, by default, only reads those styles that it can
 7160 convert into pandoc elements, either by direct conversion or
 7161 interpreting the derivation of the input document's styles.
 7162 
 7163 By enabling the [`styles` extension](#ext-styles) in the docx reader
 7164 (`-f docx+styles`), you can produce output that maintains the styles
 7165 of the input document, using the `custom-style` class. Paragraph
 7166 styles are interpreted as divs, while character styles are interpreted
 7167 as spans.
 7168 
 7169 For example, using the `custom-style-reference.docx` file in the test
 7170 directory, we have the following different outputs:
 7171 
 7172 Without the `+styles` extension:
 7173 
 7174     $ pandoc test/docx/custom-style-reference.docx -f docx -t markdown
 7175     This is some text.
 7176 
 7177     This is text with an *emphasized* text style. And this is text with a
 7178     **strengthened** text style.
 7179 
 7180     > Here is a styled paragraph that inherits from Block Text.
 7181 
 7182 And with the extension:
 7183 
 7184     $ pandoc test/docx/custom-style-reference.docx -f docx+styles -t markdown
 7185 
 7186     ::: {custom-style="First Paragraph"}
 7187     This is some text.
 7188     :::
 7189 
 7190     ::: {custom-style="Body Text"}
 7191     This is text with an [emphasized]{custom-style="Emphatic"} text style.
 7192     And this is text with a [strengthened]{custom-style="Strengthened"}
 7193     text style.
 7194     :::
 7195 
 7196     ::: {custom-style="My Block Style"}
 7197     > Here is a styled paragraph that inherits from Block Text.
 7198     :::
 7199 
 7200 With these custom styles, you can use your input document as a
 7201 reference-doc while creating docx output (see below), and maintain the
 7202 same styles in your input and output files.
 7203 
 7204 # Custom readers and writers
 7205 
 7206 Pandoc can be extended with custom readers and writers written
 7207 in [Lua].  (Pandoc includes a Lua interpreter, so Lua need not
 7208 be installed separately.)
 7209 
 7210 To use a custom reader or writer, simply specify the path to the
 7211 Lua script in place of the input or output format. For example:
 7212 
 7213     pandoc -t data/sample.lua
 7214     pandoc -f my_custom_markup_language.lua -t latex -s
 7215 
 7216 If the script is not found relative to the working directory,
 7217 it will be sought in the `custom` subdirectory of the user data
 7218 directory (see `--data-dir`).
 7219 
 7220 A custom reader is a Lua script that defines one function,
 7221 Reader, which takes a string as input and returns a Pandoc
 7222 AST.  See the [Lua filters documentation] for documentation
 7223 of the functions that are available for creating pandoc
 7224 AST elements.  For parsing, the [lpeg] parsing library
 7225 is available by default. To see a sample custom reader:
 7226 
 7227     pandoc --print-default-data-file creole.lua
 7228 
 7229 If you want your custom reader to have access to reader options
 7230 (e.g. the tab stop setting), you give your Reader function a
 7231 second `options` parameter.
 7232 
 7233 A custom writer is a Lua script that defines a function
 7234 that specifies how to render each element in a Pandoc AST.
 7235 See the [djot-writer.lua] for a full-featured example.
 7236 
 7237 Note that custom writers have no default template.  If you want
 7238 to use `--standalone` with a custom writer, you will need to
 7239 specify a template manually using `--template` or add a new
 7240 default template with the name
 7241 `default.NAME_OF_CUSTOM_WRITER.lua` to the `templates`
 7242 subdirectory of your user data directory (see [Templates]).
 7243 
 7244 [Lua]: https://www.lua.org
 7245 [lpeg]:  http://www.inf.puc-rio.br/~roberto/lpeg/
 7246 [djot-writer.lua]: https://github.com/jgm/djot.lua/blob/main/djot-writer.lua
 7247 
 7248 # Reproducible builds
 7249 
 7250 Some of the document formats pandoc targets (such as EPUB,
 7251 docx, and ODT) include build timestamps in the generated document.
 7252 That means that the files generated on successive builds will
 7253 differ, even if the source does not.  To avoid this, set the
 7254 `SOURCE_DATE_EPOCH` environment variable, and the timestamp will
 7255 be taken from it instead of the current time.
 7256 `SOURCE_DATE_EPOCH` should contain an integer unix timestamp
 7257 (specifying the number of seconds since midnight UTC January 1, 1970).
 7258 
 7259 Some document formats also include a unique identifier.  For
 7260 EPUB, this can be set explicitly by setting the `identifier`
 7261 metadata field (see [EPUB Metadata], above).
 7262 
 7263 # Accessible PDFs and PDF archiving standards
 7264 
 7265 PDF is a flexible format, and using PDF in certain contexts
 7266 requires additional conventions. For example, PDFs are not
 7267 accessible by default; they define how characters are placed on a
 7268 page but do not contain semantic information on the content.
 7269 However, it is possible to generate accessible PDFs, which use
 7270 tagging to add semantic information to the document.
 7271 
 7272 Pandoc defaults to LaTeX to generate PDF. Tagging support in LaTeX
 7273 is in development and not readily available, so PDFs generated in
 7274 this way will always be untagged and not accessible. This means
 7275 that alternative engines must be used to generate accessible PDFs.
 7276 
 7277 The PDF standards PDF/A and PDF/UA define further restrictions
 7278 intended to optimize PDFs for archiving and accessibility. Tagging
 7279 is commonly used in combination with these standards to ensure
 7280 best results.
 7281 
 7282 Note, however, that standard compliance depends on many things,
 7283 including the colorspace of embedded images. Pandoc cannot check
 7284 this, and external programs must be used to ensure that generated
 7285 PDFs are in compliance.
 7286 
 7287 ## ConTeXt
 7288 
 7289 ConTeXt always produces tagged PDFs, but the quality depends on
 7290 the input. The default ConTeXt markup generated by pandoc is
 7291 optimized for readability and reuse, not tagging. Enable the
 7292 [`tagging`](#extension--tagging) format extension to force markup
 7293 that is optimized for tagging. This can be combined with the
 7294 `pdfa` variable to generate standard-compliant PDFs. E.g.:
 7295 
 7296     pandoc --to=context+tagging -V pdfa=3a
 7297 
 7298 A recent `context` version should be used, as older versions
 7299 contained a bug that lead to invalid PDF metadata.
 7300 
 7301 ## WeasyPrint
 7302 
 7303 The HTML-based engine WeasyPrint includes experimental support for
 7304 PDF/A and PDF/UA since version 57. Tagged PDFs can created with
 7305 
 7306     pandoc --pdf-engine=weasyprint \
 7307            --pdf-engine-opt=--pdf-variant=pdf/ua-1 ...
 7308 
 7309 The feature is experimental and standard compliance should not be
 7310 assumed.
 7311 
 7312 ## Prince XML
 7313 
 7314 The non-free HTML-to-PDf converter `prince` has extensive support
 7315 for various PDF standards as well as tagging. E.g.:
 7316 
 7317     pandoc --pdf-engine=prince \
 7318            --pdf-engine-opt=--tagged-pdf ...
 7319 
 7320 See the prince documentation for more info.
 7321 
 7322 ## Word Processors
 7323 
 7324 Word processors like LibreOffice and MS Word can also be used to
 7325 generate standardized and tagged PDF output. Pandoc does not
 7326 support direct conversions via these tools. However, pandoc can
 7327 convert a document to a `docx` or `odt` file, which can then be
 7328 opened and converted to PDF with the respective word processor.
 7329 See the documentation for [Word][word-accessible-pdfs] and
 7330 [LibreOffice][lo-pdf-export].
 7331 
 7332 [word-accessible-pdfs]: https://support.microsoft.com/en-us/office/create-accessible-pdfs-064625e0-56ea-4e16-ad71-3aa33bb4b7ed
 7333 [lo-pdf-export]: https://help.libreoffice.org/7.1/en-US/text/shared/01/ref_pdf_export_general.html
 7334 
 7335 
 7336 # Running pandoc as a web server
 7337 
 7338 If you rename (or symlink) the pandoc executable to
 7339 `pandoc-server`, or if you call pandoc with `server` as the first
 7340 argument, it will start up a web server with a JSON API. This
 7341 server exposes most of the conversion functionality of pandoc. For
 7342 full documentation, see the [pandoc-server] man page.
 7343 
 7344 If you rename (or symlink) the pandoc executable to
 7345 `pandoc-server.cgi`, it will function as a CGI program
 7346 exposing the same API as `pandoc-server`.
 7347 
 7348 `pandoc-server` is designed to be maximally secure; it uses
 7349 Haskell's type system to provide strong guarantees that no I/O
 7350 will be performed on the server during pandoc conversions.
 7351 
 7352 [pandoc-server]: https://github.com/jgm/pandoc/blob/master/doc/pandoc-server.md
 7353 
 7354 # Running pandoc as a Lua interpreter
 7355 
 7356 Calling the pandoc executable under the name `pandoc-lua` or with
 7357 `lua` as the first argument will make it function as a standalone
 7358 Lua interpreter. The behavior is mostly identical to that of the
 7359 [standalone `lua` executable][lua standalone], version 5.4.
 7360 However, there is no REPL yet, and the `-i` option has no effect.
 7361 For full documentation, see the [pandoc-lua] man page.
 7362 
 7363 [lua standalone]: https://www.lua.org/manual/5.4/manual.html#7
 7364 [pandoc-lua]: https://github.com/jgm/pandoc/blob/master/doc/pandoc-lua.md
 7365 
 7366 # A note on security
 7367 
 7368 1. Although pandoc itself will not create or modify any files other
 7369    than those you explicitly ask it create (with the exception
 7370    of temporary files used in producing PDFs), a filter or custom
 7371    writer could in principle do anything on your file system. Please
 7372    audit filters and custom writers very carefully before using them.
 7373 
 7374 2. Several input formats (including HTML, Org, and RST) support `include`
 7375    directives that allow the contents of a file to be included in the
 7376    output. An untrusted attacker could use these to view the contents of
 7377    files on the file system.  (Using the `--sandbox` option can
 7378    protect against this threat.)
 7379 
 7380 3. Several output formats (including RTF, FB2, HTML with
 7381    `--self-contained`, EPUB, Docx, and ODT) will embed encoded
 7382    or raw images into the output file.  An untrusted attacker
 7383    could exploit this to view the contents of non-image files on the
 7384    file system.  (Using the `--sandbox` option can protect
 7385    against this threat, but will also prevent including images in
 7386    these formats.)
 7387 
 7388 4. If your application uses pandoc as a Haskell library (rather than
 7389    shelling out to the executable), it is possible to use it in a mode
 7390    that fully isolates pandoc from your file system, by running the
 7391    pandoc operations in the `PandocPure` monad. See the document
 7392    [Using the pandoc API](https://pandoc.org/using-the-pandoc-api.html)
 7393    for more details. (This corresponds to the use of the `--sandbox`
 7394    option on the command line.)
 7395 
 7396 5. Pandoc's parsers can exhibit pathological performance on some
 7397    corner cases.  It is wise to put any pandoc operations under
 7398    a timeout, to avoid DOS attacks that exploit these issues.
 7399    If you are using the pandoc executable, you can add the
 7400    command line options `+RTS -M512M -RTS` (for example) to limit
 7401    the heap size to 512MB.  Note that the `commonmark` parser
 7402    (including `commonmark_x` and `gfm`) is much less vulnerable
 7403    to pathological performance than the `markdown` parser, so
 7404    it is a better choice when processing untrusted input.
 7405 
 7406 6. The HTML generated by pandoc is not guaranteed to be safe.
 7407    If `raw_html` is enabled for the Markdown input, users can
 7408    inject arbitrary HTML.  Even if `raw_html` is disabled,
 7409    users can include dangerous content in URLs and attributes.
 7410    To be safe, you should run all HTML generated from untrusted
 7411    user input through an HTML sanitizer.
 7412 
 7413 # Authors
 7414 
 7415 Copyright 2006--2022 John MacFarlane (jgm@berkeley.edu). Released
 7416 under the [GPL], version 2 or greater.  This software carries no
 7417 warranty of any kind.  (See COPYRIGHT for full copyright and
 7418 warranty notices.) For a full list of contributors, see the file
 7419 AUTHORS.md in the pandoc source code.
 7420 
 7421 [GPL]: https://www.gnu.org/copyleft/gpl.html "GNU General Public License"
 7422 [YAML]: https://yaml.org/spec/1.2/spec.html "YAML v1.2 Spec"