我在用@Cloud2016老师发布在GitHub上的模板时编译没有成功,我是直接打开了rmd文件,用knitr编译出现以下的错误:
|.............................................................. | 89%
label: unnamed-chunk-1
|......................................................................| 100%
ordinary text without R code
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS article4report.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output article4report.tex --self-contained --table-of-contents --toc-depth 4 --number-sections --highlight-style tango --pdf-engine xelatex --natbib --variable graphics --lua-filter "C:/Users/Administrator.SC-201809091908/Documents/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "C:/Users/Administrator.SC-201809091908/Documents/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua" --wrap preserve --top-level-division=section --include-in-header "C:\Users\ADMINI~1.SC-\AppData\Local\Temp\Rtmp6vUHsT\rmarkdown-str2a80507b6d3e.html" --variable tables=yes --standalone -Mhas-frontmatter=false
output file: article4report.knit.md
! Undefined control sequence.
<argument> \__xeCJK_patch_microtype_get_slot:
错误: LaTeX failed to compile article4report.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See article4report.log for more info.
停止执行
我用的模板是[article4report] (https://github.com/XiangyunHuang/R-Markdown-Template/blob/master/article4report.Rmd)
我的系统环境为:
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936 LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C 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.0 bookdown_0.19 htmltools_0.4.0 tools_4.0.0 yaml_2.2.1 Rcpp_1.0.4.6 rmarkdown_2.2 knitr_1.28
[9] xfun_0.14 digest_0.6.25 rlang_0.4.6 evaluate_0.14