新人首次发帖求助,今天用 R Markdown 写 beamer 幻灯片的时候 tinytex 报错了,把前几天成功编译的文档拿出来跑也有问题,执行了谢大主页里修复 bug 的基本操作后也没解决,所以跑来向各位求助。
报错内容
processing file: Mathematical_Statistics_1.Rmd
|.............. | 20%
inline R code fragments
|............................ | 40%
label: setup (with options)
List of 1
$ include: logi FALSE
|.......................................... | 60%
ordinary text without R code
|........................................................ | 80%
label: unnamed-chunk-1 (with options)
List of 1
$ include: logi FALSE
|......................................................................| 100%
ordinary text without R code
output file: Mathematical_Statistics_1.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS Mathematical_Statistics_1.knit.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output Mathematical_Statistics_1.tex --lua-filter "C:\Users\zhaoh\Documents\R\win-library\4.0\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\zhaoh\Documents\R\win-library\4.0\rmarkdown\rmarkdown\lua\latex-div.lua" --slide-level 2 --variable theme=CambridgeUS --variable colortheme=beaver --highlight-style tango --pdf-engine xelatex --self-contained
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global "/expl3.sty"
Trying to automatically install missing LaTeX packages...
tlmgr update --all --self
tlmgr install l3kernel
tlmgr.pl: package repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet (verified)
tlmgr.pl install: package already present: l3kernel
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2021/W32TeX) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
tlmgr search --file --global "/expl3.sty"
! LaTeX3 Error: Mismatched LaTeX support files detected.
(LaTeX3) Loading 'expl3.sty' aborted!
(LaTeX3)
(LaTeX3) The L3 programming layer in the LaTeX format
(LaTeX3) is dated 2021-05-11, but in your TeX tree the files require
(LaTeX3) at least 2021-05-27.
错误: LaTeX failed to compile Mathematical_Statistics_1.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Mathematical_Statistics_1.log for more info.
停止执行
我的 R Markdown 源码
简化后的文档代码如下(仍然不确定是否为最小可重复单元):
---
title: "rmarkdown"
author: "zhj"
date: "`r Sys.Date()`"
output:
beamer_presentation:
latex_engine: xelatex
theme: CambridgeUS
colortheme: beaver
slide_level: 2
fontsize: 10pt
header-includes:
- \usepackage{ctex}
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(tinytex)
```
```{r, include=FALSE}
options(tinytex.verbose = TRUE)
```
# 前言
## 前言
### 自我介绍
- Rmd使用者
- 今天又报错了
我的系统环境
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.5 htmltools_0.5.1.1 tools_4.0.5 yaml_2.2.1
[5] rmarkdown_2.8 knitr_1.33 xfun_0.22 digest_0.6.27
[9] rlang_0.4.10 evaluate_0.14
devtools::session_info("tinytex")
- Session info --------------------------------------------------------------------
setting value
version R version 4.0.5 (2021-03-31)
os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate Chinese (Simplified)_China.936
ctype Chinese (Simplified)_China.936
tz Asia/Taipei
date 2021-05-28
- Packages ------------------------------------------------------------------------
package * version date lib source
tinytex 0.31 2021-03-30 [1] CRAN (R 4.0.5)
xfun 0.22 2021-03-11 [1] CRAN (R 4.0.5)
[1] C:/Users/zhaoh/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.5/library