knit to PDF not working R V4.0.0 RStudio V1.2.5042

Updated to R 4V.0.0 for summer term instructional purposes. Followed all guidance RE installation to use RMD for knitting to HTML, WORD, PDF, as I have done for previous course iterations and version of R and RStudio. But while HTML & WORD knit, PDF will not. Error returned is below. NOTE my 3.5.X and 3.6.X all still work, and I implemented the same installation process for 4.0.0. Unlike other versions, install of tinytex etc does not place a luatex.dll in .\TinyTeX\bin\win32 directories. Curiously, luatex.dll is found in my older 3.5.X and 3.6. Similarly, pdflatex.fmt mising in install from 4.0.0. is current for R4.0.0, with path added per website. In all cases followed advice from Yihui Xie et al. websites.
Have tried several re-installs, including a full install of MikTeX. No joy.
output file: test1.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
I can't find the format file `pdflatex.fmt'!
Running the command C:\Users\tce\AppData\Roaming\TinyTeX\bin\win32\fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:\Users\tce\AppData\Roaming\TinyTeX\bin\win32\mktexfmt
I was unable to find any missing LaTeX packages from the error log test1.log.
! Running the command C:\Users\tce\AppData\Roaming\TinyTeX\bin\win32\fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:\Users\tce\AppData\Roaming\TinyTeX\bin\win32\mktexfmt

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

1 Like

ran into same problem. When knitting I get the same popup when installing (the one which one is told to ignore) regarding luatex.dll. Have not found a solution yet

I'm having the same problem. Everything was fine until I had to format Windows. I've tried literally everything, I even downloaded luatex.dll and placed it in C:\Users\Breno\AppData\Roaming\TinyTeX\bin\win32. After that, the error message box asked for lua53.dll, which I also provided, but it didn't work.

  1. tinytex:::is_tinytex() returns TRUE.
  2. I'm using options(tinytex.verbose = TRUE)
  3. everything is up to date
  4. I've tried debug mode
  5. list.files(tinytex:::win_app_dir('TinyTeX', 'bin', 'win32')) returns
    [1] "afm2tfm.exe" "bibtex.exe" "dvilualatex.exe"
    [4] "dvipdfm.exe" "dvipdfmx.dll" "dvipdfmx.exe"
    [7] "dvips.exe" "ebb.exe" "eps2eps.exe"
    [10] "etex.exe" "extractbb.exe" "fc-cache.exe"
    [13] "fc-cat.exe" "fc-list.exe" "fc-match.exe"
    [16] "fc-pattern.exe" "fc-query.exe" "fc-scan.exe"
    [19] "fc-validate.exe" "fmtutil-sys.exe" "fmtutil-user.exe"
    [22] "fmtutil.exe" "gftodvi.exe" "gftopk.exe"
    [25] "gftype.exe" "gsftopk.exe" "icudt65.dll"
    [28] "inimf.exe" "initex.exe" "kpathsea632.dll"
    [31] "kpseaccess.exe" "kpsereadlink.exe" "kpsestat.exe"
    [34] "kpsewhich.exe" "latex.exe" "latexmk.exe"
    [37] "lualatex.exe" "luaotfload-tool.exe" "makeindex.exe"
    [40] "mf-nowin.exe" "mf.exe" "mft.exe"
    [43] "mktexfmt.exe" "mktexlsr.exe" "mktexmf.exe"
    [46] "mktexpk.exe" "mktextfm.exe" "mktexupd.exe"
    [49] "msvcp140.dll" "msvcr100.dll" "pdf2dsc.exe"
    [52] "pdfetex.exe" "pdflatex.exe" "pdfopt.exe"
    [55] "pdftex.dll" "pdftex.exe" "pktogf.exe"
    [58] "pktype.exe" "ps2ascii.exe" "ps2pdf.exe"
    [61] "ps2pdf12.exe" "ps2pdf13.exe" "ps2pdf14.exe"
    [64] "ps2ps.exe" "ps2ps2.exe" "psv.exe"
    [67] "rungs.exe" "runscript.dll" "runscript.exe"
    [70] "runscript.tlu" "teckit_compile.exe" "tex.dll"
    [73] "tex.exe" "texhash.exe" "tlmgr.bat"
    [76] "updmap-sys.exe" "updmap-user.exe" "updmap.exe"
    [79] "wrunscript.exe" "xdvipdfmx.exe" "xelatex.exe"
    [82] "xetex.dll" "xetex.exe"

Error code:
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS qca.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output qca.tex --self-contained --template "C:\Users\Breno\GOOGLE~1\ACADMI~1\PESQUI~1\SVM-LA~1.TXT" --highlight-style tango --pdf-engine pdflatex --biblatex --lua-filter "C:/Users/Breno/Documents/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/Breno/Documents/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua" --include-in-header "C:\Users\Breno\AppData\Local\Temp\RtmpQzcOtT\rmarkdown-stre9063f44ec.html" --include-in-header "C:\Users\Breno\AppData\Local\Temp\RtmpQzcOtT\rmarkdown-stre901db14656.html"
output file: qca.knit.md

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
I can't find the format file `pdflatex.fmt'!
Running the command C:\Users\Breno\AppData\Roaming\TinyTeX\bin\win32\fmtutil-user.exe

kpathsea: Running mktexfmt pdflatex.fmt

The command name is C:\Users\Breno\AppData\Roaming\TinyTeX\bin\win32\mktexfmt
I was unable to find any missing LaTeX packages from the error log qca.log.
! Running the command C:\Users\Breno\AppData\Roaming\TinyTeX\bin\win32\fmtutil-user.exe

! kpathsea: Running mktexfmt pdflatex.fmt

! The command name is C:\Users\Breno\AppData\Roaming\TinyTeX\bin\win32\mktexfmt

Error: LaTeX failed to compile qca.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See qca.log for more info.
Execution halted

Thanks in advance!

I'm also encountering the same problem and have run all the debugging tips to no avail.

Exact same issue here too. As colonus said: "When knitting I get the same popup when installing (the one which one is told to ignore) regarding luatex.dll". Tried multiple reinstalls. Please let us know if someone figures out the issue!!!

Sidenote: the .tex file gets generated. Just not the PDF.

I also tried these steps:
-Uninstall R 4.0
-Uninstall RStudio 1.2.5042

Installed older versions:
-R 3.6.2
-RStudio 1.1.463

Also rolled back some packages
-rmarkdown 2.0 and 1.8
-tinytex 1.7

I'm still encountering the error even on a very basic test document.

All. Glad to see I'm not the only one. I found an older R V3.5.3 TTEX V0.15 still working. Ignoring api-* 's, below are NOT found btwn the TTEX V0.22 and TTEX V0.15


Code was simple to compare:

length(ttex.v353) # number tinytex files; working version R3.5.3 TTEX V0.15
length(ttex.v400) # number tinytex files; not working R4.0.0 TTEX V0.22
length(unique(ttex.v353[!ttex.v353 %in% ttex.v400])) # number of files not common
unique(ttex.v353[!ttex.v353 %in% ttex.v400]) # files not common

FYI, I did a complete reinstall on a clean CPU to exclude possibility of hanging registries. Truly puzzled here. Thx

Oops. My bad on posting. File diffs refers to:
C:\Users\tce\AppData\Roaming\TinyTeX\bin\win32
W10 CPU
NOT R library tinytex

TeX Live was broken from yesterday. The TeX Live developers are working on it. You may follow the issue https://github.com/yihui/tinytex/issues/210 for updates. Sorry for the trouble!

1 Like

Thank you so much Yihui! There's a group of us going crazy thinking we were collectively doing something wrong following your installation instructions. Will follow the post to keep track when TeX Live is live again.

1 Like

I see. Thank you so much!

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