我在用rmarkdown输出PDF时,系统一直运行但不出结果。
为了解决这个问题,我对如下两个rmd文档进行了测试,但都不行:
title: "这是一个标题"
author: "hi,我是作者"
output:
pdf_document:
includes:
in_header: header.tex
keep_tex: yes
latex_engine: xelatex
word_document: default
html_document: default
为谁风露立中宵。
title: "这是一个标题"
author: "hi,我是作者"
output:
pdf_document:
includes:
in_header: header.tex
keep_tex: yes
latex_engine: xelatex
word_document: default
html_document: default
head.tex 中语句如下:
\usepackage{ctex}
提示信息如下:
processing file: test.Rmd
|.................................................................| 100%
ordinary text without R code
output file: test.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.tex --template "C:\Users\Jiangli\Documents\R\win-library\3.4\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --include-in-header header.tex --variable graphics=yes --variable "geometry:margin=1in"
系统环境如下:
sessionInfo()
#> R version 3.4.4 (2018-03-15)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 17134)
#>
#> 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.4.4 backports_1.1.1 magrittr_1.5 rprojroot_1.2
#> [5] tools_3.4.4 htmltools_0.3.6 yaml_2.1.15 Rcpp_0.12.14
#> [9] stringi_1.1.6 rmarkdown_1.8 knitr_1.20 stringr_1.2.0
#> [13] digest_0.6.18 evaluate_0.10.1
非常感谢!