Closed r-cheologist closed 7 years ago
Normally you can use the syntax !expr
to write arbitrary R expressions in YAML under the output
option, e.g.
output:
bookdown::pdf_document2:
includes:
in_header: !expr c('tex_customization/list_customizations.latex', 'tex_customization/toc_customizations.latex', if (!params[['short']]) 'tex_customization/pagenumber_customizations.latex')
but since you used params
, I'm not sure if it still works.
Here is a similar question on StackOverflow: http://stackoverflow.com/q/40801633/559676 and I'd recommend you to ask question on StackOverflow in the future.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Hello,
Currently my yaml header looks as follows:
I would like to amend this such that if
params[['short']] == TRUE
, thetex_customization/pagenumber_customization.latex
fragment is NOT loaded. Any hints on how that could be achieved?Sincerely, Joh