@@ -1,7 +1,7 @@
2title: Pandoc User's Guide
2title: Pandoc User's Guide
3author: John MacFarlane
3author: John MacFarlane
4−date: June 20, 2021
4+date: November 3, 2020
@@ -136,7 +136,7 @@ to output the generated LaTeX. You can then test it with `pdflatex test.tex`.
136When using LaTeX, the following packages need to be available
136When using LaTeX, the following packages need to be available
137(they are included with all recent versions of [TeX Live]):
137(they are included with all recent versions of [TeX Live]):
138[`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
138[`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
139−[`iftex`], [`listings`] (if the
139+[`ifxetex`], [`ifluatex`], [`listings`] (if the
140`--listings` option is used), [`fancyvrb`], [`longtable`],
140`--listings` option is used), [`fancyvrb`], [`longtable`],
141[`booktabs`], [`graphicx`] (if the document
141[`booktabs`], [`graphicx`] (if the document
142contains images), [`hyperref`], [`xcolor`],
142contains images), [`hyperref`], [`xcolor`],
@@ -180,7 +180,8 @@ footnotes in tables).
180[`graphicx`]: https://ctan.org/pkg/graphicx
180[`graphicx`]: https://ctan.org/pkg/graphicx
181[`grffile`]: https://ctan.org/pkg/grffile
181[`grffile`]: https://ctan.org/pkg/grffile
182[`hyperref`]: https://ctan.org/pkg/hyperref
182[`hyperref`]: https://ctan.org/pkg/hyperref
183−[`iftex`]: https://ctan.org/pkg/iftex
183+[`ifluatex`]: https://ctan.org/pkg/ifluatex
184+[`ifxetex`]: https://ctan.org/pkg/ifxetex
184[`listings`]: https://ctan.org/pkg/listings
185[`listings`]: https://ctan.org/pkg/listings
185[`lm`]: https://ctan.org/pkg/lm
186[`lm`]: https://ctan.org/pkg/lm
186[`longtable`]: https://ctan.org/pkg/longtable
187[`longtable`]: https://ctan.org/pkg/longtable
@@ -280,8 +281,6 @@ header when requesting a document from a URL:
280 ::: {#output-formats}
281 ::: {#output-formats}
281 - `asciidoc` ([AsciiDoc]) or `asciidoctor` ([AsciiDoctor])
282 - `asciidoc` ([AsciiDoc]) or `asciidoctor` ([AsciiDoctor])
282 - `beamer` ([LaTeX beamer][`beamer`] slide show)
283 - `beamer` ([LaTeX beamer][`beamer`] slide show)
283− - `bibtex` ([BibTeX] bibliography)
284− - `biblatex` ([BibLaTeX] bibliography)
285 - `commonmark` ([CommonMark] Markdown)
284 - `commonmark` ([CommonMark] Markdown)
286 - `commonmark_x` ([CommonMark] Markdown with extensions)
285 - `commonmark_x` ([CommonMark] Markdown with extensions)
287 - `context` ([ConTeXt])
286 - `context` ([ConTeXt])
@@ -361,15 +360,15 @@ header when requesting a document from a URL:
361 will be used. On \*nix and macOS systems this will be the `pandoc`
360 will be used. On \*nix and macOS systems this will be the `pandoc`
362 subdirectory of the XDG data directory (by default,
361 subdirectory of the XDG data directory (by default,
363 `$HOME/.local/share`, overridable by setting the `XDG_DATA_HOME`
362 `$HOME/.local/share`, overridable by setting the `XDG_DATA_HOME`
364− environment variable). If that directory does not exist and
363+ environment variable). If that directory does not exist,
365− `$HOME/.pandoc` exists, it will be used (for backwards compatibility).
364+ `$HOME/.pandoc` will be used (for backwards compatibility).
366− On Windows the default user data directory is
365+ In Windows the default user data directory is
367 `C:\Users\USERNAME\AppData\Roaming\pandoc`.
366 `C:\Users\USERNAME\AppData\Roaming\pandoc`.
368 You can find the default user data directory on your system by
367 You can find the default user data directory on your system by
369 looking at the output of `pandoc --version`.
368 looking at the output of `pandoc --version`.
370− Data files placed in this directory (for example, `reference.odt`,
371− `reference.docx`, `epub.css`, `templates`) will override
369+ A `reference.odt`, `reference.docx`, `epub.css`, `templates`,
370+ `slidy`, `slideous`, or `s5` directory
372− pandoc's normal defaults.
371+ placed in this directory will override pandoc's normal defaults.
374`-d` *FILE*, `--defaults=`*FILE*
373`-d` *FILE*, `--defaults=`*FILE*
@@ -486,7 +485,7 @@ header when requesting a document from a URL:
486[Emacs Org mode]: https://orgmode.org
485[Emacs Org mode]: https://orgmode.org
487[AsciiDoc]: https://www.methods.co.nz/asciidoc/
486[AsciiDoc]: https://www.methods.co.nz/asciidoc/
488[AsciiDoctor]: https://asciidoctor.org/
487[AsciiDoctor]: https://asciidoctor.org/
489−[DZSlides]: https://paulrouget.com/dzslides/
488+[DZSlides]: http://paulrouget.com/dzslides/
490[Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML
489[Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML
491[PDF]: https://www.adobe.com/pdf/
490[PDF]: https://www.adobe.com/pdf/
492[reveal.js]: https://revealjs.com/
491[reveal.js]: https://revealjs.com/
@@ -589,8 +588,8 @@ header when requesting a document from a URL:
590 3. `$PATH` (executable only)
589 3. `$PATH` (executable only)
592− Filters, Lua-filters, and citeproc processing are applied in
591+ Filters and Lua-filters are applied in the order specified
593− the order specified on the command line.
592+ on the command line.
595`-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
594`-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
@@ -604,17 +603,26 @@ header when requesting a document from a URL:
604 The `pandoc` Lua module provides helper functions for element
603 The `pandoc` Lua module provides helper functions for element
605 creation. It is always loaded into the script's Lua environment.
604 creation. It is always loaded into the script's Lua environment.
607− See the [Lua filters documentation] for further details.
606+ The following is an example Lua script for macro-expansion:
609− In order of preference, pandoc will look for Lua filters in
608+ function expand_hello_world(inline)
609+ if inline.c == '{{helloworld}}' then
610+ return pandoc.Emph{ pandoc.Str "Hello, World" }
611− 1. a specified full or relative path
616+ return {{Str = expand_hello_world}}
613− 2. `$DATADIR/filters` where `$DATADIR` is the user data
618+ In order of preference, pandoc will look for Lua filters in
614− directory (see `--data-dir`, above).
616− Filters, Lua filters, and citeproc processing are applied in
620+ 1. a specified full or relative path (executable or
617− the order specified on the command line.
621+ non-executable)
623+ 2. `$DATADIR/filters` (executable or non-executable)
624+ where `$DATADIR` is the user data directory (see
625+ `--data-dir`, above).
619`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
627`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
@@ -675,12 +683,12 @@ header when requesting a document from a URL:
675: Extract images and other media contained in or linked from
683: Extract images and other media contained in or linked from
676 the source document to the path *DIR*, creating it if
684 the source document to the path *DIR*, creating it if
677 necessary, and adjust the images references in the document
685 necessary, and adjust the images references in the document
678− so they point to the extracted files. Media are downloaded,
686+ so they point to the extracted files. If the source format is
679− read from the file system, or extracted from a binary
687+ a binary container (docx, epub, or odt), the media is
680− container (e.g. docx), as needed. The original file paths
688+ extracted from the container and the original
681− are used if they are relative paths not containing `..`.
689+ filenames are used. Otherwise the media is read from the
682− Otherwise filenames are constructed from the SHA1 hash of
690+ file system or downloaded, and new filenames are constructed
683− the contents.
691+ based on SHA1 hashes of the contents.
685`--abbreviations=`*FILE*
693`--abbreviations=`*FILE*
@@ -691,15 +699,14 @@ header when requesting a document from a URL:
691 system default, use
699 system default, use
692 `pandoc --print-default-data-file=abbreviations`. The only
700 `pandoc --print-default-data-file=abbreviations`. The only
693 use pandoc makes of this list is in the Markdown reader.
701 use pandoc makes of this list is in the Markdown reader.
694− Strings found in this list will be followed by a nonbreaking
702+ Strings ending in a period that are found in this list will
703+ be followed by a nonbreaking space, so that the period will
695− space, and the period will not produce sentence-ending space
704+ not produce sentence-ending space in formats like LaTeX.
696− in formats like LaTeX. The strings may not contain spaces.
698[`pandocfilters`]: https://github.com/jgm/pandocfilters
706[`pandocfilters`]: https://github.com/jgm/pandocfilters
699[PHP]: https://github.com/vinai/pandocfilters-php
707[PHP]: https://github.com/vinai/pandocfilters-php
700[perl]: https://metacpan.org/pod/Pandoc::Filter
708[perl]: https://metacpan.org/pod/Pandoc::Filter
701[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
709[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
702−[Lua filters documentation]: https://pandoc.org/lua-filters.html
704## General writer options {.options}
711## General writer options {.options}
@@ -891,11 +898,11 @@ header when requesting a document from a URL:
891 will not be searched. For example:
898 will not be searched. For example:
892 `--resource-path=.:test` will search the working directory
899 `--resource-path=.:test` will search the working directory
893 and the `test` subdirectory, in that order.
900 and the `test` subdirectory, in that order.
894− This option can be used repeatedly. Search path components
901+
895− that come later on the command line will be searched before
902+ `--resource-path` only has an effect if (a) the output
896− those that come earlier, so
903+ format embeds images (for example, `docx`, `pdf`, or `html`
897− `--resource-path foo:bar --resource-path baz:bim` is
904+ with `--self-contained`) or (b) it is used together with
898− equivalent to `--resource-path baz:bim:foo:bar`.
905+ `--extract-media`.
900`--request-header=`*NAME*`:`*VAL*
907`--request-header=`*NAME*`:`*VAL*
@@ -907,7 +914,7 @@ header when requesting a document from a URL:
908`--no-check-certificate`
915`--no-check-certificate`
910−: Disable the certificate verification to allow access to
917+: Disable the certificate verification to allow access to
911 unsecure HTTP resources (for example when the certificate
918 unsecure HTTP resources (for example when the certificate
912 is no longer valid or self signed).
919 is no longer valid or self signed).
@@ -956,45 +963,37 @@ header when requesting a document from a URL:
956 placement of link references is affected by the
963 placement of link references is affected by the
957 `--reference-location` option.
964 `--reference-location` option.
959−`--reference-location=block`|`section`|`document`
966+`--reference-location = block`|`section`|`document`
961: Specify whether footnotes (and references, if `reference-links` is
968: Specify whether footnotes (and references, if `reference-links` is
962 set) are placed at the end of the current (top-level) block, the
969 set) are placed at the end of the current (top-level) block, the
963 current section, or the document. The default is
970 current section, or the document. The default is
964 `document`. Currently only affects the markdown writer.
971 `document`. Currently only affects the markdown writer.
966−`--markdown-headings=setext`|`atx`
968−: Specify whether to use ATX-style (`#`-prefixed) or
969− Setext-style (underlined) headings for level 1 and 2
970− headings in Markdown output. (The default is `atx`.)
971− ATX-style headings are always used for levels 3+.
972− This option also affects Markdown cells in `ipynb` output.
974`--atx-headers`
973`--atx-headers`
976−: *Deprecated synonym for `--markdown-headings=atx`.*
975+: Use ATX-style headings in Markdown output. The default is
976+ to use setext-style headings for levels 1 to 2, and then ATX headings.
977+ (Note: for `gfm` output, ATX headings are always used.)
978+ This option also affects markdown cells in `ipynb` output.
978−`--top-level-division=default`|`section`|`chapter`|`part`
980+`--top-level-division=[default|section|chapter|part]`
980−: Treat top-level headings as the given division type in
982+: Treat top-level headings as the given division type in LaTeX, ConTeXt,
981− LaTeX, ConTeXt, DocBook, and TEI output. The hierarchy
983+ DocBook, and TEI output. The hierarchy order is part, chapter, then section;
982− order is part, chapter, then section; all headings are
983− shifted such that the top-level heading becomes the
984+ all headings are shifted such that the top-level heading becomes the specified
984− specified type. The default behavior is to determine the
985+ type. The default behavior is to determine the best division type via
985− best division type via heuristics: unless other conditions
986+ heuristics: unless other conditions apply, `section` is chosen. When the
986− apply, `section` is chosen. When the `documentclass`
987− variable is set to `report`, `book`, or `memoir` (unless the
987+ `documentclass` variable is set to `report`, `book`, or `memoir` (unless the
988− `article` option is specified), `chapter` is implied as the
988+ `article` option is specified), `chapter` is implied as the setting for this
989− setting for this option. If `beamer` is the output format,
989+ option. If `beamer` is the output format, specifying either `chapter` or
990− specifying either `chapter` or `part` will cause top-level
991− headings to become `\part{..}`, while second-level headings
990+ `part` will cause top-level headings to become `\part{..}`, while
992− remain as their default type.
991+ second-level headings remain as their default type.
994`-N`, `--number-sections`
993`-N`, `--number-sections`
996−: Number section headings in LaTeX, ConTeXt, HTML, Docx, ms, or EPUB
995+: Number section headings in LaTeX, ConTeXt, HTML, Docx, or EPUB output.
997− output. By default, sections are not numbered. Sections with class
996+ By default, sections are not numbered. Sections with class
998 `unnumbered` will never be numbered, even if `--number-sections`
997 `unnumbered` will never be numbered, even if `--number-sections`
999 is specified.
998 is specified.
@@ -1327,10 +1326,7 @@ header when requesting a document from a URL:
1327: Set the `bibliography` field in the document's metadata to *FILE*,
1326: Set the `bibliography` field in the document's metadata to *FILE*,
1328 overriding any value set in the metadata. If you supply
1327 overriding any value set in the metadata. If you supply
1329 this argument multiple times, each *FILE* will be added to
1328 this argument multiple times, each *FILE* will be added to
1330− bibliography. If *FILE* is a URL, it will be fetched
1329+ bibliography.
1331− via HTTP. If *FILE* is not found relative to the
1332− working directory, it will be sought in the resource path
1333− (see `--resource-path`).
1335`--csl=`*FILE*
1331`--csl=`*FILE*
@@ -1339,8 +1335,8 @@ header when requesting a document from a URL:
1339 `--metadata csl=FILE`.) If *FILE* is a URL, it will be
1335 `--metadata csl=FILE`.) If *FILE* is a URL, it will be
1340 fetched via HTTP. If *FILE* is not found relative to the
1336 fetched via HTTP. If *FILE* is not found relative to the
1341 working directory, it will be sought in the resource path
1337 working directory, it will be sought in the resource path
1342− (see `--resource-path`) and finally in the `csl`
1338+ and finally in the `csl` subdirectory of the
1343− subdirectory of the pandoc user data directory.
1339+ pandoc user data directory.
1345`--citation-abbreviations=`*FILE*
1341`--citation-abbreviations=`*FILE*
@@ -1349,31 +1345,28 @@ header when requesting a document from a URL:
1349 `--metadata citation-abbreviations=FILE`.)
1345 `--metadata citation-abbreviations=FILE`.)
1350 If *FILE* is a URL, it will be fetched via HTTP. If *FILE* is not
1346 If *FILE* is a URL, it will be fetched via HTTP. If *FILE* is not
1351 found relative to the working directory, it will be sought
1347 found relative to the working directory, it will be sought
1352− in the resource path (see `--resource-path`) and finally in
1348+ in the resource path and finally in the `csl` subdirectory
1353− the `csl` subdirectory of the pandoc user data directory.
1349+ of the pandoc user data directory.
1355`--natbib`
1351`--natbib`
1357−: Use [`natbib`] for citations in LaTeX output. This option
1353+: Use [`natbib`] for citations in LaTeX output. This option is not for use
1358− is not for use with the `--citeproc` option or with PDF
1354+ with the `--citeproc` option or with PDF output. It is intended for
1359− output. It is intended for use in producing a LaTeX file
1360− that can be processed with [`bibtex`].
1355+ use in producing a LaTeX file that can be processed with [`bibtex`].
1362`--biblatex`
1357`--biblatex`
1364−: Use [`biblatex`] for citations in LaTeX output. This option
1359+: Use [`biblatex`] for citations in LaTeX output. This option is not for use
1365− is not for use with the `--citeproc` option or with PDF
1360+ with the `--citeproc` option or with PDF output. It is intended for
1366− output. It is intended for use in producing a LaTeX file
1367− that can be processed with [`bibtex`] or [`biber`].
1361+ use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`].
1369## Math rendering in HTML {.options}
1363## Math rendering in HTML {.options}
1371−The default is to render TeX math as far as possible using
1365+The default is to render TeX math as far as possible using Unicode characters.
1372−Unicode characters. Formulas are put inside a `span` with
1373−`class="math"`, so that they may be styled differently from the
1366+Formulas are put inside a `span` with `class="math"`, so that they may be styled
1374−surrounding text if needed. However, this gives acceptable
1367+differently from the surrounding text if needed. However, this gives acceptable
1375−results only for basic math, usually you will want to use
1368+results only for basic math, usually you will want to use `--mathjax` or another
1376−`--mathjax` or another of the following options.
1369+of the following options.
1378`--mathjax`[`=`*URL*]
1371`--mathjax`[`=`*URL*]
@@ -1387,11 +1380,10 @@ results only for basic math, usually you will want to use
1388`--mathml`
1381`--mathml`
1390−: Convert TeX math to [MathML] (in `epub3`, `docbook4`,
1383+: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
1391− `docbook5`, `jats`, `html4` and `html5`). This is the
1392− default in `odt` output. Note that currently only Firefox
1384+ `html4` and `html5`). This is the default in `odt` output. Note that
1393− and Safari (and select e-book readers) natively support
1385+ currently only Firefox and Safari (and select e-book readers) natively
1394− MathML.
1386+ support MathML.
1396`--webtex`[`=`*URL*]
1388`--webtex`[`=`*URL*]
@@ -1415,12 +1407,13 @@ results only for basic math, usually you will want to use
1415`--gladtex`
1407`--gladtex`
1417: Enclose TeX math in `<eq>` tags in HTML output. The resulting HTML
1409: Enclose TeX math in `<eq>` tags in HTML output. The resulting HTML
1418− can then be processed by [GladTeX] to produce SVG images of the typeset
1410+ can then be processed by [GladTeX] to produce images of the typeset
1419− formulas and an HTML file with these images embedded.
1411+ formulas and an HTML file with links to these images.
1412+ So, the procedure is:
1421 pandoc -s --gladtex input.md -o myfile.htex
1414 pandoc -s --gladtex input.md -o myfile.htex
1422− gladtex -d image_dir myfile.htex
1415+ gladtex -d myfile-images myfile.htex
1423− # produces myfile.html and images in image_dir
1416+ # produces myfile.html and images in myfile-images
1425[MathML]: https://www.w3.org/Math/
1418[MathML]: https://www.w3.org/Math/
1426[MathJax]: https://www.mathjax.org
1419[MathJax]: https://www.mathjax.org
@@ -1468,7 +1461,6 @@ Nonzero exit codes have the following meanings:
1468 24 PandocCiteprocError
1461 24 PandocCiteprocError
1469 31 PandocEpubSubdirectoryError
1462 31 PandocEpubSubdirectoryError
1470 43 PandocPDFError
1463 43 PandocPDFError
1472 47 PandocPDFProgramNotFoundError
1464 47 PandocPDFProgramNotFoundError
1473 61 PandocHttpError
1465 61 PandocHttpError
1474 62 PandocShouldNeverHappenError
1466 62 PandocShouldNeverHappenError
@@ -1481,7 +1473,6 @@ Nonzero exit codes have the following meanings:
1481 91 PandocMacroLoop
1473 91 PandocMacroLoop
1482 92 PandocUTF8DecodingError
1474 92 PandocUTF8DecodingError
1483 93 PandocIpynbDecodingError
1475 93 PandocIpynbDecodingError
1484− 94 PandocUnsupportedCharsetError
1485 97 PandocCouldNotFindDataFileError
1476 97 PandocCouldNotFindDataFileError
1486 99 PandocResourceNotFound
1477 99 PandocResourceNotFound
1487----- ------------------------------------
1478----- ------------------------------------
@@ -1506,16 +1497,6 @@ input-files:
1506- content.md
1497- content.md
1507# or you may use input-file: with a single value
1498# or you may use input-file: with a single value
1509−# Include options from the specified defaults files.
1510−# The files will be searched for first in the working directory
1511−# and then in the defaults subdirectory of the user data directory.
1512−# The files are included in the same order in which they appear in
1513−# the list. Options specified in this defaults file always have
1514−# priority over the included ones.
1519template: letter
1500template: letter
1520standalone: true
1501standalone: true
1521self-contained: false
1502self-contained: false
@@ -1573,11 +1554,8 @@ data-dir:
1573verbosity: INFO
1554verbosity: INFO
1574log-file: log.json
1555log-file: log.json
1576−# citeproc, natbib, or biblatex. This only affects LaTeX
1557+# citeproc, natbib, or biblatex
1577−# output. If you want to use citeproc to format citations,
1578−# you should also set 'citeproc: true' (see above).
1579cite-method: citeproc
1558cite-method: citeproc
1581# part, chapter, section, or default:
1559# part, chapter, section, or default:
1582top-level-division: chapter
1560top-level-division: chapter
1583abbreviations:
1561abbreviations:
@@ -1646,7 +1624,7 @@ epub-cover-image: cover.jpg
1646reference-links: true
1624reference-links: true
1647# block, section, or document
1625# block, section, or document
1648reference-location: block
1626reference-location: block
1649−markdown-headings: setext
1627+atx-headers: false
1651# accept, reject, or all
1629# accept, reject, or all
1652track-changes: accept
1630track-changes: accept
@@ -1676,34 +1654,6 @@ one line:
1676verbosity: INFO
1654verbosity: INFO
1679−In fields that expect a file path (or list of file paths), the
1680−following syntax may be used to interpolate environment variables:
1683−csl: ${HOME}/mycsldir/special.csl
1686−`${USERDATA}` may also be used; this will always resolve to the
1687−user data directory that is current when the defaults file is
1688−parsed, regardless of the setting of the environment
1689−variable `USERDATA`.
1691−`${.}` will resolve to the directory containing the default
1692−file itself. This allows you to refer to resources contained
1696−epub-cover-image: ${.}/cover.jpg
1697−epub-metadata: ${.}/meta.xml
1699−- . # the working directory from which pandoc is run
1700−- ${.}/images # the images subdirectory of the directory
1701− # containing this defaults file
1704−This environment variable interpolation syntax *only* works in
1705−fields that expect file paths.
1707Default files can be placed in the `defaults` subdirectory of
1657Default files can be placed in the `defaults` subdirectory of
1708the user data directory and used from any directory. For
1658the user data directory and used from any directory. For
1709example, one could create a file specifying defaults for writing
1659example, one could create a file specifying defaults for writing
@@ -1931,8 +1881,7 @@ ${ styles.html() }
1933(If a partial is not found in the directory of the
1883(If a partial is not found in the directory of the
1934−template and the template path is given as a relative
1935−path, it will also be sought in the `templates`
1884+template, it will also be sought in the `templates`
1936subdirectory of the user data directory.)
1885subdirectory of the user data directory.)
1938Partials may optionally be applied to variables using
1887Partials may optionally be applied to variables using
@@ -2150,8 +2099,7 @@ Currently the following pipes are predefined:
2150 including a title block in the document itself, you can
2099 including a title block in the document itself, you can
2151 set the `title-meta`, `author-meta`, and `date-meta`
2100 set the `title-meta`, `author-meta`, and `date-meta`
2152 variables. (By default these are set automatically, based
2101 variables. (By default these are set automatically, based
2153− on `title`, `author`, and `date`.) The page title in HTML
2102+ on `title`, `author`, and `date`.)
2154− is set by `pagetitle`, which is equal to `title` by default.
2156`subtitle`
2104`subtitle`
2157: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
2105: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
@@ -2225,16 +2173,15 @@ ODT or pptx.
2225: the base script direction, either `rtl` (right-to-left)
2173: the base script direction, either `rtl` (right-to-left)
2226 or `ltr` (left-to-right).
2174 or `ltr` (left-to-right).
2228− For bidirectional documents, native pandoc `span`s and
2176+ For bidirectional documents, native pandoc `span`s and `div`s
2229− `div`s with the `dir` attribute (value `rtl` or `ltr`) can
2177+ with the `dir` attribute (value `rtl` or `ltr`) can be used to
2230− be used to override the base direction in some output
2178+ override the base direction in some output formats.
2231− formats. This may not always be necessary if the final
2179+ This may not always be necessary if the final renderer
2232− renderer (e.g. the browser, when generating HTML) supports
2180+ (e.g. the browser, when generating HTML) supports the
2233− the [Unicode Bidirectional Algorithm].
2181+ [Unicode Bidirectional Algorithm].
2235− When using LaTeX for bidirectional documents, only the
2183+ When using LaTeX for bidirectional documents, only the `xelatex` engine
2236− `xelatex` engine is fully supported (use
2237− `--pdf-engine=xelatex`).
2184+ is fully supported (use `--pdf-engine=xelatex`).
2239[BCP 47]: https://tools.ietf.org/html/bcp47
2186[BCP 47]: https://tools.ietf.org/html/bcp47
2240[Unicode Bidirectional Algorithm]: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
2187[Unicode Bidirectional Algorithm]: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
@@ -2306,16 +2253,15 @@ To override or extend some [CSS] for just one document, include for example:
2306### Variables for HTML math
2253### Variables for HTML math
2308`classoption`
2255`classoption`
2309−: when using [KaTeX](#option--katex), you can render display
2256+: when using [KaTeX](#option--katex), you can render display math equations
2310−math equations flush left using [YAML metadata](#layout) or with
2257+ flush left using [YAML metadata](#layout) or with `-M classoption=fleqn`.
2311−`-M classoption=fleqn`.
2313### Variables for HTML slides
2259### Variables for HTML slides
2315These affect HTML output when [producing slide shows with pandoc].
2261These affect HTML output when [producing slide shows with pandoc].
2317−`institute`
2263+All [reveal.js configuration options] are available as variables.
2318−: author affiliations: can be a list when there are multiple authors
2264+To turn off boolean flags that default to true in reveal.js, use `0`.
2320`revealjs-url`
2266`revealjs-url`
2321: base URL for reveal.js documents (defaults to
2267: base URL for reveal.js documents (defaults to
@@ -2335,9 +2281,6 @@ These affect HTML output when [producing slide shows with pandoc].
2335: additional attributes for the title slide of reveal.js slide shows.
2281: additional attributes for the title slide of reveal.js slide shows.
2336 See [background in reveal.js and beamer] for an example.
2282 See [background in reveal.js and beamer] for an example.
2338−All [reveal.js configuration options] are available as variables.
2339−To turn off boolean flags that default to true in reveal.js, use `0`.
2341[reveal.js configuration options]: https://revealjs.com/config/
2284[reveal.js configuration options]: https://revealjs.com/config/
2343### Variables for Beamer slides
2286### Variables for Beamer slides
@@ -2423,10 +2366,9 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2425`documentclass`
2368`documentclass`
2426−: document class: usually one of the standard classes,
2369+: document class: usually one of the standard classes, [`article`], [`book`],
2427− [`article`], [`book`], and [`report`]; the [KOMA-Script]
2428− equivalents, `scrartcl`, `scrbook`, and `scrreprt`, which
2370+ and [`report`]; the [KOMA-Script] equivalents, `scrartcl`, `scrbook`,
2429− default to smaller margins; or [`memoir`]
2371+ and `scrreprt`, which default to smaller margins; or [`memoir`]
2431`geometry`
2373`geometry`
2432: option for [`geometry`] package, e.g. `margin=1in`;
2374: option for [`geometry`] package, e.g. `margin=1in`;
@@ -2451,9 +2393,8 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2454−: if true, pandoc will use document class settings for
2396+: if true, pandoc will use document class settings for indentation (the default LaTeX template
2455− indentation (the default LaTeX template otherwise removes
2456− indentation and adds space between paragraphs)
2397+ otherwise removes indentation and adds space between paragraphs)
2458`linestretch`
2399`linestretch`
2459: adjusts line spacing using the [`setspace`]
2400: adjusts line spacing using the [`setspace`]
@@ -2478,8 +2419,8 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2478#### Fonts
2419#### Fonts
2480`fontenc`
2421`fontenc`
2481−: allows font encoding to be specified through `fontenc` package (with
2422+: allows font encoding to be specified through `fontenc` package (with `pdflatex`);
2482− `pdflatex`); default is `T1` (see [LaTeX font encodings guide])
2423+ default is `T1` (see [LaTeX font encodings guide])
2484`fontfamily`
2425`fontfamily`
2485: font package for use with `pdflatex`:
2426: font package for use with `pdflatex`:
@@ -2549,8 +2490,7 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2549: contents of acknowledgments footnote after document title
2490: contents of acknowledgments footnote after document title
2552−: include table of contents (can also be set using
2493+: include table of contents (can also be set using `--toc/--table-of-contents`)
2553− `--toc/--table-of-contents`)
2555`toc-depth`
2495`toc-depth`
2556: level of section to include in table of contents
2496: level of section to include in table of contents
@@ -2592,12 +2532,12 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2592: font size for body text (e.g. `10pt`, `12pt`)
2532: font size for body text (e.g. `10pt`, `12pt`)
2594`headertext`, `footertext`
2534`headertext`, `footertext`
2595−: text to be placed in running header or footer (see [ConTeXt Headers and
2535+: text to be placed in running header or footer (see [ConTeXt Headers and Footers]);
2596− Footers]); repeat up to four times for different placement
2536+ repeat up to four times for different placement
2598`indenting`
2538`indenting`
2599−: controls indentation of paragraphs, e.g. `yes,small,next` (see
2539+: controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]);
2600− [ConTeXt Indentation]); repeat for multiple options
2540+ repeat for multiple options
2602`interlinespace`
2542`interlinespace`
2603: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
2543: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
@@ -2608,19 +2548,16 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2608 repeat for multiple options
2548 repeat for multiple options
2610`linkcolor`, `contrastcolor`
2550`linkcolor`, `contrastcolor`
2611−: color for links outside and inside a page, e.g. `red`, `blue` (see
2551+: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color])
2614`linkstyle`
2553`linkstyle`
2615−: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`,
2554+: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small`
2616− `type`, `cap`, `small`
2618`lof`, `lot`
2556`lof`, `lot`
2619: include list of figures, list of tables
2557: include list of figures, list of tables
2621`mainfont`, `sansfont`, `monofont`, `mathfont`
2559`mainfont`, `sansfont`, `monofont`, `mathfont`
2622−: font families: take the name of any system font (see
2560+: font families: take the name of any system font (see [ConTeXt Font Switching])
2623− [ConTeXt Font Switching])
2625`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
2562`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
2626: sets margins, if `layout` is not used (otherwise `layout`
2563: sets margins, if `layout` is not used (otherwise `layout`
@@ -2635,18 +2572,16 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2635 repeat for multiple options
2572 repeat for multiple options
2638−: adds to the preamble the setup necessary to generate PDF/A
2575+: adds to the preamble the setup necessary to generate PDF/A of the type
2639− of the type specified, e.g. `1a:2005`, `2a`. If no type is
2576+ specified, e.g. `1a:2005`, `2a`. If no type is specified (i.e. the value
2640− specified (i.e. the value is set to True, by e.g.
2641− `--metadata=pdfa` or `pdfa: true` in a YAML metadata block),
2577+ is set to True, by e.g. `--metadata=pdfa` or `pdfa: true` in a YAML metadata
2642− `1b:2005` will be used as default, for reasons of backwards
2578+ block), `1b:2005` will be used as default, for reasons of backwards
2643− compatibility. Using `--variable=pdfa` without specified value
2579+ compatibility. Using `--variable=pdfa` without specified value is not supported.
2644− is not supported. To successfully generate PDF/A the required
2580+ To successfully generate PDF/A the required ICC color profiles have to
2645− ICC color profiles have to be available and the content and all
2581+ be available and the content and all included files (such as images)
2646− included files (such as images) have to be standard conforming.
2647− The ICC profiles and output intent may be specified using the
2582+ have to be standard conforming. The ICC profiles and output intent
2648− variables `pdfaiccprofile` and `pdfaintent`. See also [ConTeXt
2583+ may be specified using the variables `pdfaiccprofile` and `pdfaintent`.
2649− PDFA] for more details.
2584+ See also [ConTeXt PDFA] for more details.
2651`pdfaiccprofile`
2586`pdfaiccprofile`
2652: when used in conjunction with `pdfa`, specifies the ICC profile to use
2587: when used in conjunction with `pdfa`, specifies the ICC profile to use
@@ -2661,12 +2596,10 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2661 If left unspecified, `sRGB IEC61966-2.1` is used as default.
2596 If left unspecified, `sRGB IEC61966-2.1` is used as default.
2664−: include table of contents (can also be set using
2599+: include table of contents (can also be set using `--toc/--table-of-contents`)
2665− `--toc/--table-of-contents`)
2667`whitespace`
2601`whitespace`
2668−: spacing between paragraphs, e.g. `none`, `small` (using
2602+: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`])
2669− [`setupwhitespace`])
2671`includesource`
2604`includesource`
2672: include all source documents as file attachments in the PDF file
2605: include all source documents as file attachments in the PDF file
@@ -3069,43 +3002,6 @@ This extension can be enabled/disabled for the following formats:
3069output formats
3002output formats
3070: `odt`, `opendocument`
3003: `odt`, `opendocument`
3072−#### Extension: `xrefs_name` ####
3074−Links to headings, figures and tables inside the document are
3075−substituted with cross-references that will use the name or caption
3076−of the referenced item. The original link text is replaced once
3077−the generated document is refreshed. This extension can be combined
3078−with `xrefs_number` in which case numbers will appear before the
3081−Text in cross-references is only made consistent with the referenced
3082−item once the document has been refreshed.
3084−This extension can be enabled/disabled for the following formats:
3087−: `odt`, `opendocument`
3089−#### Extension: `xrefs_number` ####
3091−Links to headings, figures and tables inside the document are
3092−substituted with cross-references that will use the number
3093−of the referenced item. The original link text is discarded.
3094−This extension can be combined with `xrefs_name` in which case
3095−the name or caption numbers will appear after the number.
3097−For the `xrefs_number` to be useful heading numbers must be enabled
3098−in the generated document, also table and figure captions must be enabled
3099−using for example the `native_numbering` extension.
3101−Numbers in cross-references are only visible in the final document once
3102−it has been refreshed.
3104−This extension can be enabled/disabled for the following formats:
3107−: `odt`, `opendocument`
3109#### Extension: `styles` #### {#ext-styles}
3005#### Extension: `styles` #### {#ext-styles}
3111When converting from docx, read all docx styles as divs (for
3007When converting from docx, read all docx styles as divs (for
@@ -3132,15 +3028,8 @@ output format.
3133#### Extension: `citations` {#org-citations}
3029#### Extension: `citations` {#org-citations}
3135−Some aspects of [Pandoc's Markdown citation syntax](#citations)
3031+Some aspects of [Pandoc's Markdown citation syntax](#citations) are also accepted
3136−are also accepted in `org` input.
3032+in `org` input.
3138−#### Extension: `element_citations` ####
3140−In the `jats` output formats, this causes reference items to
3141−be replaced with `<element-citation>` elements. These
3142−elements are not influenced by CSL styles, but all information
3143−on the item is included in tags.
3145#### Extension: `ntb` ####
3034#### Extension: `ntb` ####
@@ -3248,8 +3137,7 @@ pandoc does require the space.
3249### Heading identifiers ###
3138### Heading identifiers ###
3251−See also the [`auto_identifiers`
3252−extension](#extension-auto_identifiers) above.
3140+See also the [`auto_identifiers` extension](#extension-auto_identifiers) above.
3254#### Extension: `header_attributes` ####
3142#### Extension: `header_attributes` ####
@@ -3371,12 +3259,11 @@ block in a block quote, you need five spaces after the `>`:
3372#### Extension: `blank_before_blockquote` ####
3260#### Extension: `blank_before_blockquote` ####
3374−Standard Markdown syntax does not require a blank line before a
3262+Standard Markdown syntax does not require a blank line before a block
3375−block quote. Pandoc does require this (except, of course, at
3263+quote. Pandoc does require this (except, of course, at the beginning of the
3376−the beginning of the document). The reason for the requirement
3264+document). The reason for the requirement is that it is all too easy for a
3377−is that it is all too easy for a `>` to end up at the beginning
3378−of a line by accident (perhaps through line wrapping). So,
3265+`>` to end up at the beginning of a line by accident (perhaps through line
3379−unless the `markdown_strict` format is used, the following does
3266+wrapping). So, unless the `markdown_strict` format is used, the following does
3380not produce a nested block quote in pandoc:
3267not produce a nested block quote in pandoc:
3382 > This is a block quote.
3269 > This is a block quote.
@@ -3445,16 +3332,14 @@ this syntax:
3445 qsort (filter (>= x) xs)
3332 qsort (filter (>= x) xs)
3446 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3448−Here `mycode` is an identifier, `haskell` and `numberLines` are
3335+Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
3449−classes, and `startFrom` is an attribute with value `100`. Some
3336+`startFrom` is an attribute with value `100`. Some output formats can use this
3450−output formats can use this information to do syntax
3451−highlighting. Currently, the only output formats that uses this
3337+information to do syntax highlighting. Currently, the only output formats
3452−information are HTML, LaTeX, Docx, Ms, and PowerPoint. If
3338+that uses this information are HTML, LaTeX, Docx, Ms, and PowerPoint. If
3453−highlighting is supported for your output format and language,
3339+highlighting is supported for your output format and language, then the code
3454−then the code block above will appear highlighted, with numbered
3340+block above will appear highlighted, with numbered lines. (To see which
3455−lines. (To see which languages are supported, type `pandoc
3341+languages are supported, type `pandoc --list-highlight-languages`.) Otherwise,
3456−--list-highlight-languages`.) Otherwise, the code block above
3457−will appear as follows:
3342+the code block above will appear as follows:
3459 <pre id="mycode" class="haskell numberLines" startFrom="100">
3344 <pre id="mycode" class="haskell numberLines" startFrom="100">
@@ -3517,9 +3402,6 @@ line must begin with a space.
3517 | 200 Main St.
3402 | 200 Main St.
3518 | Berkeley, CA 94718
3403 | Berkeley, CA 94718
3520−Inline formatting (such as emphasis) is allowed in the content,
3521−but not block-level formatting (such as block quotes or lists).
3523This syntax is borrowed from [reStructuredText].
3405This syntax is borrowed from [reStructuredText].
@@ -3723,12 +3605,11 @@ a blank line, and must be followed by one or more definitions.
3723A definition begins with a colon or tilde, which may be indented one
3605A definition begins with a colon or tilde, which may be indented one
3724or two spaces.
3606or two spaces.
3726−A term may have multiple definitions, and each definition may
3608+A term may have multiple definitions, and each definition may consist of one or
3727−consist of one or more block elements (paragraph, code block,
3609+more block elements (paragraph, code block, list, etc.), each indented four
3728−list, etc.), each indented four spaces or one tab stop. The
3729−body of the definition (including the first line, aside from the
3610+spaces or one tab stop. The body of the definition (including the first line,
3730−colon or tilde) should be indented four spaces. However, as with
3611+aside from the colon or tilde) should be indented four spaces. However,
3731−other Markdown lists, you can "lazily" omit indentation except
3612+as with other Markdown lists, you can "lazily" omit indentation except
3732at the beginning of a paragraph or other block element:
3613at the beginning of a paragraph or other block element:
@@ -3754,10 +3635,9 @@ definition:
3754Note that space between items in a definition list is required.
3635Note that space between items in a definition list is required.
3755(A variant that loosens this requirement, but disallows "lazy"
3636(A variant that loosens this requirement, but disallows "lazy"
3756hard wrapping, can be activated with `compact_definition_lists`: see
3637hard wrapping, can be activated with `compact_definition_lists`: see
3757−[Non-default extensions], below.)
3638+[Non-pandoc extensions], below.)
3759−[^3]: I have been influenced by the suggestions of [David
3760− Wheeler](https://justatheory.com/2009/02/modest-markdown-proposal/).
3640+[^3]: I have been influenced by the suggestions of [David Wheeler](https://justatheory.com/2009/02/modest-markdown-proposal/).
3762### Numbered example lists ###
3642### Numbered example lists ###
@@ -4179,12 +4059,10 @@ option is used. All of the metadata will appear in a single block
4179at the beginning of the document.
4059at the beginning of the document.
4181Note that [YAML] escaping rules must be followed. Thus, for example,
4061Note that [YAML] escaping rules must be followed. Thus, for example,
4182−if a title contains a colon, it must be quoted, and if it contains a
4062+if a title contains a colon, it must be quoted. The pipe character
4183−backslash escape, then it must be ensured that it is not treated as a
4184−[YAML escape sequence]. The pipe character (`|`) can be used to begin
4185−an indented block that will be interpreted literally, without need for
4063+(`|`) can be used to begin an indented block that will be interpreted
4186−escaping. This form is necessary when the field contains blank lines
4064+literally, without need for escaping. This form is necessary
4187−or block-level formatting:
4065+when the field contains blank lines or block-level formatting:
4190 title: 'This is the title: it contains a colon'
4068 title: 'This is the title: it contains a colon'
@@ -4198,12 +4076,6 @@ or block-level formatting:
4198 It consists of two paragraphs.
4076 It consists of two paragraphs.
4201−The literal block after the `|` must be indented relative to the
4202−line containing the `|`. If it is not, the YAML will be invalid
4203−and pandoc will not interpret it as metadata. For an overview
4204−of the complex rules governing YAML, see the [Wikipedia entry on
4207Template variables will be set automatically from the metadata. Thus, for
4079Template variables will be set automatically from the metadata. Thus, for
4208example, in writing HTML, the variable `abstract` will be set to the HTML
4080example, in writing HTML, the variable `abstract` will be set to the HTML
4209equivalent of the Markdown in the `abstract` field:
4081equivalent of the Markdown in the `abstract` field:
@@ -4250,24 +4122,6 @@ will be interpreted as markdown. For example:
4250 \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
4122 \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
4253−Note: the `yaml_metadata_block` extension works with
4254−`commonmark` as well as `markdown` (and it is enabled by default
4255−in `gfm` and `commonmark_x`). However, in these formats the
4256−following restrictions apply:
4258−- The YAML metadata block must occur at the beginning of the
4259− document (and there can be only one). If multiple files are
4260− given as arguments to pandoc, only the first can be a YAML
4263−- The leaf nodes of the YAML structure are parsed in isolation from
4264− each other and from the rest of the document. So, for
4265− example, you can't use a reference link in these contexts
4266− if the link definition is somewhere else in the document.
4268−[YAML escape sequence]: https://yaml.org/spec/1.2/spec.html#id2776092
4269−[Wikipedia entry on YAML syntax]: https://en.m.wikipedia.org/wiki/YAML#Syntax
4271## Backslash escapes
4125## Backslash escapes
4273#### Extension: `all_symbols_escapable` ####
4127#### Extension: `all_symbols_escapable` ####
@@ -4425,8 +4279,7 @@ you need to enclose text in literal `$` characters, backslash-escape
4425them and they won't be treated as math delimiters.
4279them and they won't be treated as math delimiters.
4427For display math, use `$$` delimiters. (In this case, the delimiters
4281For display math, use `$$` delimiters. (In this case, the delimiters
4428−may be separated from the formula by whitespace. However, there can be
4282+may be separated from the formula by whitespace.)
4429−no blank lines betwen the opening and closing `$$` delimiters.)
4431TeX math will be printed in all output formats. How it is rendered
4284TeX math will be printed in all output formats. How it is rendered
4432depends on the output format:
4285depends on the output format:
@@ -4544,8 +4397,8 @@ into
4545whereas `Markdown.pl` will preserve it as is.
4398whereas `Markdown.pl` will preserve it as is.
4547−There is one exception to this rule: text between `<script>`,
4400+There is one exception to this rule: text between `<script>` and
4548−`<style>`, and `<textarea>` tags is not interpreted as Markdown.
4401+`<style>` tags is not interpreted as Markdown.
4550This departure from standard Markdown should make it easier to mix
4403This departure from standard Markdown should make it easier to mix
4551Markdown with HTML block elements. For example, one can surround
4404Markdown with HTML block elements. For example, one can surround
@@ -4960,68 +4813,37 @@ Inline and regular footnotes may be mixed freely.
4961#### Extension: `citations` ####
4814#### Extension: `citations` ####
4963−To cite a bibliographic item with an identifier foo, use the
4816+Markdown citations go inside square brackets and are separated
4964−syntax `@foo`. Normal citations should be included in square
4817+by semicolons. Each citation must have a key, composed of '@' +
4965−brackets, with semicolons separating distinct items:
4818+the citation identifier from the database, and may optionally
4966−
4819+have a prefix, a locator, and a suffix. The citation key must
4967− Blah blah [@doe99; @smith2000; @smith2004].
4969−How this is rendered depends on the citation style. In an
4970−author-date style, it might render as
4972− Blah blah (Doe 1999, Smith 2000, 2004).
4974−In a footnote style, it might render as
4978− [^1]: John Doe, "Frogs," *Journal of Amphibians* 44 (1999);
4979− Susan Smith, "Flies," *Journal of Insects* (2000);
4980− Susan Smith, "Bees," *Journal of Insects* (2004).
4982−See the [CSL user documentation] for more information about CSL
4983−styles and how they affect rendering.
4985−Unless a citation key start with a letter, digit, or `_`,
4820+begin with a letter, digit, or `_`, and may contain
4986−and contains only alphanumerics and internal punctuation
4821+alphanumerics, `_`, and internal punctuation characters
4987−characters (`:.#$%&-+?<>~/`), it must be surrounded
4822+(`:.#$%&-+?<>~/`). Here are some examples:
4988−by curly braces, which are not considered part of the key.
4823+
4989−In `@Foo_bar.baz.`, the key is `Foo_bar.baz`. The final
4824+ Blah blah [see @doe99, pp. 33-35; also @smith04, chap. 1].
4990−period is not *internal* punctuation, so it is not included in
4825+
4991−the key. In `@{Foo_bar.baz.}`, the key is `Foo_bar.baz.`, including
4826+ Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
4992−the final period. The curly braces are recommended if you use URLs as
4827+
4993−keys: `[@{https://example.com/bib?name=foobar&date=2000}, p. 33]`.
4828+ Blah blah [@smith04; @doe99].
4995−Citation items may optionally include a prefix, a locator, and
4998− Blah blah [see @doe99, pp. 33-35 and *passim*; @smith04, chap. 1].
5000−The first item (`doe99`) has prefix `see `, locator `pp. 33-35`,
5001−and suffix `and *passim*`. The second item (`smith04`) has
5002−locator `chap. 1` and no prefix or suffix.
5004−Pandoc uses some heuristics to separate the locator from the
5005−rest of the subject. It is sensitive to the locator terms
5006−defined in the [CSL locale files]. Either abbreviated or
4830+`pandoc` detects locator terms in the [CSL locale files].
5007−unabbreviated forms are accepted. In the `en-US` locale, locator
4831+Either abbreviated or unabbreviated forms are accepted. In the `en-US`
5008−terms can be written in either singular or plural forms, as
4832+locale, locator terms can be written in either singular or plural forms,
5009−`book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
4833+as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
5010−`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`,
4834+`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`, `fol.`/`fols.`;
5011−`fol.`/`fols.`; `number`, `no.`/`nos.`; `line`, `l.`/`ll.`;
4835+`number`, `no.`/`nos.`; `line`, `l.`/`ll.`; `note`, `n.`/`nn.`; `opus`,
5012−`note`, `n.`/`nn.`; `opus`, `op.`/`opp.`; `page`, `p.`/`pp.`;
5013−`paragraph`, `para.`/`paras.`; `part`, `pt.`/`pts.`; `section`,
4836+`op.`/`opp.`; `page`, `p.`/`pp.`; `paragraph`, `para.`/`paras.`; `part`,
5014−`sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`; `verse`,
4837+`pt.`/`pts.`; `section`, `sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`;
5015−`v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
4838+`verse`, `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
5016locator term is used, "page" is assumed.
4839locator term is used, "page" is assumed.
5018−In complex cases, you can force something to be treated as
4841+`pandoc` will use heuristics to distinguish the locator
5019−a locator by enclosing it in curly braces or prevent parsing
4842+from the suffix. In complex cases, the locator can be enclosed
5020−the suffix as locator by prepending curly braces:
4843+in curly braces:
5022 [@smith{ii, A, D-Z}, with a suffix]
4845 [@smith{ii, A, D-Z}, with a suffix]
5023 [@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
4846 [@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
5024− [@smith{}, 99 years later]
5026A minus sign (`-`) before the `@` will suppress mention of
4848A minus sign (`-`) before the `@` will suppress mention of
5027the author in the citation. This can be useful when the
4849the author in the citation. This can be useful when the
@@ -5029,26 +4851,13 @@ author is already mentioned in the text:
5030 Smith says blah [-@smith04].
4852 Smith says blah [-@smith04].
5032−You can also write an author-in-text citation, by omitting the
4854+You can also write an in-text citation, as follows:
5035 @smith04 says blah.
4856 @smith04 says blah.
5037 @smith04 [p. 33] says blah.
4858 @smith04 [p. 33] says blah.
5039−This will cause the author's name to be rendered, followed by
5040−the bibliographical details. Use this form when you want to
5041−make the citation the subject of a sentence.
5043−When you are using a note style, it is usually better to let
5044−citeproc create the footnotes from citations rather than writing
5045−an explicit note. If you do write an explicit note that
5046−contains a citation, note that normal citations will be put in
5047−parentheses, while author-in-text citations will not. For
5048−this reason, it is sometimes preferable to use the
5049−author-in-text style inside notes when using a note style.
5051−[CSL user documentation]: https://citationstyles.org/authors/
5052[CSL]: https://docs.citationstyles.org/en/stable/specification.html
4861[CSL]: https://docs.citationstyles.org/en/stable/specification.html
5053[CSL markup specs]: https://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields
4862[CSL markup specs]: https://docs.citationstyles.org/en/1.0/release-notes.html#rich-text-markup-within-fields
5054[Chicago Manual of Style]: https://chicagomanualofstyle.org
4863[Chicago Manual of Style]: https://chicagomanualofstyle.org
@@ -5057,44 +4866,13 @@ author-in-text style inside notes when using a note style.
5057[finding and editing styles]: https://citationstyles.org/authors/
4866[finding and editing styles]: https://citationstyles.org/authors/
5058[CSL locale files]: https://github.com/citation-style-language/locales
4867[CSL locale files]: https://github.com/citation-style-language/locales
5060−## Non-default extensions
4869+## Non-pandoc extensions
5062The following Markdown syntax extensions are not enabled by default
4871The following Markdown syntax extensions are not enabled by default
5063in pandoc, but may be enabled by adding `+EXTENSION` to the format
4872in pandoc, but may be enabled by adding `+EXTENSION` to the format
5064name, where `EXTENSION` is the name of the extension. Thus, for
4873name, where `EXTENSION` is the name of the extension. Thus, for
5065example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
4874example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
5067−#### Extension: `rebase_relative_paths` ####
5069−Rewrite relative paths for Markdown links and images, depending
5070−on the path of the file containing the link or image link. For
5071−each link or image, pandoc will compute the directory of the
5072−containing file, relative to the working directory, and prepend
5073−the resulting path to the link or image path.
5075−The use of this extension is best understood by example.
5076−Suppose you have a a subdirectory for each chapter of a book,
5077−`chap1`, `chap2`, `chap3`. Each contains a file `text.md` and a
5078−number of images used in the chapter. You would like to have
5079−`` in `chap1/text.md` refer to
5080−`chap1/spider.jpg` and `` in `chap2/text.md`
5081−refer to `chap2/spider.jpg`. To do this, use
5083− pandoc chap*/*.md -f markdown+rebase_relative_paths
5085−Without this extension, you would have to use
5086−`` in `chap1/text.md` and
5087−`` in `chap2/text.md`. Links with
5088−relative paths will be rewritten in the same way as images.
5090−Absolute paths and URLs are not changed. Neither are empty
5091−paths or paths consisting entirely of a fragment, e.g., `#foo`.
5093−Note that relative paths in reference links and images will
5094−be rewritten relative to the file containing the link
5095−reference definition, not the file containing the reference link
5096−or image itself, if these differ.
5098#### Extension: `attributes` ####
4876#### Extension: `attributes` ####
5100Allows attributes to be attached to any inline or block-level
4878Allows attributes to be attached to any inline or block-level
@@ -5281,13 +5059,6 @@ for regular emphasis, add extra blank space around headings.
5282 [Project Gutenberg]: https://www.gutenberg.org
5060 [Project Gutenberg]: https://www.gutenberg.org
5284−#### Extension: `sourcepos` ####
5286−Include source position attributes when parsing `commonmark`.
5287−For elements that accept attributes, a `data-pos` attribute
5288−is added; other elements are placed in a surrounding
5289−Div or Span elemnet with a `data-pos` attribute.
5291## Markdown variants
5062## Markdown variants
5293In addition to pandoc's extended Markdown, the following Markdown
5064In addition to pandoc's extended Markdown, the following Markdown
@@ -5402,21 +5173,17 @@ array of YAML-encoded references, for example:
5402 language: en-GB
5173 language: en-GB
5405−If both an external bibliography and inline (YAML metadata)
5406−references are provided, both will be used. In case of
5407−conflicting `id`s, the inline references will take precedence.
5409Note that `pandoc` can be used to produce such a YAML metadata
5176Note that `pandoc` can be used to produce such a YAML metadata
5410section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
5177section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
5412 pandoc chem.bib -s -f biblatex -t markdown
5179 pandoc chem.bib -s -f biblatex -t markdown
5413 pandoc chem.json -s -f csljson -t markdown
5180 pandoc chem.json -s -f csljson -t markdown
5415−Indeed, `pandoc` can convert between any of these
5182+`pandoc` can also be used to produce CSL JSON bibliography
5416−citation formats:
5183+from BibTeX, BibLaTeX, or markdown YAML:
5418 pandoc chem.bib -s -f biblatex -t csljson
5185 pandoc chem.bib -s -f biblatex -t csljson
5419− pandoc chem.yaml -s -f markdown -t biblatex
5186+ pandoc chem.yaml -s -f markdown -t csljson
5421Running pandoc on a bibliography file with the `--citeproc`
5188Running pandoc on a bibliography file with the `--citeproc`
5422option will create a formatted bibliography in the format
5189option will create a formatted bibliography in the format
@@ -5499,11 +5266,11 @@ The CSL project provides further information on [finding and
5499editing styles].
5266editing styles].
5501The `--citation-abbreviations` option (or the
5268The `--citation-abbreviations` option (or the
5502−`citation-abbreviations` metadata field) may be used to specify
5269+`citation-abbreviations` metadata field) may be used to
5503−a JSON file containing abbreviations of journals that should be
5270+specify a JSON file containing abbreviations of journals
5504−used in formatted bibliographies when `form="short"` is
5271+that should be used in formatted bibliographies when
5505−specified. The format of the file can be illustrated with an
5272+`form="short"` is specified. The format of the file
5506−example:
5273+can be illustrated with an example:
5509 { "default": {
5276 { "default": {
@@ -5515,34 +5282,6 @@ example:
5519−## Citations in note styles
5521−Pandoc's citation processing is designed to allow you to
5522−move between author-date, numerical, and note styles without
5523−modifying the markdown source. When you're using a note
5524−style, avoid inserting footnotes manually. Instead, insert
5525−citations just as you would in an author-date style---for
5528− Blah blah [@foo, p. 33].
5530−The footnote will be created automatically. Pandoc will take
5531−care of removing the space and moving the note before or
5532−after the period, depending on the setting of
5533−`notes-after-punctuation`, as described below in [Other relevant
5536−In some cases you may need to put a citation inside a regular
5537−footnote. Normal citations in footnotes (such as `[@foo, p.
5538−33]`) will be rendered in parentheses. In-text citations (such
5539−as `@foo [p. 33]`) will be rendered without parentheses. (A
5540−comma will be added if appropriate.) Thus:
5542− [^1]: Some studies [@foo; @bar, p. 33] show that
5543− frubulicious zoosnaps are quantical. For a survey
5544− of the literature, see @baz [chap. 1].
5546## Raw content in a style
5285## Raw content in a style
5548To include raw content in a prefix, suffix, delimiter, or term,
5287To include raw content in a prefix, suffix, delimiter, or term,
@@ -5621,30 +5360,17 @@ or BibLaTeX (for `--biblatex`) format.
5622A few other metadata fields affect bibliography formatting:
5361A few other metadata fields affect bibliography formatting:
5624−`link-citations`
5363+`link-citation`
5625: If true, citations will be
5364: If true, citations will be
5626 hyperlinked to the corresponding bibliography entries
5365 hyperlinked to the corresponding bibliography entries
5627 (for author-date and numerical styles only).
5366 (for author-date and numerical styles only).
5630: The `lang` field will affect how the style is localized,
5369: The `lang` field will affect how the style is localized,
5631− for example in the translation of labels, the use
5370+ for example in the translation of labels and the use
5632− of quotation marks, and the way items are sorted.
5633− (For backwards compatibility, `locale` may be used instead
5371+ of quotation marks. (For backwards compatibility,
5372+ `locale` may be used instead of `lang`, but this use
5634− of `lang`, but this use is deprecated.)
5373+ is deprecated.)
5636− A BCP 47 language tag is expected: for example, `en`,
5637− `de`, `en-US`, `fr-CA`, `ug-Cyrl`. The unicode extension
5638− syntax (after `-u-`) may be used to specify options for
5639− collation (sorting) more precisely. Here are some examples:
5641− - `zh-u-co-pinyin` -- Chinese with the Pinyin collation.
5642− - `es-u-co-trad` -- Spanish with the traditional collation
5643− (with `Ch` sorting after `C`).
5644− - `fr-u-kb` -- French with "backwards" accent sorting
5645− (with `coté` sorting after `côte`).
5646− - `en-US-u-kf-upper` -- English with uppercase letters sorting
5647− before lower (default is lower before upper).
5649`notes-after-punctuation`
5375`notes-after-punctuation`
5650: If true (the default), pandoc will put footnote citations
5376: If true (the default), pandoc will put footnote citations
@@ -5656,6 +5382,12 @@ A few other metadata fields affect bibliography formatting:
5656 punctuation.
5382 punctuation.
5659# Slide shows
5391# Slide shows
5661You can use pandoc to produce an HTML + JavaScript slide presentation
5393You can use pandoc to produce an HTML + JavaScript slide presentation
@@ -5704,21 +5436,18 @@ To produce an HTML/JavaScript slide show, simply type
5705where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
5437where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
5707−For Slidy, Slideous, reveal.js, and S5, the file produced by
5439+For Slidy, Slideous, reveal.js, and S5, the file produced by pandoc with the
5708−pandoc with the `-s/--standalone` option embeds a link to
5440+`-s/--standalone` option embeds a link to JavaScript and CSS files, which are
5709−JavaScript and CSS files, which are assumed to be available at
5710−the relative path `s5/default` (for S5), `slideous` (for
5441+assumed to be available at the relative path `s5/default` (for S5), `slideous`
5711−Slideous), `reveal.js` (for reveal.js), or at the Slidy website
5442+(for Slideous), `reveal.js` (for reveal.js), or at the Slidy website at
5712−at `w3.org` (for Slidy). (These paths can be changed by setting
5443+`w3.org` (for Slidy). (These paths can be changed by setting the `slidy-url`,
5713−the `slidy-url`, `slideous-url`, `revealjs-url`, or `s5-url`
5714−variables; see [Variables for HTML slides], above.) For
5444+`slideous-url`, `revealjs-url`, or `s5-url` variables; see [Variables for HTML slides],
5715−DZSlides, the (relatively short) JavaScript and CSS are included
5445+above.) For DZSlides, the (relatively short) JavaScript and CSS are included in
5716−in the file by default.
5446+the file by default.
5718−With all HTML slide formats, the `--self-contained` option can
5448+With all HTML slide formats, the `--self-contained` option can be used to
5719−be used to produce a single file that contains all of the data
5449+produce a single file that contains all of the data necessary to display the
5720−necessary to display the slide show, including linked scripts,
5721−stylesheets, images, and videos.
5450+slide show, including linked scripts, stylesheets, images, and videos.
5723To produce a PDF slide show using beamer, type
5452To produce a PDF slide show using beamer, type
@@ -5748,11 +5477,7 @@ rules:
5748 * A heading at the slide level always starts a new slide.
5477 * A heading at the slide level always starts a new slide.
5750 * Headings *below* the slide level in the hierarchy create
5479 * Headings *below* the slide level in the hierarchy create
5751− headings *within* a slide. (In beamer, a "block" will be
5480+ headings *within* a slide.
5752− created. If the heading has the class `example`, an
5753− `exampleblock` environment will be used; if it has the class
5754− `alert`, an `alertblock` will be used; otherwise a regular
5755− `block` will be used.)
5757 * Headings *above* the slide level in the hierarchy create
5482 * Headings *above* the slide level in the hierarchy create
5758 "title slides," which just contain the section title
5483 "title slides," which just contain the section title
@@ -6085,15 +5810,6 @@ The following fields are recognized:
6087 ~ A string value.
5812 ~ A string value.
6089−`belongs-to-collection`
6090− ~ A string value. identifies the name of a collection to which
6091− the EPUB Publication belongs.
6094− ~ The `group-position` field indicates the numeric position in which
6095− the EPUB Publication belongs relative to other works belonging to
6096− the same `belongs-to-collection` field.
6098`cover-image`
5814`cover-image`
6099 ~ A string value (path to cover image).
5815 ~ A string value (path to cover image).
@@ -6330,7 +6046,7 @@ Then edit `my.theme` and use it like this:
6330If you are not satisfied with the built-in highlighting, or you
6046If you are not satisfied with the built-in highlighting, or you
6331want highlight a language that isn't supported, you can use the
6047want highlight a language that isn't supported, you can use the
6332`--syntax-definition` option to load a [KDE-style XML syntax definition
6048`--syntax-definition` option to load a [KDE-style XML syntax definition
6333−file](https://docs.kde.org/stable5/en/kate/katepart/highlight.html).
6049+file](https://docs.kde.org/stable5/en/applications/katepart/highlight.html).
6334Before writing your own, have a look at KDE's [repository of syntax
6050Before writing your own, have a look at KDE's [repository of syntax
6335definitions](https://github.com/KDE/syntax-highlighting/tree/master/data/syntax).
6051definitions](https://github.com/KDE/syntax-highlighting/tree/master/data/syntax).
@@ -6461,21 +6177,6 @@ subdirectory of your user data directory (see [Templates]).
6462[Lua]: https://www.lua.org
6178[Lua]: https://www.lua.org
6464−# Reproducible builds
6466−Some of the document formats pandoc targets (such as EPUB,
6467−docx, and ODT) include build timestamps in the generated document.
6468−That means that the files generated on successive builds will
6469−differ, even if the source does not. To avoid this, set the
6470−`SOURCE_DATE_EPOCH` environment variable, and the timestamp will
6471−be taken from it instead of the current time.
6472−`SOURCE_DATE_EPOCH` should contain an integer unix timestamp
6473−(specifying the number of second since midnight UTC January 1, 1970).
6475−Some document formats also include a unique identifier. For
6476−EPUB, this can be set explicitly by setting the `identifier`
6477−metadata field (see [EPUB Metadata], above).
6479# A note on security
6180# A note on security
6481If you use pandoc to convert user-contributed content in a web
6182If you use pandoc to convert user-contributed content in a web
@@ -6504,13 +6205,13 @@ application, here are some things to keep in mind:
65044. The HTML generated by pandoc is not guaranteed to be safe.
62054. The HTML generated by pandoc is not guaranteed to be safe.
6505 If `raw_html` is enabled for the Markdown input, users can
6206 If `raw_html` is enabled for the Markdown input, users can
6506 inject arbitrary HTML. Even if `raw_html` is disabled,
6207 inject arbitrary HTML. Even if `raw_html` is disabled,
6507− users can include dangerous content in URLs and attributes.
6208+ users can include dangerous content in attributes for
6209+ headings, spans, and code blocks. To be safe, you should
6508− To be safe, you should run all the generated HTML through
6210+ run all the generated HTML through an HTML sanitizer.
6511# Authors
6212# Authors
6513−Copyright 2006--2021 John MacFarlane (jgm@berkeley.edu). Released
6214+Copyright 2006--2020 John MacFarlane (jgm@berkeley.edu). Released
6514under the [GPL], version 2 or greater. This software carries no
6215under the [GPL], version 2 or greater. This software carries no
6515warranty of any kind. (See COPYRIGHT for full copyright and
6216warranty of any kind. (See COPYRIGHT for full copyright and
6516warranty notices.) For a full list of contributors, see the file
6217warranty notices.) For a full list of contributors, see the file