I have the following setup:
- OS: Windows 10 Home, 64-bit, build 19042
- Rstudio 1.4
- MiKTeX 21.1
- R x64 4.03
I am able to create HTML documents, but when I try to knit to PDF I get the following error:
output file: test.knit.md
! Sorry, but C:\Users\user\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\user\AppData\Local\MiKTeX\miktex\log\pdflatex.log
Error: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test.log for more info.
Execution halted
C:\Users\user\AppData\Local\MiKTeX\miktex\log\pdflatex.log:
2021-02-15 18:15:34,402+0100 INFO pdflatex - this process (8276) started by 'Rterm' with command line: C:\Users\user\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode test.tex
2021-02-15 18:15:34,426+0100 INFO pdflatex - allowing known shell commands
2021-02-15 18:15:34,475+0100 INFO pdflatex - going to create file: pdflatex.fmt
2021-02-15 18:15:34,517+0100 INFO pdflatex.core - start process: initexmf --dump-by-name=pdflatex --engine=pdftex
2021-02-15 18:15:40,070+0100 FATAL pdflatex.core - GUI framework cannot be initialized.
2021-02-15 18:15:40,070+0100 FATAL pdflatex.core - Data:
2021-02-15 18:15:40,070+0100 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:126
2021-02-15 18:15:40,070+0100 FATAL pdflatex - GUI framework cannot be initialized.
2021-02-15 18:15:40,070+0100 FATAL pdflatex - Info:
2021-02-15 18:15:40,070+0100 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2021-02-15 18:15:40,070+0100 FATAL pdflatex - Line: 126
2021-02-15 18:15:40,071+0100 INFO pdflatex - this process (8276) finishes with exit code 1