Replies: 2 comments
-
Is that suggested by something in the documentation? Here is a way to think of defaults files. They specify default values for things that can be specified by options on the command line, and they behave as if you had put these things on the command line. Since a You can probably achieve your purpose by putting these things in a YAML metadata file that you call with You could even put
in your defaults file. |
Beta Was this translation helpful? Give feedback.
-
There is a valid workflow argument to have a default set of options yet a way to override it using the document itself, without other dependencies / files. Having a priority key or something would allow us to assign what should take precedence, so lets say: ---
title: Test
author: Jane Doe
priority: document
metadata:
mainfont: Libertinus Serif
---
Test. ..could allow the document to override the defaults or command-line settings?. This is especially useful for those of us that use automation; we mostly want our defaults defined in our scripts that run pandoc in the background, but occasionally need to change something for a specific document[1]. The easiest way would be to use the document itself for this... [1] this is one reason why I stick to pandocomatic rather than use defaults files, as you can use a default template but still override settings using the document itself: https://heerdebeer.org/Software/markdown/pandocomatic/#customizing-an-external-template-in-an-internal-template -- very flexible! |
Beta Was this translation helpful? Give feedback.
-
In a defaults file
$PANDOC_DATA_DIR/defaults/lualatex.yaml
I haveIn the metadata block of my Markdown file I have:
The generated LaTeX has Noto Serif as mainfont which is
not what I expect, as I thought that the metadata in
the Markdown file should have higher priority.
I can work around this by creating a file
charis.yaml
containing justand using the commandline
but should it really be necessary?
pandoc 3.6.4
Beta Was this translation helpful? Give feedback.
All reactions