问题描述
在确定tinytex可以工作后(因为可以编译英文rmd),安装了rticles包。但是编译模板CTex Documents 失败,提示
tinytex ! LaTeX Error: File 'ctexart.cls' not found.
之后尝试使用tinytex::tlmgr_install("ctex")
安装,未果。
后按照网上提示,使用options(tinytex.install_packages = TRUE)
允许自动安装缺失的包。开始编译后下载了许多缺失内容。之后开始报错 ! LaTeX Error: Option clash for package fontspec.
使用parse_packages函数并未在log文件中发现缺失的latex包。
System
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
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_3.6.2 htmltools_0.4.0 tools_3.6.2 rticles_0.19 yaml_2.2.1
[6] Rcpp_1.0.3 tinytex_0.31 rmarkdown_2.6 knitr_1.32 digest_0.6.25
[11] xfun_0.22 rlang_0.4.5 evaluate_0.14
报错内容
output file: tw.knit.md
"D:/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS tw.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output tw.tex --self-contained --table-of-contents --toc-depth 2 --number-sections --highlight-style tango --latex-engine xelatex --variable graphics
! LaTeX Error: Option clash for package fontspec.
错误: LaTeX failed to compile tw.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See tw.log for more info.
停止执行