There are several similar questions here, but no answers.
If I compile an Rnw-file in Rstudio using knitr (that is to say: by clicking the “Compile PDF” button, but in Global Options I specified that the program should use knitr rather than sweave) Rstudio manages to produce a .tex file, but not to compile it into pdf. Instead I get the following error:
Error running C:/Users/vincent/AppData/Local/Programs/MiKTeX/miktex/bin/x64/pdflatex.exe (exit code -1073740791)
Rstudio makes it sound like the problem is with MikTex, but if I take the .tex file it produces, open in in Texmaker and compile it there (using ‘Quick Build’) it works fine. So personally I suspect that Rstudio is doing something wrong.
Is there a way to see what Rstudio is trying to do and why it doesn’t work?
(I had to reinstall everything (Tex, Rstudio etc) and since then I have this problem.)
I am using Rstudio 2023.12.1 for (not directly relevant) reasons explained here.