用TinyTex运行Rstudio示例的中文模板时,出现字体缺失的报错,该怎么安装呢?
报错信息如下:
! Package fontspec Error: The font "KaiTi" cannot be found.
! kpathsea:make_tex: Invalid filename `KaiTi/OT:script=hani;language=dflt;', contains ':'
! kpathsea:make_tex: Invalid filename `KaiTi/B/OT:script=hani;language=dflt;', contains ':'
! kpathsea:make_tex: Invalid filename `KaiTi/OT:script=hani;language=dflt;', contains ':'
错误: LaTeX failed to compile Chinese.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Chinese.log for more info.
停止执行
我的系统信息如下:
sessionInfo()
#> R version 4.0.2 (2020-06-22)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 14393)
#>
#> 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.1 magrittr_1.5 tools_4.0.1 htmltools_0.5.0
#> [5] yaml_2.2.1 stringi_1.4.6 rmarkdown_2.2 highr_0.8
#> [9] knitr_1.28 stringr_1.4.0 xfun_0.14 digest_0.6.25
#> [13] rlang_0.4.6 evaluate_0.14
<sup>Created on 2020-09-18 by the reprex package (v0.3.0)</sup>