R Markdown not Compiling to pdf even after tinytex installation

105 Views Asked by At

I've recently gotten a new laptop and am trying to compile an RMarkdown file to pdf and it's giving the following error:

tlmgr.pl: Remote database (revision 69830 of the texlive-scripts package) seems to be older than the local installation (rev 69850 of texlive-scripts); please use a different mirror and/or wait a day or two.

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

! Emergency stop. <read *>

Error: LaTeX failed to compile coursework1.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See coursework1.log for more info. Execution halted

No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/

If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()

Otherwise consider MiKTeX on Windows - http://miktex.org

MacTeX on macOS - https://tug.org/mactex/ (NOTE: Download with Safari rather than Chrome strongly recommended)

Linux: Use system package manager

I've installed tinytex as instructed both in online tutorials and in the error message itself, and it seem to install correctly but the error message comes up just the same each time, and when I check for pdflatex I get the following output:

Sys.which('pdflatex') pdflatex ""

I've been able to compile it to a html document, so the markdown file itself seems okay, it just doesn't like knitting to a pdf. I'm using Windows, and the most up-to-date version of R and RStudio, does anyone have any ideas of what the issue may be and how to resolve it? Thanks!

0

There are 0 best solutions below