0

I am trying to compile a pdfbook using R-markdown. After I knit I get the following error:

! LaTeX Error: File `pdfpages.sty' not found.

I loaded tiny text using library(tinytex) to help me install the package pdfpages but continue to have the same error. I resorted to running Rstudio in administrator mode and try the preceding step and running the following tinytex::parse_install(text="! LaTeX Error: File `pdfpages.sty' not found.") (as suggested in Yihui in bookdown). Both resulted in the same error.

Any other suggestion on what is wrong? The package is clearly installed, so I do not know what else can the error be.

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. Does it happen with all markdown documents? – MrFlick Jun 27 '20 at 23:45

1 Answers1

2

Generally when you get an error like pdfpages.sty not found, you need to install the package. From the command line (assuming the Tex bin is in your path) use "tlmgr install pdfpages". Yihui Xie called it "TinyTex" because it was a minimal install compared to something like MacTeX or TexLive.

jrminter
  • 318
  • 2
  • 7