git.iko.soy/typeable/pandoc
on master help sign in
customizing-templates.md: variable options table
commit0466c0a8b02b7d7cf0e9e9ba530e1250e24881ff authorMauro Bieg <mb21@users.noreply.github.com> dateSat 17 Nov 2018, 14:23 (8 years ago) parentd532eb1
1 file changed+21−2
doc/customizing-pandoc.md+21−2
doc/customizing-pandoc.md+21−2
@@ -39,8 +39,27 @@ or by putting the custom template in your user data directory
3939(on linux and macOS, `~/.pandoc/templates/`).
4040
4141Note that in many cases you can avoid the need for a custom
42−template by making use of the `--include-in-header`,
43−`--include-before-body`, and `--include-after-body` options.
42+template by including a file with the `--include-in-header`,
43+`--include-before-body`, or `--include-after-body` option.
44+Or you can set the corresponding template variable directly.
45+
46+### Template variables
47+
48+There are several ways to set template variables:
49+
50+| | [`--variable`] | [`--metadata`] | [YAML metadata] and [`--metadata-file`] |
51+|:---------------|:------------------|:------------------|:----------------------------|
52+| values can be… | strings and bools | strings and bools | also YAML objects and lists |
53+| strings are… | inserted verbatim | escaped | interpreted as markdown |
54+| accessible by filters: | no | yes | yes |
55+
56+
57+[`--variable`]: http://pandoc.org/MANUAL.html#option--variable
58+[`--metadata`]: http://pandoc.org/MANUAL.html#option--metadata
59+[YAML metadata]: http://pandoc.org/MANUAL.html#extension-yaml_metadata_block
60+[`--metadata-file`]: http://pandoc.org/MANUAL.html#option--metadata-file
61+
62+
4463
4564For more information, see [Templates](/MANUAL.html#templates) in
4665the pandoc manual.