- 已编辑
如题,Rmd文本如下
---
title: "测试中文pdf"
author: "中文测试"
date: "2021/6/25"
output:
pdf_document:
latex_engine: xelatex
---
测试
生成的文件里面所有中文都消失了
生成html或者word是没有问题,只有pdf问题。
尝试卸载重装tinytex,问题依然存在
电脑及软件配置如下
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
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.2 rsconnect_0.8.16 htmltools_0.5.1.1
[4] tools_4.0.2 yaml_2.2.1 rmarkdown_2.6
[7] knitr_1.31 xfun_0.24 digest_0.6.27
[10] rlang_0.4.10 evaluate_0.14