Knitting to PDF from rmd file

Full on RStudio noob here, trying to figure out how to knit an rmd file. I've tried opening a new rmd file and instantly tried to knit it before adding anything, and I get the following error messages:

! Sorry, but C:\Users\username\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex.exe did not succeed.
! The log file hopefully contains the information to get MiKTeX going again:
! C:\Users\username\AppData\Local\MiKTeX\miktex\log\pdflatex.log
Error: LaTeX failed to compile test2.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See test2.log for more info.
Execution halted

When I first tried it, it told me I didn't have an LaTeX integrater, so I followed a link it provided and downloaded miktex. I have tried to restart RStudio and also followed the tip from the debugging link of trying to update RStudio packages, but hasn't helped so far. Any help is much appreciated!

What is in the log ? Maybe there is a TeX package that is missing for LaTeX rendering.

Instead of MikTeX you could install TinyTeX: 1.2 Install LaTeX (TinyTeX) for PDF reports | R Markdown Cookbook
This is based on TeX Live and is known to work well with rmarkdown

Hope it helps

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.