Recently (within the last week) some .Rmd files that used to compile some Beamer slides starting failing to knit to pdf using TinyTex in RStudio. I was able to narrow the problem down to trying, and failing, to run the following in a .Rmd file:
---
title: "Habits"
author: John Doe
date: March 22, 2005
output:
#bookdown::html_document2:
#bookdown::pdf_document2:
bookdown::beamer_presentation2:
keep_tex: true
---
```{r setup, include=FALSE}
options(tinytex.verbose = TRUE)
```
# In the morning
\begin{equation}
1=1
(\#eq:binom)
\end{equation}
Look at \@ref(eq:binom).
The error I get changes depending on what I comment out, but for the version above the Render tab looks like this:
|......................................... | 67% [setup]
processing file: beamer-frame-test.Rmd
/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/pandoc +RTS -K512m -RTS beamer-frame-test.knit.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output beamer-frame-test.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --table-of-contents --number-sections --highlight-style tango --pdf-engine pdflatex --embed-resources --standalone --wrap preserve --variable tables=yes --standalone -Mhas-frontmatter=false
output file: beamer-frame-test.knit.md
This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global '/l3backend-pdftex.def'
Trying to automatically install missing LaTeX packages...
tlmgr install l3backend l3backend-dev
tlmgr: package repository https://za.mirrors.cicku.me/ctan/systems/texlive/tlnet (verified)
tlmgr install: package already present: l3backend
tlmgr install: package already present: l3backend-dev
This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global '/l3backend-pdftex.def'
! Undefined control sequence.
<recently read> \ltx@label
Error: LaTeX failed to compile beamer-frame-test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See beamer-frame-test.log for more info.
Execution halted
And the log file looks like this (partially edited for brevity):
This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025) (preloaded format=pdflatex 2025.8.10) 11 AUG 2025 21:02
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**beamer-frame-test.tex
(./beamer-frame-test.tex
LaTeX2e <2025-06-01> patch level 1
L3 programming layer <2025-07-20>
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamer.cls
Document Class: beamer 2025/08/04 v3.75 A class for typesetting presentations
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasemodes.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2025/02/11 v2.5l e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count275
)
Package: xcolor 2024/09/29 v3.02 LaTeX color extensions (UK)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package xcolor Info: Driver file: pdftex.def on input line 274.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/graphics/mathcolor.ltx)
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1372.
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
Package: xxcolor 2003/10/24 ver 0.1
\XC@nummixins=\count320
\XC@countmixins=\count321
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/base/atbegshi-ltx.sty
Package: atbegshi-ltx 2021/01/10 v1.0c Emulation of the original atbegshi
package with kernel methods
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hyperref/hyperref.sty
Package: hyperref 2025-07-12 v7.01o Hypertext links for LaTeX
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
Package: kvsetkeys 2022-10-05 v1.19 Key value parser (HO)
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/pdfescape/pdfescape.sty
Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2023-12-04 v1.26 LaTeX kernel commands for general use (HO)
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hycolor/hycolor.sty
Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2025-06-21 v2.57 Cross-referencing by name of section
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/refcount/refcount.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/kvoptions/kvoptions.sty
Package: kvoptions 2022-06-15 v3.15 Key value format for package options (HO)
))
\c@section@level=\count322
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/stringenc/stringenc.sty
Package: stringenc 2019/11/29 v1.12 Convert strings between diff. encodings (HO)
)
\@linkdim=\dimen275
\Hy@linkcounter=\count323
\Hy@pagecounter=\count324
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hyperref/pd1enc.def
File: pd1enc.def 2025-07-12 v7.01o Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/intcalc/intcalc.sty
Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO)
)
\Hy@SavedSpaceFactor=\count325
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hyperref/puenc.def
File: puenc.def 2025-07-12 v7.01o Hyperref: PDF Unicode definition (HO)
Now handling font encoding PU ...
... no UTF-8 mapping file for font encoding PU
)
Package hyperref Info: Option `unicode' set `true' on input line 4066.
Package hyperref Info: Option `bookmarks' set `true' on input line 4066.
Package hyperref Info: Option `bookmarksopen' set `true' on input line 4066.
Package hyperref Info: Option `implicit' set `false' on input line 4066.
Package hyperref Info: Hyper figures OFF on input line 4195.
Package hyperref Info: Link nesting OFF on input line 4200.
Package hyperref Info: Hyper index ON on input line 4203.
Package hyperref Info: Plain pages OFF on input line 4210.
Package hyperref Info: Backreferencing OFF on input line 4215.
Package hyperref Info: Implicit mode OFF; no redefinition of LaTeX internals.
Package hyperref Info: Bookmarks ON on input line 4462.
\c@Hy@tempcnt=\count326
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/url/url.sty
\Urlmuskip=\muskip17
Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 4801.
\XeTeXLinkMargin=\dimen276
(/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/bitset/bitset.sty
Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO)
))
\Fld@menulength=\count327
\Field@Width=\dimen277
\Fld@charsize=\dimen278
Package hyperref Info: Hyper figures OFF on input line 6078.
Package hyperref Info: Link nesting OFF on input line 6083.
Package hyperref Info: Hyper index ON on input line 6086.
Package hyperref Info: backreferencing OFF on input line 6093.
Package hyperref Info: Link coloring OFF on input line 6098.
Package hyperref Info: Link coloring with OCG OFF on input line 6103.
Package hyperref Info: PDF/A mode OFF on input line 6108.
\Hy@abspage=\count328
Package hyperref Message: Stopped early.
)
Package hyperref Info: Driver (autodetected): hpdftex.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/hyperref/hpdftex.def
File: hpdftex.def 2025-07-12 v7.01o Hyperref driver for pdfTeX
\Fld@listcount=\count329
\c@bookmark@seq@number=\count330
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
Package: rerunfilecheck 2025-06-21 v1.11 Rerun checks for auxiliary files (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 284.
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaserequires.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasecompatibility.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasefont.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks29
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
))) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetranslator.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator.sty
Package: translator 2021-05-31 v1.12d Easy translation of strings in LaTeX
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasemisc.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetwoscreens.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseoverlay.sty
\beamer@argscount=\count331
\beamer@lastskipcover=\skip52
\beamer@trivlistdepth=\count332
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetitle.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasesection.sty
\c@lecture=\count333
\c@part=\count334
\c@section=\count335
\c@subsection=\count336
\c@subsubsection=\count337
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseframe.sty
\beamer@framebox=\box68
\framewidth=\dimen280
\c@framenumber=\count341
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty
\beamer@verbatimfileout=\write4
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseframesize.sty
\beamer@splitbox=\box71
\beamer@framesubtitletoks=\toks32
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseframecomponents.sty
\beamer@colheight=\skip57
\beamer@footins=\box72
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasecolor.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasenotes.sty
\beamer@frameboxcopy=\box73
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetoc.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetemplates.sty
\beamer@sbttoks=\toks33
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseauxtemplates.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaseboxes.sty
\bmb@box=\box74
\bmb@prevheight=\dimen288
)
\beamer@blockheadheight=\dimen289
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbaselocalstructure.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/tools/enumerate.sty
Package: enumerate 2023/07/04 v3.00 enumerate extensions (DPC)
\@enLab=\toks34
)
\beamer@bibiconwidth=\skip58
\c@figure=\count343
\c@table=\count344
\abovecaptionskip=\skip59
\belowcaptionskip=\skip60
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasenavigation.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasenavigationsymbols.tex)
\beamer@section@min@dim=\dimen290
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasetheorems.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2025/06/16 v2.17y AMS math features
\@mathmargin=\skip61
For additional information on amsmath, use the `?' option.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2024/11/17 v2.01 AMS text
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks35
\ex@=\dimen291
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen292
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\mathdisplay@stack=\toks39
LaTeX Info: Redefining \[ on input line 2949.
LaTeX Info: Redefining \] on input line 2950.
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amscls/amsthm.sty
Package: amsthm 2020/05/29 v2.20.6
\thm@style=\toks40
\thm@bodyfont=\toks41
\thm@headfont=\toks42
\thm@notefont=\toks43
\thm@headpunct=\toks44
\thm@preskip=\skip64
\thm@postskip=\skip65
\thm@headsep=\skip66
\dth@everypar=\toks45
)
\c@theorem=\count357
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerbasethemes.sty)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerthemedefault.sty (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerfontthemedefault.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamercolorthemedefault.sty) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerinnerthemedefault.sty
\beamer@dima=\dimen300
\beamer@dimb=\dimen301
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/beamer/beamerouterthemedefault.sty))) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/pgf/utilities/pgfpages.sty
Package: pgfpages 2011/01/05 ver 0.02
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/tools/calc.sty
Package: calc 2025/03/01 v4.3b Infix arithmetic (KKT,FJ)
\calc@Acount=\count358
\calc@Bskip=\skip68
LaTeX Info: Redefining \setlength on input line 86.
LaTeX Info: Redefining \addtolength on input line 87.
\calc@Ccount=\count360
\calc@Cskip=\skip69
)
\pgf@logicalpages=\count361
\pgfpages@shipoutbox=\box78
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2024/12/21 v2.1c Standard LaTeX package
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2024/02/08 v1.3d Input encoding file
\inpenc@prehook=\toks46
\inpenc@posthook=\toks47
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2024/04/24 v2.1b Standard LaTeX package
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2015/05/01 v1.6.1 Latin Modern Fonts
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/caption/caption.sty
Package: caption 2023/08/05 v3.6o Customizing captions (AR)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/caption/caption3.sty
Package: caption3 2023/07/31 v2.4d caption3 kernel (AR)
\caption@tempdima=\dimen322
\caption@hangindent=\dimen329
Package caption Info: beamer document class detected.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/caption/caption-beamer.sto
File: caption-beamer.sto 2022/01/06 v2.0c Adaption of the caption package to the beamer document classes (AR)
))
\c@caption@flags=\count376
\c@continuedfloat=\count377
Package caption Info: hyperref package is loaded.
Package caption Info: Hyperref support is turned off
(caption) because hyperref has stopped early.
Package caption Info: longtable package is loaded.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/caption/ltcaption.sty
Package: ltcaption 2021/01/08 v1.4c longtable captions (AR)
)) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/bookmark/bookmark.sty
Package: bookmark 2023-12-10 v1.31 PDF bookmarks (HO)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/bookmark/bkm-pdftex.def
File: bkm-pdftex.def 2023-12-10 v1.31 bookmark driver for pdfTeX and luaTeX (HO)
\BKM@id=\count378
))
LaTeX Font Info: Trying to load font information for T1+lmss on input line 103.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/t1lmss.fd
File: t1lmss.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2025-06-09 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count379
) (./beamer-frame-test.aux)
\openout1 = `beamer-frame-test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 103.
LaTeX Font Info: ... okay on input line 103.
LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 103.
LaTeX Font Info: ... okay on input line 103.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: custom
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes: includehead includefoot
* h-part:(L,W,R)=(28.45274pt, 307.28987pt, 28.45274pt)
* v-part:(T,H,B)=(0.0pt, 273.14662pt, 0.0pt)
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 485.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
))
Package hyperref Info: Link coloring OFF on input line 103.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/lmr/m/n --> OT1/cmss/m/n on input line 103.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmss/b/n --> OT1/lmss/b/n on input line 103.
\symnumbers=\mathgroup6
\sympureletters=\mathgroup7
LaTeX Font Info: Overwriting math alphabet `\mathrm' in version `normal'
(Font) OT1/lmss/m/n --> T1/lmr/m/n on input line 103.
LaTeX Font Info: Redeclaring math alphabet \mathbf on input line 103.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) T1/lmtt/m/n --> T1/lmtt/b/n on input line 103.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-basic-dictionary-English.dict
Dictionary: translator-basic-dictionary, Language: English
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-bibliography-dictionary-English.dict
Dictionary: translator-bibliography-dictionary, Language: English
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-environment-dictionary-English.dict
Dictionary: translator-environment-dictionary, Language: English
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-months-dictionary-English.dict
Dictionary: translator-months-dictionary, Language: English
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-numbers-dictionary-English.dict
Dictionary: translator-numbers-dictionary, Language: English
) (/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/translator/translator-theorem-dictionary-English.dict
Dictionary: translator-theorem-dictionary, Language: English
)
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: End \AtBeginDocument code.
No file beamer-frame-test.nav.
[1
{/Users/mark/Library/TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{/Users/mark/Library/TinyTeX/texmf-dist/fonts/enc/dvips/lm/lm-ec.enc}]
No file beamer-frame-test.toc.
[2
]
LaTeX Font Info: Trying to load font information for OT1+lmss on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/ot1lmss.fd
File: ot1lmss.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)
LaTeX Font Info: Trying to load font information for OML+lmm on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/omllmm.fd
File: omllmm.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)
LaTeX Font Info: Trying to load font information for OMS+lmsy on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/omslmsy.fd
File: omslmsy.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)
LaTeX Font Info: Trying to load font information for OMX+lmex on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/lm/omxlmex.fd
File: omxlmex.fd 2015/05/01 v1.6.1 Font defs for Latin Modern
)
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <10.95> on input line 118.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <8> on input line 118.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <6> on input line 118.
LaTeX Font Info: Trying to load font information for U+msa on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 118.
(/Users/mark/Library/TinyTeX/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
LaTeX Font Info: Font shape `T1/lmss/m/it' in size <10.95> not available
(Font) Font shape `T1/lmss/m/sl' tried instead on input line 118.
LaTeX Font Info: Font shape `T1/lmss/m/it' in size <8> not available
(Font) Font shape `T1/lmss/m/sl' tried instead on input line 118.
LaTeX Font Info: Font shape `T1/lmss/m/it' in size <6> not available
(Font) Font shape `T1/lmss/m/sl' tried instead on input line 118.
! Undefined control sequence.
<recently read> \ltx@label
l.118 \end{frame}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Here is how much of TeX's memory you used:
23358 strings out of 469782
448810 string characters out of 5481627
822283 words of memory out of 5000000
51275 multiletter control sequences out of 15000+600000
662079 words of font info for 67 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
101i,11n,107p,420b,450s stack positions out of 10000i,1000n,20000p,200000b,200000s
! ==> Fatal error occurred, no output PDF file produced!
And the result of running tinytex::tlmgr_search('/l3backend-pdftex.def')
is:
tlmgr search --file --global '/l3backend-pdftex.def'
tlmgr: package repository https://za.mirrors.cicku.me/ctan/systems/texlive/tlnet (verified)
l3backend:
texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
l3backend-dev:
texmf-dist/tex/latex-dev/l3backend/l3backend-pdftex.def
The error suggests some unhappiness with the \label
in the equation (or, indeed a \label
anywhere in any environment including tables, figure captions, amsmath environments, etc). If I comment the \label
out, it does compile but obviously without a working equation reference.
Further to this I tried to compile a straight LaTeX approximation of this (I have stripped out a lot of the frontmatter to try to make this as MWE as possible, but perhaps too much?):
\documentclass[
ignorenonframetext,
t]{beamer}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
\begin{frame}
\begin{equation}
1 = 1
\label{eq:binom}
\end{equation}
Look at \eqref{eq:binom}.
\end{frame}
\end{document}
For me, trying to compile this in RStudio (using TinyTex) fails unless I comment out ignorenonframetext
or the \label{...}
command, and it also fails if I try to use the pdflatex command bundled with RStudio on the command line. The fatal error is an undefined control sequence, implicating labels again:
Dictionary: translator-theorem-dictionary, Language: English
) (./beamer-frame-test.nav)
LaTeX Font Info: Trying to load font information for U+msa on input line 14.
(/home/rstudio/.TinyTeX/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 14.
(/home/rstudio/.TinyTeX/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
)
! Undefined control sequence.
<recently read> \ltx@label
l.14 \end{frame}
I (think) this is a red herring though. Indeed, if I comment out the \label
then it compiles but it also compiles if instead I comment out ignorenonframetext,
and then has working label references.
I have tried this on both a Windows 11 machine and MacOS machine and in a Docker rocker container - same problem.
Am I missing some basic syntax error?
Is it possible that all my TinyTex installations are corrupted somehow? I have reinstalled TinyTex (both using tinytex::reinstall_tinytex()
and also by deleting the TinyTex folder and installing from scratch.
I have reinstalled R and updated all my packages. I get the same error if I try to make Beamer slides using Yihui's .Rmd example on cross-referencing.
My xfun::session_info()
on the MacOS machine is:
R version 4.5.1 (2025-06-13)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.6, RStudio 2025.5.0.496
Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
Package version:
base64enc_0.1.3 bslib_0.9.0 cachem_1.1.0 cli_3.6.5
compiler_4.5.1 digest_0.6.37 evaluate_1.0.4 fastmap_1.2.0
fontawesome_0.5.3 fs_1.6.6 glue_1.8.0 graphics_4.5.1
grDevices_4.5.1 highr_0.11 htmltools_0.5.8.1 jquerylib_0.1.4
jsonlite_2.0.0 knitr_1.50 lifecycle_1.0.4 memoise_2.0.1
methods_4.5.1 mime_0.13 R6_2.6.1 rappdirs_0.3.3
rlang_1.1.6 rmarkdown_2.29 rstudioapi_0.17.1 sass_0.4.10
stats_4.5.1 tinytex_0.57 tools_4.5.1 utils_4.5.1
xfun_0.52 yaml_2.3.10
Whilst commenting out ignorenonframetext
"solves" my problem, that piece of code appears in the vanilla pandoc Beamer template, which is used by RStudio. If this were a troublesome line surely thousands of people would have encountered this problem? Equally, I'm sure \label
appears in (hundreds) of thousands of R markdown documents used to generate beamer slides. If I change the document class to article everything works perfectly so it seems to be an issue with Beamer specifically. Also, the same LaTeX code above compiles with no issue on Overleaf, so it is "compilable" but just not by the TinyTex installation on my (two) machines and Docker container.
I have run out of things to try, so would appreciate any suggestions! If someone can confirm that either the .Rmd above or the .tex above compiles in RStudio using TinyTex that would at least narrow the problem down to me (my machines), which is my issue, not everyone else's.
This has been fixed in the beamer development version: https://github.com/josephwright/beamer/commit/0590aca2f8a175904994dc0693ae42aed1feca11
Until a new beamer version is released, Latex users can temporarily add the file https://raw.githubusercontent.com/josephwright/beamer/0590aca2f8a175904994dc0693ae42aed1feca11/base/beamerbaseoverlay.sty to the same folder as their .tex file.