简体   繁体   中英

Bookdown package for R, retain LaTeX file in render_book(..., pdf_book())

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM