donk3yzz 你的文件我直接编译顺利通过了。
如果是字体缺少,tinytex 应该会自动安装的。我总怀疑你的 TinyTeX 没装好。能运行一下下面的代码么:
tinytex:::is_tinytex()
tinytex:::tinytex_root()
tinytex::tlmgr_update()
Sys.which('pdflatex')
system2('pdflatex', '--version')
或者看这里:<https://yihui.name/tinytex/r/#debugging>。
附我的系统信息:
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 14393)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 bookdown_0.9 htmltools_0.3.6 tools_3.5.2 yaml_2.2.0 Rcpp_1.0.0 rmarkdown_1.11.7
[8] knitr_1.21 xfun_0.5.1 digest_0.6.18 evaluate_0.13