header-includes: metadata and defaults file inconsistencies #10416
Unanswered
periodicpoint
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
I am transpiling form Markdown to PDF via XeLaTeX.
Pandoc version
pandoc 3.1.11.1
Features: +server +lua
Scripting engine: Lua 5.4
OS
Arch Linux
TeXLive: texlive-full Version: 1:2024.20240331-1
Goal
I want to add additional LaTeX packages ad hoc without changing the existing
template.latex
.Confusion
Case 1 (expected to work)
If I include the extra LaTeX package via
header-includes:
in my metadata file and link it from my defaults file, everything works as expected:File: metadata.yaml
Case 2 (expected to not work)
If I include the extra LaTeX package via
header-includes:
in my defaults file it is not working, which is at least somewhat expected (although the docs are not clear in this case):File: defaults.yaml
Case 3 (expected to work)
If I add the extra LaTeX package via
include-in-header:
in my defaults file it is not working, which is totally unexpected.This is unexpected in particular because the docs say:
What the docs say
Doc A
(https://pandoc.org/MANUAL.html#extension-yaml_metadata_block)
Doc B
(https://pandoc.org/MANUAL.html#variables-for-html)
Doc C
(https://pandoc.org/MANUAL.html#layout)
Doc D
(https://pandoc.org/MANUAL.html#general-writer-options-1)
Questions
include-before-body:
. Yet, including extra latex packages via this variable does not work, because there seems to be no such variable in thetemplate.latex
file. (Theheader-includes:
is present in the template file.) Why is this so?(https://pandoc.org/MANUAL.html#variables-set-automatically)
Why then, does the latex template not simply contain the corresponding variables
header-includes
,include-before
andinclude-after
directly instead ofheader-includes
,include-before
andinclude-after
?Potentially related question
#10361
Beta Was this translation helpful? Give feedback.
All reactions