In R, when compiling a markdown document using rmarkdown::render(...)
, how can I retain the intermediate .tex
file that is produced from knitting.
I have tried setting the clean=FALSE
argument, but this retains the figures, not the final tex file or auxiliary files, which I need to inspect for debugging purposes.
Rmd extension. You can save your file by clicking File > Save in the RStudio toolbar.
RMarkdown is an extension to markdown which includes the ability to embed code chunks and several other extensions useful for writing technical reports. The rmarkdown package extends the knitr package to, in one step, allow conversion between an RMarkdown file (.Rmd) into PDF, HTML, word document, amongst others.
No Knit HTML button This means that RStudio doesn't understand your document is supposed to be an RMarkdown document, often because your file extension is . txt . To fix this, go to the Files tab (lower right corner, same pane as Plots and Help) and select the checkbox next to your document's name.
You can specify it in your YML header with:
output:
pdf_document:
keep_tex: true
---
More options on the rmarkdown site.
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