is there a way to directly pass latex code to before_body in an rmarkdown YAML header?

Viewed 184

For example, Is there a way to pass \newpage to the before_body: YAML tag, without having to use and pass a separate .tex file?

i.e. something like this:

output:
  bookdown::pdf_document2:
    toc: yes
    includes:
      before_body: "\newpage"

instead of this:

output:
  bookdown::pdf_document2:
    toc: yes
    includes:
      before_body: before_body.tex

where before_body.tex contains \newpage

Thanks !

0 Answers
Related