[Tex/LaTex] Minimal LaTeX install for knitr to export PDFs from Rmarkdown on Debian-based system

knitrmarkdownrrstudio

I use RStudio and started writing Rmarkdown documents to knit them into HTML pages and PDFs.

I tried installing TexLive but it failed when the astounding number of packages filled my limited remaining storage space (several GB).

I was wondering if anyone knew of a fairly straightforward way to get a minimal LaTeX install that includes the main packages needed to knit PDFs without errors on a Debian-based system?

I currently use Ubuntu 14.04, with RStudio 1.1.383, R 3.4.4, rmarkdown 1.9 and knitr 1.19.

Best Answer

Yes, I made TinyTeX exactly for that purpose: https://yihui.org/tinytex/ It is minimal and should work well for converting R Markdown to PDF by default.

Since you are a Ubuntu user, make sure to read FAQ 7: https://yihui.name/tinytex/faq/