在 WIndows 10 Rmarkdown 中获取!未定义的控制序列。l.115 \xdef\@fontenc@load@list{\@fontenc@load@list

在 WIndows 10 Rmarkdown 中获取!未定义的控制序列。l.115 \xdef\@fontenc@load@list{\@fontenc@load@list

尝试使用 knitr 渲染 .rmd 文件时在 R 控制台中出现此错误。

有什么建议么?

This is running on
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Rstudio: Version 1.3.1093

控制台输出是

! Undefined control sequence.
l.115 \xdef\@fontenc@load@list{\@fontenc@load@list

Error: LaTeX failed to compile C:/Users/havukkala/Documents/Titan/Titanreport1b.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Titanreport1b.log for more info.

.rmd 文件的顶部是


title: "my title is here"
author: "Prepared by Ilkka Havukkala, [email protected]"
date: "10/Jan/2021"
output: pdf_document

{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,  
                      warning = FALSE,
                      message = FALSE,
                      results = TRUE)

我的文字从这里开始


日志文件 Titanreport1b.log 在顶部显示:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9.6210 64-bit) (preloaded format=pdflatex 2021.1.11)  18 JAN 2021 20:56
entering extended mode
**C:/Users/havukkala/Documents/Titan/Titanreport1b.tex
(C:/Users/havukkala/Documents/Titan/Titanreport1b.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 75 language(s) loaded.
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\base\article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\base\size10.clo
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\lm\lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts

并在底部有日志文件

\mathdisplay@stack=\toks19
LaTeX Info: Redefining \[ on input line 2923.
LaTeX Info: Redefining \] on input line 2924.
)
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/generic\iftex\ifxetex.sty
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/generic\iftex\iftex.sty
Package: iftex 2020/03/06 v1.0d TeX engine tests
))
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/generic\iftex\ifluatex.st
y
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
) (C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\base\fontenc.sty
Package: fontenc 2020/08/10 v2.0s Standard LaTeX package
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\base\t1enc.def
File: t1enc.def 2020/08/10 v2.0s Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 48.
)
LaTeX Font Info:    Try loading font information for T1+lmr on input line 112.
(C:\Users\havukkala\AppData\Local\Programs\MiKTeX\tex/latex\lm\t1lmr.fd
File: t1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
! Undefined control sequence.
l.115 \xdef\@fontenc@load@list{\@fontenc@load@list
                                                   
Here is how much of TeX's memory you used:
 1448 strings out of 493333
 16743 string characters out of 3139182
 65591 words of memory out of 3000000
 5022 multiletter control sequences out of 15000+200000
 6630 words of font info for 15 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 27i,0n,26p,282b,76s stack positions out of 5000i,500n,10000p,200000b,50000s

!  ==> Fatal error occurred, no output PDF file produced!

相关内容