I get the following latex error when rendering to rmarkdown file to beamer-presentation.
! Undefined control sequence.
l.16 \setbeamertemplate
{caption}[numbered]
My rmarkdownscript looks as following, and the problem occurs when i knit the rmarkdown-file.
---
title: "Habits"
author: "John Doe"
date: "March 22, 2005"
output: beamer_presentation
---
# Goddag
----
I have installed and uninstalled TinyTex with tinytex package several times, and I have no problems making powerpoints or html.
What can cause the problem?
UPDATE(a) 17/01/23: Printed the sessionInfo() of the Markdown-file:
> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 fastmap_1.1.0 cli_3.6.0
[4] htmltools_0.5.4 tools_4.2.2 rstudioapi_0.14
[7] yaml_2.3.6 rmarkdown_2.19 knitr_1.41
[10] xfun_0.36 digest_0.6.31 pacman_0.5.1
[13] rlang_1.0.6 evaluate_0.19
UPDATE(b) 17/01/23: Output of the render-window knitting the .rmd-file from Rstudio.
processing file: oplaeg.Rmd
|....................... | 33%
ordinary text without R code
|............................................... | 67%
label: unnamed-chunk-1
|......................................................................| 100%
ordinary text without R code
/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS oplaeg.knit.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output oplaeg.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.2/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --highlight-style tango --pdf-engine pdflatex --embed-resources --standalone
output file: oplaeg.knit.md
! Undefined control sequence.
l.16 \setbeamertemplate
{caption}[numbered]
Error: LaTeX failed to compile oplaeg.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See oplaeg.log for more info.
Execution halted