I am trying to knit a simple markdown file to a pdf using knitr and R Studio. The chunks all run fine and I have no problems knitting to an HTML document, but get the following error when trying to knit to a pdf:
! LaTeX Error: File `knitr.sty' not found.
I have reinstalled tinytex and made sure that the knitr and rmarkdown packages are up to date. I've looked around and while there are similar issue with other *.sty files, I can't find anything relating to this one.
Thanks in advance for any advice
.Rtexdocuments (see stackoverflow.com/questions/67250207/…), but you said you were knitting Markdown. I can't think of a possible reason why this could occur for Markdown documents. Would you please provide a minimal reprex? And @NelsonGon tinytex won't solve the problem becauseknitr.styis not from a LaTeX package from CTAN. - Yihui Xie