_library/index-include.md.cms
_library/sitemap-include.md.cms
This document provides a quick overview over the various ways to customize pandoc’s output, with links to fuller documentation and some examples.
When the -s
/--standalone
option is used, pandoc will generate a standalone document rather than a fragment. For example, in HTML output this will include the <head>
element; in LaTeX output, it will include the preamble.
Pandoc comes with a default template for (almost) every output format. A template is a plain text file containing variables that are replaced by text generated by pandoc. For example, the variable $body$
will be replaced by the document body, and $title$
by the title from metadata.
To look at the default template for an output format, you can do pandoc -D FORMAT
, where FORMAT
is replaced by the name of the format. For example pandoc -D latex
. You can also use your own template instead, either by using the --template
option or by putting the custom template in your user data directory (on Linux and macOS, ~/.pandoc/templates/
).
[…]