Closed lyndondrake closed 5 years ago
This is the correct behavior. In the pandoc
property only pandoc command-line options such as to
and bibliography
take effect. To set template variables, you either have to use a) the metadata
property or b) the metadata
command-line option.
metadata
propertytemplates:
general:
pandoc:
to: latex
bibliography: /Users/lyndon/Documents/Writing/Workflow/bibliography.bib
pdf-engine: lualatex
metadata:
papersize: a4
mainfont: Skolar PE
mainfontoptions: "Ligatures=TeX, Numbers=OldStyle"
fontsize: 10pt
lang: en-GB
otherlangs: "[grc, he, syr]"
metadata
command line option in the pandoc
propertytemplates:
general:
pandoc:
to: latex
bibliography: /Users/lyndon/Documents/Writing/Workflow/bibliography.bib
metadata:
- "papersize: a4"
- "mainfont: Skolar PE"
- "mainfontoptions: Ligatures=TeX, Numbers=OldStyle"
- "fontsize: 10pt"
- "lang: en-GB"
- "otherlangs: [grc, he, syr]"
pdf-engine: lualatex
Personally I prefer option a because it more clearly separates the pandoc command-line options from the document's metadata.
Does this solve your issue?
Yes, it does solve things. My apologies — I'm guessing this is in the documentation, and actually I really like the separation of command-line and metadata options.
I do understand the confusion: when using pandocomatic you have metadata at the document level, at the pandoc-invocation level, and at the pandocomatic-template level. That's quite an overload of the metadata concept.
Anyway, good to hear the issue has been resolved.
With the following pandocomatic.yaml file, the LaTeX-specific options don't seem to get passed through to pandoc - or at least, they don't appear to have any effect on the tex file produced. If I copy and past the same YAML options into the top of the
.md
file, they take effect: