@@ -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: July 23, 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*]
@@ -657,30 +665,30 @@ header when requesting a document from a URL:
658: Specifies what to do with insertions, deletions, and comments
666: Specifies what to do with insertions, deletions, and comments
659 produced by the MS Word "Track Changes" feature. `accept` (the
667 produced by the MS Word "Track Changes" feature. `accept` (the
660− default) processes all the insertions and deletions.
668+ default), inserts all insertions, and ignores all
669+ deletions. `reject` inserts all deletions and ignores
661− `reject` ignores them. Both `accept` and `reject` ignore comments.
670+ insertions. Both `accept` and `reject` ignore comments. `all` puts
662− `all` includes all insertions, deletions, and comments, wrapped
671+ in insertions, deletions, and comments, wrapped in spans with
663− in spans with `insertion`, `deletion`, `comment-start`, and
672+ `insertion`, `deletion`, `comment-start`, and `comment-end`
664− `comment-end` classes, respectively. The author and time of
673+ classes, respectively. The author and time of change is
665− change is included. `all` is useful for scripting: only
674+ included. `all` is useful for scripting: only accepting changes
666− accepting changes from a certain reviewer, say, or before a
675+ from a certain reviewer, say, or before a certain date. If a
667− certain date. If a paragraph is inserted or deleted,
676+ paragraph is inserted or deleted, `track-changes=all` produces a
668− `track-changes=all` produces a span with the class
669− `paragraph-insertion`/`paragraph-deletion` before the
677+ span with the class `paragraph-insertion`/`paragraph-deletion`
670− affected paragraph break. This option only affects the docx
678+ before the affected paragraph break. This option only affects the
671− reader.
679+ docx reader.
673`--extract-media=`*DIR*
681`--extract-media=`*DIR*
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).
@@ -936,9 +943,7 @@ header when requesting a document from a URL:
937`--html-q-tags`
944`--html-q-tags`
939−: Use `<q>` tags for quotes in HTML. (This option only has an
946+: Use `<q>` tags for quotes in HTML.
940− effect if the `smart` extension is enabled for the input
@@ -956,45 +961,37 @@ header when requesting a document from a URL:
956 placement of link references is affected by the
961 placement of link references is affected by the
957 `--reference-location` option.
962 `--reference-location` option.
959−`--reference-location=block`|`section`|`document`
964+`--reference-location = block`|`section`|`document`
961: Specify whether footnotes (and references, if `reference-links` is
966: Specify whether footnotes (and references, if `reference-links` is
962 set) are placed at the end of the current (top-level) block, the
967 set) are placed at the end of the current (top-level) block, the
963 current section, or the document. The default is
968 current section, or the document. The default is
964 `document`. Currently only affects the markdown writer.
969 `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`
971`--atx-headers`
976−: *Deprecated synonym for `--markdown-headings=atx`.*
973+: Use ATX-style headings in Markdown output. The default is
974+ to use setext-style headings for levels 1 to 2, and then ATX headings.
975+ (Note: for `gfm` output, ATX headings are always used.)
976+ This option also affects markdown cells in `ipynb` output.
978−`--top-level-division=default`|`section`|`chapter`|`part`
978+`--top-level-division=[default|section|chapter|part]`
980−: Treat top-level headings as the given division type in
980+: Treat top-level headings as the given division type in LaTeX, ConTeXt,
981− LaTeX, ConTeXt, DocBook, and TEI output. The hierarchy
981+ 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
982+ all headings are shifted such that the top-level heading becomes the specified
984− specified type. The default behavior is to determine the
983+ type. The default behavior is to determine the best division type via
985− best division type via heuristics: unless other conditions
984+ 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
985+ `documentclass` variable is set to `report`, `book`, or `memoir` (unless the
988− `article` option is specified), `chapter` is implied as the
986+ `article` option is specified), `chapter` is implied as the setting for this
989− setting for this option. If `beamer` is the output format,
987+ 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
988+ `part` will cause top-level headings to become `\part{..}`, while
992− remain as their default type.
989+ second-level headings remain as their default type.
994`-N`, `--number-sections`
991`-N`, `--number-sections`
996−: Number section headings in LaTeX, ConTeXt, HTML, Docx, ms, or EPUB
993+: Number section headings in LaTeX, ConTeXt, HTML, Docx, or EPUB output.
997− output. By default, sections are not numbered. Sections with class
994+ By default, sections are not numbered. Sections with class
998 `unnumbered` will never be numbered, even if `--number-sections`
995 `unnumbered` will never be numbered, even if `--number-sections`
999 is specified.
996 is specified.
@@ -1327,10 +1324,7 @@ header when requesting a document from a URL:
1327: Set the `bibliography` field in the document's metadata to *FILE*,
1324: Set the `bibliography` field in the document's metadata to *FILE*,
1328 overriding any value set in the metadata. If you supply
1325 overriding any value set in the metadata. If you supply
1329 this argument multiple times, each *FILE* will be added to
1326 this argument multiple times, each *FILE* will be added to
1330− bibliography. If *FILE* is a URL, it will be fetched
1327+ 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*
1329`--csl=`*FILE*
@@ -1339,8 +1333,8 @@ header when requesting a document from a URL:
1339 `--metadata csl=FILE`.) If *FILE* is a URL, it will be
1333 `--metadata csl=FILE`.) If *FILE* is a URL, it will be
1340 fetched via HTTP. If *FILE* is not found relative to the
1334 fetched via HTTP. If *FILE* is not found relative to the
1341 working directory, it will be sought in the resource path
1335 working directory, it will be sought in the resource path
1342− (see `--resource-path`) and finally in the `csl`
1336+ and finally in the `csl` subdirectory of the
1343− subdirectory of the pandoc user data directory.
1337+ pandoc user data directory.
1345`--citation-abbreviations=`*FILE*
1339`--citation-abbreviations=`*FILE*
@@ -1349,31 +1343,28 @@ header when requesting a document from a URL:
1349 `--metadata citation-abbreviations=FILE`.)
1343 `--metadata citation-abbreviations=FILE`.)
1350 If *FILE* is a URL, it will be fetched via HTTP. If *FILE* is not
1344 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
1345 found relative to the working directory, it will be sought
1352− in the resource path (see `--resource-path`) and finally in
1346+ in the resource path and finally in the `csl` subdirectory
1353− the `csl` subdirectory of the pandoc user data directory.
1347+ of the pandoc user data directory.
1355`--natbib`
1349`--natbib`
1357−: Use [`natbib`] for citations in LaTeX output. This option
1351+: 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
1352+ 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`].
1353+ use in producing a LaTeX file that can be processed with [`bibtex`].
1362`--biblatex`
1355`--biblatex`
1364−: Use [`biblatex`] for citations in LaTeX output. This option
1357+: 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
1358+ 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`].
1359+ use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`].
1369## Math rendering in HTML {.options}
1361## Math rendering in HTML {.options}
1371−The default is to render TeX math as far as possible using
1363+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
1364+Formulas are put inside a `span` with `class="math"`, so that they may be styled
1374−surrounding text if needed. However, this gives acceptable
1365+differently from the surrounding text if needed. However, this gives acceptable
1375−results only for basic math, usually you will want to use
1366+results only for basic math, usually you will want to use `--mathjax` or another
1376−`--mathjax` or another of the following options.
1367+of the following options.
1378`--mathjax`[`=`*URL*]
1369`--mathjax`[`=`*URL*]
@@ -1387,11 +1378,10 @@ results only for basic math, usually you will want to use
1388`--mathml`
1379`--mathml`
1390−: Convert TeX math to [MathML] (in `epub3`, `docbook4`,
1381+: 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
1382+ `html4` and `html5`). This is the default in `odt` output. Note that
1393− and Safari (and select e-book readers) natively support
1383+ currently only Firefox and Safari (and select e-book readers) natively
1394− MathML.
1384+ support MathML.
1396`--webtex`[`=`*URL*]
1386`--webtex`[`=`*URL*]
@@ -1415,12 +1405,13 @@ results only for basic math, usually you will want to use
1415`--gladtex`
1405`--gladtex`
1417: Enclose TeX math in `<eq>` tags in HTML output. The resulting HTML
1407: 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
1408+ can then be processed by [GladTeX] to produce images of the typeset
1419− formulas and an HTML file with these images embedded.
1409+ formulas and an HTML file with links to these images.
1410+ So, the procedure is:
1421 pandoc -s --gladtex input.md -o myfile.htex
1412 pandoc -s --gladtex input.md -o myfile.htex
1422− gladtex -d image_dir myfile.htex
1413+ gladtex -d myfile-images myfile.htex
1423− # produces myfile.html and images in image_dir
1414+ # produces myfile.html and images in myfile-images
1425[MathML]: https://www.w3.org/Math/
1416[MathML]: https://www.w3.org/Math/
1426[MathJax]: https://www.mathjax.org
1417[MathJax]: https://www.mathjax.org
@@ -1468,7 +1459,6 @@ Nonzero exit codes have the following meanings:
1468 24 PandocCiteprocError
1459 24 PandocCiteprocError
1469 31 PandocEpubSubdirectoryError
1460 31 PandocEpubSubdirectoryError
1470 43 PandocPDFError
1461 43 PandocPDFError
1472 47 PandocPDFProgramNotFoundError
1462 47 PandocPDFProgramNotFoundError
1473 61 PandocHttpError
1463 61 PandocHttpError
1474 62 PandocShouldNeverHappenError
1464 62 PandocShouldNeverHappenError
@@ -1481,7 +1471,6 @@ Nonzero exit codes have the following meanings:
1481 91 PandocMacroLoop
1471 91 PandocMacroLoop
1482 92 PandocUTF8DecodingError
1472 92 PandocUTF8DecodingError
1483 93 PandocIpynbDecodingError
1473 93 PandocIpynbDecodingError
1484− 94 PandocUnsupportedCharsetError
1485 97 PandocCouldNotFindDataFileError
1474 97 PandocCouldNotFindDataFileError
1486 99 PandocResourceNotFound
1475 99 PandocResourceNotFound
1487----- ------------------------------------
1476----- ------------------------------------
@@ -1506,16 +1495,6 @@ input-files:
1506- content.md
1495- content.md
1507# or you may use input-file: with a single value
1496# 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
1498template: letter
1520standalone: true
1499standalone: true
1521self-contained: false
1500self-contained: false
@@ -1552,7 +1531,6 @@ csl: ieee
1552bibliography:
1531bibliography:
1553- foobar.bib
1532- foobar.bib
1554- barbaz.json
1533- barbaz.json
1555−citation-abbreviations: abbrevs.json
1557# Filters will be assumed to be Lua filters if they have
1535# Filters will be assumed to be Lua filters if they have
1558# the .lua extension, and json filters otherwise. But
1536# the .lua extension, and json filters otherwise. But
@@ -1573,11 +1551,8 @@ data-dir:
1573verbosity: INFO
1551verbosity: INFO
1574log-file: log.json
1552log-file: log.json
1576−# citeproc, natbib, or biblatex. This only affects LaTeX
1554+# 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
1555cite-method: citeproc
1581# part, chapter, section, or default:
1556# part, chapter, section, or default:
1582top-level-division: chapter
1557top-level-division: chapter
1583abbreviations:
1558abbreviations:
@@ -1646,7 +1621,7 @@ epub-cover-image: cover.jpg
1646reference-links: true
1621reference-links: true
1647# block, section, or document
1622# block, section, or document
1648reference-location: block
1623reference-location: block
1649−markdown-headings: setext
1624+atx-headers: false
1651# accept, reject, or all
1626# accept, reject, or all
1652track-changes: accept
1627track-changes: accept
@@ -1676,34 +1651,6 @@ one line:
1676verbosity: INFO
1651verbosity: 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
1654Default files can be placed in the `defaults` subdirectory of
1708the user data directory and used from any directory. For
1655the user data directory and used from any directory. For
1709example, one could create a file specifying defaults for writing
1656example, one could create a file specifying defaults for writing
@@ -1931,8 +1878,7 @@ ${ styles.html() }
1933(If a partial is not found in the directory of the
1880(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`
1881+template, it will also be sought in the `templates`
1936subdirectory of the user data directory.)
1882subdirectory of the user data directory.)
1938Partials may optionally be applied to variables using
1884Partials may optionally be applied to variables using
@@ -2150,8 +2096,7 @@ Currently the following pipes are predefined:
2150 including a title block in the document itself, you can
2096 including a title block in the document itself, you can
2151 set the `title-meta`, `author-meta`, and `date-meta`
2097 set the `title-meta`, `author-meta`, and `date-meta`
2152 variables. (By default these are set automatically, based
2098 variables. (By default these are set automatically, based
2153− on `title`, `author`, and `date`.) The page title in HTML
2099+ on `title`, `author`, and `date`.)
2154− is set by `pagetitle`, which is equal to `title` by default.
2156`subtitle`
2101`subtitle`
2157: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
2102: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and docx
@@ -2225,16 +2170,15 @@ ODT or pptx.
2225: the base script direction, either `rtl` (right-to-left)
2170: the base script direction, either `rtl` (right-to-left)
2226 or `ltr` (left-to-right).
2171 or `ltr` (left-to-right).
2228− For bidirectional documents, native pandoc `span`s and
2173+ For bidirectional documents, native pandoc `span`s and `div`s
2229− `div`s with the `dir` attribute (value `rtl` or `ltr`) can
2174+ with the `dir` attribute (value `rtl` or `ltr`) can be used to
2230− be used to override the base direction in some output
2175+ override the base direction in some output formats.
2231− formats. This may not always be necessary if the final
2176+ This may not always be necessary if the final renderer
2232− renderer (e.g. the browser, when generating HTML) supports
2177+ (e.g. the browser, when generating HTML) supports the
2233− the [Unicode Bidirectional Algorithm].
2178+ [Unicode Bidirectional Algorithm].
2235− When using LaTeX for bidirectional documents, only the
2180+ When using LaTeX for bidirectional documents, only the `xelatex` engine
2236− `xelatex` engine is fully supported (use
2237− `--pdf-engine=xelatex`).
2181+ is fully supported (use `--pdf-engine=xelatex`).
2239[BCP 47]: https://tools.ietf.org/html/bcp47
2183[BCP 47]: https://tools.ietf.org/html/bcp47
2240[Unicode Bidirectional Algorithm]: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
2184[Unicode Bidirectional Algorithm]: https://www.w3.org/International/articles/inline-bidi-markup/uba-basics
@@ -2243,7 +2187,7 @@ ODT or pptx.
2243### Variables for HTML
2187### Variables for HTML
2245`document-css`
2189`document-css`
2246−: Enables inclusion of most of the [CSS] in the `styles.html`
2190+: Enables inclusion of most of the CSS in the `styles.html`
2247 [partial](#partials) (have a look with
2191 [partial](#partials) (have a look with
2248 `pandoc --print-default-data-file=templates/styles.html`).
2192 `pandoc --print-default-data-file=templates/styles.html`).
2249 Unless you use [`--css`](#option--css), this variable
2193 Unless you use [`--css`](#option--css), this variable
@@ -2267,10 +2211,6 @@ ODT or pptx.
2267`monofont`
2211`monofont`
2268: sets the CSS `font-family` property on `code` elements.
2212: sets the CSS `font-family` property on `code` elements.
2270−`monobackgroundcolor`
2271−: sets the CSS `background-color` property on `code` elements
2272− and adds extra padding.
2274`linestretch`
2214`linestretch`
2275: sets the CSS `line-height` property on the `html` element,
2215: sets the CSS `line-height` property on the `html` element,
2276 which is preferred to be unitless.
2216 which is preferred to be unitless.
@@ -2281,41 +2221,18 @@ ODT or pptx.
2281`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
2221`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
2282: sets the corresponding CSS `padding` properties on the `body` element.
2222: sets the corresponding CSS `padding` properties on the `body` element.
2284−To override or extend some [CSS] for just one document, include for example:
2290− font-style: italic;
2293− background-color: #f0f0f0;
2296− padding: 0.5em 2em 0.5em 0.5em;
2299− border-bottom: none;
2304−[CSS]: https://developer.mozilla.org/en-US/docs/Learn/CSS
2306### Variables for HTML math
2224### Variables for HTML math
2308`classoption`
2226`classoption`
2309−: when using [KaTeX](#option--katex), you can render display
2227+: when using [KaTeX](#option--katex), you can render display math equations
2310−math equations flush left using [YAML metadata](#layout) or with
2228+ flush left using [YAML metadata](#layout) or with `-M classoption=fleqn`.
2311−`-M classoption=fleqn`.
2313### Variables for HTML slides
2230### Variables for HTML slides
2315These affect HTML output when [producing slide shows with pandoc].
2232These affect HTML output when [producing slide shows with pandoc].
2317−`institute`
2234+All [reveal.js configuration options] are available as variables.
2318−: author affiliations: can be a list when there are multiple authors
2235+To turn off boolean flags that default to true in reveal.js, use `0`.
2320`revealjs-url`
2237`revealjs-url`
2321: base URL for reveal.js documents (defaults to
2238: base URL for reveal.js documents (defaults to
@@ -2335,9 +2252,6 @@ These affect HTML output when [producing slide shows with pandoc].
2335: additional attributes for the title slide of reveal.js slide shows.
2252: additional attributes for the title slide of reveal.js slide shows.
2336 See [background in reveal.js and beamer] for an example.
2253 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/
2255[reveal.js configuration options]: https://revealjs.com/config/
2343### Variables for Beamer slides
2257### Variables for Beamer slides
@@ -2423,10 +2337,9 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2425`documentclass`
2339`documentclass`
2426−: document class: usually one of the standard classes,
2340+: 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
2341+ and [`report`]; the [KOMA-Script] equivalents, `scrartcl`, `scrbook`,
2429− default to smaller margins; or [`memoir`]
2342+ and `scrreprt`, which default to smaller margins; or [`memoir`]
2431`geometry`
2344`geometry`
2432: option for [`geometry`] package, e.g. `margin=1in`;
2345: option for [`geometry`] package, e.g. `margin=1in`;
@@ -2451,9 +2364,8 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2454−: if true, pandoc will use document class settings for
2455− indentation (the default LaTeX template otherwise removes
2367+: uses document class settings for indentation (the default LaTeX template
2456− indentation and adds space between paragraphs)
2368+ otherwise removes indentation and adds space between paragraphs)
2458`linestretch`
2370`linestretch`
2459: adjusts line spacing using the [`setspace`]
2371: adjusts line spacing using the [`setspace`]
@@ -2478,8 +2390,8 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2478#### Fonts
2390#### Fonts
2480`fontenc`
2392`fontenc`
2481−: allows font encoding to be specified through `fontenc` package (with
2393+: allows font encoding to be specified through `fontenc` package (with `pdflatex`);
2482− `pdflatex`); default is `T1` (see [LaTeX font encodings guide])
2394+ default is `T1` (see [LaTeX font encodings guide])
2484`fontfamily`
2396`fontfamily`
2485: font package for use with `pdflatex`:
2397: font package for use with `pdflatex`:
@@ -2549,8 +2461,7 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
2549: contents of acknowledgments footnote after document title
2461: contents of acknowledgments footnote after document title
2552−: include table of contents (can also be set using
2464+: include table of contents (can also be set using `--toc/--table-of-contents`)
2553− `--toc/--table-of-contents`)
2555`toc-depth`
2466`toc-depth`
2556: level of section to include in table of contents
2467: level of section to include in table of contents
@@ -2592,12 +2503,12 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2592: font size for body text (e.g. `10pt`, `12pt`)
2503: font size for body text (e.g. `10pt`, `12pt`)
2594`headertext`, `footertext`
2505`headertext`, `footertext`
2595−: text to be placed in running header or footer (see [ConTeXt Headers and
2506+: text to be placed in running header or footer (see [ConTeXt Headers and Footers]);
2596− Footers]); repeat up to four times for different placement
2507+ repeat up to four times for different placement
2598`indenting`
2509`indenting`
2599−: controls indentation of paragraphs, e.g. `yes,small,next` (see
2510+: controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]);
2600− [ConTeXt Indentation]); repeat for multiple options
2511+ repeat for multiple options
2602`interlinespace`
2513`interlinespace`
2603: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
2514: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]);
@@ -2608,19 +2519,16 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2608 repeat for multiple options
2519 repeat for multiple options
2610`linkcolor`, `contrastcolor`
2521`linkcolor`, `contrastcolor`
2611−: color for links outside and inside a page, e.g. `red`, `blue` (see
2522+: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color])
2614`linkstyle`
2524`linkstyle`
2615−: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`,
2525+: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small`
2616− `type`, `cap`, `small`
2618`lof`, `lot`
2527`lof`, `lot`
2619: include list of figures, list of tables
2528: include list of figures, list of tables
2621`mainfont`, `sansfont`, `monofont`, `mathfont`
2530`mainfont`, `sansfont`, `monofont`, `mathfont`
2622−: font families: take the name of any system font (see
2531+: 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`
2533`margin-left`, `margin-right`, `margin-top`, `margin-bottom`
2626: sets margins, if `layout` is not used (otherwise `layout`
2534: sets margins, if `layout` is not used (otherwise `layout`
@@ -2635,18 +2543,16 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2635 repeat for multiple options
2543 repeat for multiple options
2638−: adds to the preamble the setup necessary to generate PDF/A
2546+: 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
2547+ 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),
2548+ 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
2549+ block), `1b:2005` will be used as default, for reasons of backwards
2643− compatibility. Using `--variable=pdfa` without specified value
2550+ compatibility. Using `--variable=pdfa` without specified value is not supported.
2644− is not supported. To successfully generate PDF/A the required
2551+ 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
2552+ 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
2553+ have to be standard conforming. The ICC profiles and output intent
2648− variables `pdfaiccprofile` and `pdfaintent`. See also [ConTeXt
2554+ may be specified using the variables `pdfaiccprofile` and `pdfaintent`.
2649− PDFA] for more details.
2555+ See also [ConTeXt PDFA] for more details.
2651`pdfaiccprofile`
2557`pdfaiccprofile`
2652: when used in conjunction with `pdfa`, specifies the ICC profile to use
2558: when used in conjunction with `pdfa`, specifies the ICC profile to use
@@ -2661,12 +2567,10 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
2661 If left unspecified, `sRGB IEC61966-2.1` is used as default.
2567 If left unspecified, `sRGB IEC61966-2.1` is used as default.
2664−: include table of contents (can also be set using
2570+: include table of contents (can also be set using `--toc/--table-of-contents`)
2665− `--toc/--table-of-contents`)
2667`whitespace`
2572`whitespace`
2668−: spacing between paragraphs, e.g. `none`, `small` (using
2573+: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`])
2669− [`setupwhitespace`])
2671`includesource`
2575`includesource`
2672: include all source documents as file attachments in the PDF file
2576: include all source documents as file attachments in the PDF file
@@ -2957,7 +2861,7 @@ their respective sections of [Pandoc's Markdown]:
2957 for the following formats (in addition to `markdown`):
2861 for the following formats (in addition to `markdown`):
2959 input formats
2863 input formats
2960− : `latex`, `textile`, `html` (environments, `\ref`, and
2864+ : `latex`, `org`, `textile`, `html` (environments, `\ref`, and
2961 `\eqref` only), `ipynb`
2865 `\eqref` only), `ipynb`
2963 output formats
2867 output formats
@@ -3069,43 +2973,6 @@ This extension can be enabled/disabled for the following formats:
3069output formats
2973output formats
3070: `odt`, `opendocument`
2974: `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}
2976#### Extension: `styles` #### {#ext-styles}
3111When converting from docx, read all docx styles as divs (for
2978When converting from docx, read all docx styles as divs (for
@@ -3132,15 +2999,8 @@ output format.
3133#### Extension: `citations` {#org-citations}
3000#### Extension: `citations` {#org-citations}
3135−Some aspects of [Pandoc's Markdown citation syntax](#citations)
3002+Some aspects of [Pandoc's Markdown citation syntax](#citations) are also accepted
3136−are also accepted in `org` input.
3003+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` ####
3005#### Extension: `ntb` ####
@@ -3248,8 +3108,7 @@ pandoc does require the space.
3249### Heading identifiers ###
3109### Heading identifiers ###
3251−See also the [`auto_identifiers`
3252−extension](#extension-auto_identifiers) above.
3111+See also the [`auto_identifiers` extension](#extension-auto_identifiers) above.
3254#### Extension: `header_attributes` ####
3113#### Extension: `header_attributes` ####
@@ -3371,12 +3230,11 @@ block in a block quote, you need five spaces after the `>`:
3372#### Extension: `blank_before_blockquote` ####
3231#### Extension: `blank_before_blockquote` ####
3374−Standard Markdown syntax does not require a blank line before a
3233+Standard Markdown syntax does not require a blank line before a block
3375−block quote. Pandoc does require this (except, of course, at
3234+quote. Pandoc does require this (except, of course, at the beginning of the
3376−the beginning of the document). The reason for the requirement
3235+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,
3236+`>` 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
3237+wrapping). So, unless the `markdown_strict` format is used, the following does
3380not produce a nested block quote in pandoc:
3238not produce a nested block quote in pandoc:
3382 > This is a block quote.
3240 > This is a block quote.
@@ -3445,16 +3303,14 @@ this syntax:
3445 qsort (filter (>= x) xs)
3303 qsort (filter (>= x) xs)
3446 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3304 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3448−Here `mycode` is an identifier, `haskell` and `numberLines` are
3306+Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
3449−classes, and `startFrom` is an attribute with value `100`. Some
3307+`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
3308+information to do syntax highlighting. Currently, the only output formats
3452−information are HTML, LaTeX, Docx, Ms, and PowerPoint. If
3309+that uses this information are HTML, LaTeX, Docx, Ms, and PowerPoint. If
3453−highlighting is supported for your output format and language,
3310+highlighting is supported for your output format and language, then the code
3454−then the code block above will appear highlighted, with numbered
3311+block above will appear highlighted, with numbered lines. (To see which
3455−lines. (To see which languages are supported, type `pandoc
3312+languages are supported, type `pandoc --list-highlight-languages`.) Otherwise,
3456−--list-highlight-languages`.) Otherwise, the code block above
3457−will appear as follows:
3313+the code block above will appear as follows:
3459 <pre id="mycode" class="haskell numberLines" startFrom="100">
3315 <pre id="mycode" class="haskell numberLines" startFrom="100">
@@ -3517,9 +3373,6 @@ line must begin with a space.
3517 | 200 Main St.
3373 | 200 Main St.
3518 | Berkeley, CA 94718
3374 | 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].
3376This syntax is borrowed from [reStructuredText].
@@ -3723,12 +3576,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
3576A definition begins with a colon or tilde, which may be indented one
3724or two spaces.
3577or two spaces.
3726−A term may have multiple definitions, and each definition may
3579+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,
3580+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
3581+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
3582+aside from the colon or tilde) should be indented four spaces. However,
3731−other Markdown lists, you can "lazily" omit indentation except
3583+as with other Markdown lists, you can "lazily" omit indentation except
3732at the beginning of a paragraph or other block element:
3584at the beginning of a paragraph or other block element:
@@ -3754,10 +3606,9 @@ definition:
3754Note that space between items in a definition list is required.
3606Note that space between items in a definition list is required.
3755(A variant that loosens this requirement, but disallows "lazy"
3607(A variant that loosens this requirement, but disallows "lazy"
3756hard wrapping, can be activated with `compact_definition_lists`: see
3608hard wrapping, can be activated with `compact_definition_lists`: see
3757−[Non-default extensions], below.)
3609+[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/).
3611+[^3]: I have been influenced by the suggestions of [David Wheeler](https://justatheory.com/2009/02/modest-markdown-proposal/).
3762### Numbered example lists ###
3613### Numbered example lists ###
@@ -4179,12 +4030,10 @@ option is used. All of the metadata will appear in a single block
4179at the beginning of the document.
4030at the beginning of the document.
4181Note that [YAML] escaping rules must be followed. Thus, for example,
4032Note 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
4033+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
4034+(`|`) can be used to begin an indented block that will be interpreted
4186−escaping. This form is necessary when the field contains blank lines
4035+literally, without need for escaping. This form is necessary
4187−or block-level formatting:
4036+when the field contains blank lines or block-level formatting:
4190 title: 'This is the title: it contains a colon'
4039 title: 'This is the title: it contains a colon'
@@ -4198,12 +4047,6 @@ or block-level formatting:
4198 It consists of two paragraphs.
4047 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
4050Template variables will be set automatically from the metadata. Thus, for
4208example, in writing HTML, the variable `abstract` will be set to the HTML
4051example, in writing HTML, the variable `abstract` will be set to the HTML
4209equivalent of the Markdown in the `abstract` field:
4052equivalent of the Markdown in the `abstract` field:
@@ -4250,24 +4093,6 @@ will be interpreted as markdown. For example:
4250 \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
4093 \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
4096## Backslash escapes
4273#### Extension: `all_symbols_escapable` ####
4098#### Extension: `all_symbols_escapable` ####
@@ -4425,8 +4250,7 @@ you need to enclose text in literal `$` characters, backslash-escape
4425them and they won't be treated as math delimiters.
4250them and they won't be treated as math delimiters.
4427For display math, use `$$` delimiters. (In this case, the delimiters
4252For display math, use `$$` delimiters. (In this case, the delimiters
4428−may be separated from the formula by whitespace. However, there can be
4253+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
4255TeX math will be printed in all output formats. How it is rendered
4432depends on the output format:
4256depends on the output format:
@@ -4544,8 +4368,8 @@ into
4545whereas `Markdown.pl` will preserve it as is.
4369whereas `Markdown.pl` will preserve it as is.
4547−There is one exception to this rule: text between `<script>`,
4371+There is one exception to this rule: text between `<script>` and
4548−`<style>`, and `<textarea>` tags is not interpreted as Markdown.
4372+`<style>` tags is not interpreted as Markdown.
4550This departure from standard Markdown should make it easier to mix
4374This departure from standard Markdown should make it easier to mix
4551Markdown with HTML block elements. For example, one can surround
4375Markdown with HTML block elements. For example, one can surround
@@ -4960,68 +4784,37 @@ Inline and regular footnotes may be mixed freely.
4961#### Extension: `citations` ####
4785#### Extension: `citations` ####
4963−To cite a bibliographic item with an identifier foo, use the
4787+Markdown citations go inside square brackets and are separated
4964−syntax `@foo`. Normal citations should be included in square
4788+by semicolons. Each citation must have a key, composed of '@' +
4965−brackets, with semicolons separating distinct items:
4789+the citation identifier from the database, and may optionally
4966−
4790+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 `_`,
4791+begin with a letter, digit, or `_`, and may contain
4986−and contains only alphanumerics and internal punctuation
4792+alphanumerics, `_`, and internal punctuation characters
4987−characters (`:.#$%&-+?<>~/`), it must be surrounded
4793+(`:.#$%&-+?<>~/`). Here are some examples:
4988−by curly braces, which are not considered part of the key.
4794+
4989−In `@Foo_bar.baz.`, the key is `Foo_bar.baz`. The final
4795+ Blah blah [see @doe99, pp. 33-35; also @smith04, chap. 1].
4990−period is not *internal* punctuation, so it is not included in
4796+
4991−the key. In `@{Foo_bar.baz.}`, the key is `Foo_bar.baz.`, including
4797+ Blah blah [@doe99, pp. 33-35, 38-39 and *passim*].
4992−the final period. The curly braces are recommended if you use URLs as
4798+
4993−keys: `[@{https://example.com/bib?name=foobar&date=2000}, p. 33]`.
4799+ 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
4801+`pandoc` detects locator terms in the [CSL locale files].
5007−unabbreviated forms are accepted. In the `en-US` locale, locator
4802+Either abbreviated or unabbreviated forms are accepted. In the `en-US`
5008−terms can be written in either singular or plural forms, as
4803+locale, locator terms can be written in either singular or plural forms,
5009−`book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
4804+as `book`, `bk.`/`bks.`; `chapter`, `chap.`/`chaps.`; `column`,
5010−`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`,
4805+`col.`/`cols.`; `figure`, `fig.`/`figs.`; `folio`, `fol.`/`fols.`;
5011−`fol.`/`fols.`; `number`, `no.`/`nos.`; `line`, `l.`/`ll.`;
4806+`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`,
4807+`op.`/`opp.`; `page`, `p.`/`pp.`; `paragraph`, `para.`/`paras.`; `part`,
5014−`sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`; `verse`,
4808+`pt.`/`pts.`; `section`, `sec.`/`secs.`; `sub verbo`, `s.v.`/`s.vv.`;
5015−`v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
4809+`verse`, `v.`/`vv.`; `volume`, `vol.`/`vols.`; `¶`/`¶¶`; `§`/`§§`. If no
5016locator term is used, "page" is assumed.
4810locator term is used, "page" is assumed.
5018−In complex cases, you can force something to be treated as
4812+`pandoc` will use heuristics to distinguish the locator
5019−a locator by enclosing it in curly braces or prevent parsing
4813+from the suffix. In complex cases, the locator can be enclosed
5020−the suffix as locator by prepending curly braces:
4814+in curly braces:
5022 [@smith{ii, A, D-Z}, with a suffix]
4816 [@smith{ii, A, D-Z}, with a suffix]
5023 [@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
4817 [@smith, {pp. iv, vi-xi, (xv)-(xvii)} with suffix here]
5024− [@smith{}, 99 years later]
5026A minus sign (`-`) before the `@` will suppress mention of
4819A minus sign (`-`) before the `@` will suppress mention of
5027the author in the citation. This can be useful when the
4820the author in the citation. This can be useful when the
@@ -5029,26 +4822,13 @@ author is already mentioned in the text:
5030 Smith says blah [-@smith04].
4823 Smith says blah [-@smith04].
5032−You can also write an author-in-text citation, by omitting the
4825+You can also write an in-text citation, as follows:
5035 @smith04 says blah.
4827 @smith04 says blah.
5037 @smith04 [p. 33] says blah.
4829 @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
4832[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
4833[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
4834[Chicago Manual of Style]: https://chicagomanualofstyle.org
@@ -5057,44 +4837,13 @@ author-in-text style inside notes when using a note style.
5057[finding and editing styles]: https://citationstyles.org/authors/
4837[finding and editing styles]: https://citationstyles.org/authors/
5058[CSL locale files]: https://github.com/citation-style-language/locales
4838[CSL locale files]: https://github.com/citation-style-language/locales
5060−## Non-default extensions
4840+## Non-pandoc extensions
5062The following Markdown syntax extensions are not enabled by default
4842The following Markdown syntax extensions are not enabled by default
5063in pandoc, but may be enabled by adding `+EXTENSION` to the format
4843in pandoc, but may be enabled by adding `+EXTENSION` to the format
5064name, where `EXTENSION` is the name of the extension. Thus, for
4844name, where `EXTENSION` is the name of the extension. Thus, for
5065example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
4845example, `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` ####
4847#### Extension: `attributes` ####
5100Allows attributes to be attached to any inline or block-level
4849Allows attributes to be attached to any inline or block-level
@@ -5281,13 +5030,6 @@ for regular emphasis, add extra blank space around headings.
5282 [Project Gutenberg]: https://www.gutenberg.org
5031 [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
5033## Markdown variants
5293In addition to pandoc's extended Markdown, the following Markdown
5035In addition to pandoc's extended Markdown, the following Markdown
@@ -5402,21 +5144,17 @@ array of YAML-encoded references, for example:
5402 language: en-GB
5144 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
5147Note that `pandoc` can be used to produce such a YAML metadata
5410section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
5148section from a BibTeX, BibLaTeX, or CSL JSON bibliography:
5412− pandoc chem.bib -s -f biblatex -t markdown
5150+ pandoc chem.bib -s -t markdown
5413− pandoc chem.json -s -f csljson -t markdown
5151+ pandoc chem.json -s -t markdown
5415−Indeed, `pandoc` can convert between any of these
5153+`pandoc` can also be used to produce CSL JSON bibliography
5416−citation formats:
5154+from BibTeX, BibLaTeX, or markdown YAML:
5418− pandoc chem.bib -s -f biblatex -t csljson
5156+ pandoc chem.bib -s -t csljson
5419− pandoc chem.yaml -s -f markdown -t biblatex
5157+ pandoc chem.yaml -s -t csljson
5421Running pandoc on a bibliography file with the `--citeproc`
5159Running pandoc on a bibliography file with the `--citeproc`
5422option will create a formatted bibliography in the format
5160option will create a formatted bibliography in the format
@@ -5499,11 +5237,11 @@ The CSL project provides further information on [finding and
5499editing styles].
5237editing styles].
5501The `--citation-abbreviations` option (or the
5239The `--citation-abbreviations` option (or the
5502−`citation-abbreviations` metadata field) may be used to specify
5240+`citation-abbreviations` metadata field) may be used to
5503−a JSON file containing abbreviations of journals that should be
5241+specify a JSON file containing abbreviations of journals
5504−used in formatted bibliographies when `form="short"` is
5242+that should be used in formatted bibliographies when
5505−specified. The format of the file can be illustrated with an
5243+`form="short"` is specified. The format of the file
5506−example:
5244+can be illustrated with an example:
5509 { "default": {
5247 { "default": {
@@ -5515,34 +5253,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
5256## Raw content in a style
5548To include raw content in a prefix, suffix, delimiter, or term,
5258To include raw content in a prefix, suffix, delimiter, or term,
@@ -5621,30 +5331,17 @@ or BibLaTeX (for `--biblatex`) format.
5622A few other metadata fields affect bibliography formatting:
5332A few other metadata fields affect bibliography formatting:
5624−`link-citations`
5334+`link-citation`
5625: If true, citations will be
5335: If true, citations will be
5626 hyperlinked to the corresponding bibliography entries
5336 hyperlinked to the corresponding bibliography entries
5627 (for author-date and numerical styles only).
5337 (for author-date and numerical styles only).
5630: The `lang` field will affect how the style is localized,
5340: The `lang` field will affect how the style is localized,
5631− for example in the translation of labels, the use
5341+ 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
5342+ of quotation marks. (For backwards compatibility,
5343+ `locale` may be used instead of `lang`, but this use
5634− of `lang`, but this use is deprecated.)
5344+ 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`
5346`notes-after-punctuation`
5650: If true (the default), pandoc will put footnote citations
5347: If true (the default), pandoc will put footnote citations
@@ -5656,6 +5353,12 @@ A few other metadata fields affect bibliography formatting:
5656 punctuation.
5353 punctuation.
5659# Slide shows
5362# Slide shows
5661You can use pandoc to produce an HTML + JavaScript slide presentation
5364You can use pandoc to produce an HTML + JavaScript slide presentation
@@ -5704,21 +5407,18 @@ To produce an HTML/JavaScript slide show, simply type
5705where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
5408where `FORMAT` is either `s5`, `slidy`, `slideous`, `dzslides`, or `revealjs`.
5707−For Slidy, Slideous, reveal.js, and S5, the file produced by
5410+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
5411+`-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
5412+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
5413+(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
5414+`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
5415+`slideous-url`, `revealjs-url`, or `s5-url` variables; see [Variables for HTML slides],
5715−DZSlides, the (relatively short) JavaScript and CSS are included
5416+above.) For DZSlides, the (relatively short) JavaScript and CSS are included in
5716−in the file by default.
5417+the file by default.
5718−With all HTML slide formats, the `--self-contained` option can
5419+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
5420+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.
5421+slide show, including linked scripts, stylesheets, images, and videos.
5723To produce a PDF slide show using beamer, type
5423To produce a PDF slide show using beamer, type
@@ -5748,11 +5448,7 @@ rules:
5748 * A heading at the slide level always starts a new slide.
5448 * A heading at the slide level always starts a new slide.
5750 * Headings *below* the slide level in the hierarchy create
5450 * Headings *below* the slide level in the hierarchy create
5751− headings *within* a slide. (In beamer, a "block" will be
5451+ 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
5453 * Headings *above* the slide level in the hierarchy create
5758 "title slides," which just contain the section title
5454 "title slides," which just contain the section title
@@ -6085,15 +5781,6 @@ The following fields are recognized:
6087 ~ A string value.
5783 ~ 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`
5785`cover-image`
6099 ~ A string value (path to cover image).
5786 ~ A string value (path to cover image).
@@ -6330,7 +6017,7 @@ Then edit `my.theme` and use it like this:
6330If you are not satisfied with the built-in highlighting, or you
6017If you are not satisfied with the built-in highlighting, or you
6331want highlight a language that isn't supported, you can use the
6018want highlight a language that isn't supported, you can use the
6332`--syntax-definition` option to load a [KDE-style XML syntax definition
6019`--syntax-definition` option to load a [KDE-style XML syntax definition
6333−file](https://docs.kde.org/stable5/en/kate/katepart/highlight.html).
6020+file](https://docs.kde.org/stable5/en/applications/katepart/highlight.html).
6334Before writing your own, have a look at KDE's [repository of syntax
6021Before writing your own, have a look at KDE's [repository of syntax
6335definitions](https://github.com/KDE/syntax-highlighting/tree/master/data/syntax).
6022definitions](https://github.com/KDE/syntax-highlighting/tree/master/data/syntax).
@@ -6461,21 +6148,6 @@ subdirectory of your user data directory (see [Templates]).
6462[Lua]: https://www.lua.org
6149[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
6151# A note on security
6481If you use pandoc to convert user-contributed content in a web
6153If you use pandoc to convert user-contributed content in a web
@@ -6504,13 +6176,13 @@ application, here are some things to keep in mind:
65044. The HTML generated by pandoc is not guaranteed to be safe.
61764. The HTML generated by pandoc is not guaranteed to be safe.
6505 If `raw_html` is enabled for the Markdown input, users can
6177 If `raw_html` is enabled for the Markdown input, users can
6506 inject arbitrary HTML. Even if `raw_html` is disabled,
6178 inject arbitrary HTML. Even if `raw_html` is disabled,
6507− users can include dangerous content in URLs and attributes.
6179+ users can include dangerous content in attributes for
6180+ headings, spans, and code blocks. To be safe, you should
6508− To be safe, you should run all the generated HTML through
6181+ run all the generated HTML through an HTML sanitizer.
6511# Authors
6183# Authors
6513−Copyright 2006--2021 John MacFarlane (jgm@berkeley.edu). Released
6185+Copyright 2006--2020 John MacFarlane (jgm@berkeley.edu). Released
6514under the [GPL], version 2 or greater. This software carries no
6186under the [GPL], version 2 or greater. This software carries no
6515warranty of any kind. (See COPYRIGHT for full copyright and
6187warranty of any kind. (See COPYRIGHT for full copyright and
6516warranty notices.) For a full list of contributors, see the file
6188warranty notices.) For a full list of contributors, see the file