0

I compile my .Rmd files using

bookdown::render_book("index.Rmd", bookdown::pdf_book())

How do I ensure the intermediate LaTeX file is retained and not cleaned up?

I am aware of Rmarkdown Retain .tex file, but for some reason, editing my YAML files does not keep the LaTeX file.

Stephan Kolassa
  • 7,953
  • 2
  • 28
  • 48

1 Answers1

1

You need to use a parameter keep_tex = TRUE in the pdf_book() command:

bookdown::render_book("index.Rmd", bookdown::pdf_book(keep_tex=TRUE))

After this, there will be a file _main.tex in the _book directory.

Julian
  • 6,586
  • 2
  • 9
  • 33
Stephan Kolassa
  • 7,953
  • 2
  • 28
  • 48