I am unable to knit a pdf in RStudio. I have had no issues previously, though did recently update my Xcode installation. I am working on a Mac OS Catalina 10.15.6.
The problem seems to be related to my l3backend installation, as I get the error copied below. However, I have checked multiple ways and I certainly do have l3backend installed.
Here's the error:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global '/l3backend-pdfmode.def'
! LaTeX Error: File `l3backend-pdfmode.def' not found.
! Emergency stop.
<read *>
Error: LaTeX failed to compile handOut_fgkTests.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See handOut_fgkTests.log for more info.
In addition: Warning message:
In parse_packages(logfile, quiet = !verbose) :
Failed to find a package that contains l3backend-pdfmode.def
Execution halted
When I run:
tlmgr search --file --global '/l3backend-pdfmode.def'
I get:
tlmgr: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (verified)
Running the Tex Live Utility also confirms l3backend is installed. I am at a total loss as to what is suddenly causing this error.
l3backendup-to-date? There was a file name change recently and perhaps you don't have that – Joseph Wright Sep 23 '20 at 15:08l3backendinstall is up-to-date. I used Tex Live to reinstall this morning. – MC Fitzpatrick Sep 23 '20 at 15:11kpsewhich l3backend-pdfmode.defandkpsewhich l3backend-pdftex.defreport? – Joseph Wright Sep 23 '20 at 15:20kpsewhich l3backend-pdfmode.defreturns nothing.kpsewhich l3backend-pdftex.defreturns:/usr/local/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def– MC Fitzpatrick Sep 23 '20 at 15:24tlmgr search --file --global '/l3backend-pdfmode.def'to appear in the latex log that you show in the first code block above? – David Carlisle Sep 23 '20 at 15:36knitin RStudio and this text precedes the error:/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc +RTS -K512m -RTS handOut_fgkTests.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output handOut_fgkTests.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/latex-div.lua– MC Fitzpatrick Sep 23 '20 at 15:42pdflatex \\stopit should be$ pdflatex \\stop This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode LaTeX2e <2020-02-02> patch level 5 L3 programming layer <2020-09-06> No pages of output. Transcript written on texput.log.– David Carlisle Sep 23 '20 at 15:48L3 programming layer <2020-03-06>– MC Fitzpatrick Sep 23 '20 at 15:50fmtutil-sys --allto rebuild them – David Carlisle Sep 23 '20 at 15:51kpsewhich -engine=pdftex pdflatex.fmt– David Carlisle Sep 23 '20 at 15:54L3 programming layer <2020-09-06>, but still an error when I knit:! LaTeX Error: \caption outside float.Runningkpsewhich -engine=pdftex pdflatex.fmtreturns:usr/local/texlive/2020/texmf-var/web2c/pdftex/pdflatex.fmt– MC Fitzpatrick Sep 23 '20 at 15:59