Rmd文件是默认的模板,改动 author 为中文后就报错,报错信息只有三行,如下
pandoc: Error producing PDF
Error: pandoc document conversion failed with error 43
Execution halted
yaml如下
title: "Untitled"
author: "我的名字"
output:
pdf_document:
number_sections: yes
latex_engine: xelatex
toc: yes
CJKmainfont: Source Han Serif SC
R 环境
devtools::session_info('rmarkdown')
Session info -------------------------------------------------------------------------------
setting value
version R version 3.4.1 (2017-06-30)
system x86_64, linux-gnu
ui RStudio (1.1.383)
language (EN)
collate en_US.UTF-8
tz America/New_York
date 2017-10-26
Packages -----------------------------------------------------------------------------------
package * version date source
backports 1.1.1 2017-09-25 CRAN (R 3.4.1)
base64enc 0.1-3 2015-07-28 CRAN (R 3.4.1)
bitops 1.0-6 2013-08-17 CRAN (R 3.4.1)
caTools 1.17.1 2014-09-10 CRAN (R 3.4.1)
digest 0.6.12 2017-01-27 CRAN (R 3.4.1)
evaluate 0.10.1 2017-06-24 CRAN (R 3.4.1)
graphics * 3.4.1 2017-06-30 local
grDevices * 3.4.1 2017-06-30 local
highr 0.6 2016-05-09 CRAN (R 3.4.1)
htmltools 0.3.6 2017-04-28 CRAN (R 3.4.1)
jsonlite 1.5 2017-06-01 CRAN (R 3.4.1)
knitr 1.17 2017-08-10 CRAN (R 3.4.1)
magrittr 1.5 2014-11-22 CRAN (R 3.4.1)
markdown 0.8 2017-04-20 CRAN (R 3.4.1)
methods * 3.4.1 2017-06-30 local
mime 0.5 2016-07-07 CRAN (R 3.4.1)
Rcpp 0.12.13 2017-09-28 CRAN (R 3.4.1)
rmarkdown 1.6 2017-06-15 CRAN (R 3.4.1)
rprojroot 1.2 2017-01-16 CRAN (R 3.4.1)
stats * 3.4.1 2017-06-30 local
stringi 1.1.5 2017-04-07 CRAN (R 3.4.1)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.1)
tools 3.4.1 2017-06-30 local
utils * 3.4.1 2017-06-30 local
yaml 2.1.14 2016-11-12 CRAN (R 3.4.1)
sessioninfo 如下
R version 3.4.1 (2017-06-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 bookdown_0.5 withr_2.0.0 digest_0.6.12 rprojroot_1.2
[6] backports_1.1.1 magrittr_1.5 evaluate_0.10.1 stringi_1.1.5 rstudioapi_0.7
[11] rticles_0.4.1 rmarkdown_1.6 devtools_1.13.3 tools_3.4.1 stringr_1.2.0
[16] yaml_2.1.14 compiler_3.4.1 memoise_1.1.0 htmltools_0.3.6 knitr_1.17
中文字体已经安装
fc-list :lang=zh-cn
/usr/share/fonts/opentype/SourceHanSerifSC-Medium.otf: Source Han Serif SC,思源宋体,Source Han Serif SC Medium,思源宋体 Medium:style=Medium,Regular
/usr/share/fonts/opentype/SourceHanSerifSC-Light.otf: Source Han Serif SC,思源宋体,Source Han Serif SC Light,思源宋体 Light:style=Light,Regular
/usr/share/fonts/opentype/SourceHanSerifSC-Regular.otf: Source Han Serif SC,思源宋体:style=Regular
/usr/share/fonts/opentype/SourceHanSerifSC-ExtraLight.otf: Source Han Serif SC,思源宋体,Source Han Serif SC ExtraLight,思源宋体 ExtraLight:style=ExtraLight,Regular
xelatex 也已经从默认仓库安装
XeTeX 3.1415926-2.5-0.9999.3-2015112013 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 SIL International and Jonathan Kew.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 50.1.2; using 50.1.2
Compiled with zlib version 1.2.7; using 1.2.7
Compiled with FreeType2 version 2.4.11; using 2.4.11
Compiled with Graphite2 version 1.2.2; using 1.3.10
Compiled with HarfBuzz version 0.9.36; using 1.3.2
Compiled with fontconfig version 2.10.95; using 2.10.95
Compiled with libpng version 1.5.13; using 1.5.13
Compiled with poppler version 0.26.5
pandoc也装了,信息如下
pandoc 1.12.3.1
Compiled with texmath 0.6.6, highlighting-kate 0.5.6.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
octave, pascal, perl, php, pike, postscript, prolog, python, r,
relaxngcompact, restructuredtext, rhtml, roff, ruby, rust, scala, scheme,
sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl,
xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/R/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web: http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
CentOS 装在虚拟机里,我也装了 RStudio Server,这是在浏览器里打开的画面
