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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With