用日文文本标记为pdf

时间:2017-02-13 07:14:46

标签: r pdf r-markdown

我在日文文本的Rmarkdown中有一些关于pdf导出的问题。当输出只是一个jpg文件但在pdf导出时不正常时,图形工作正常。错误消息表明:

! Undefined control sequence.
l.40 \directlua

pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43

YAML就像:

---
title: "`r unique_name`"
author: "月別パフォーマンスレポート / Jan 2017"
date: "xxx@email.com"
paper: a4paper
fontsize: 12pt
linkcolor: blue
geometry: no
graphics: yes
output:
  pdf_document:
    latex_engine: xelatex
    keep_tex: yes
    fig_caption: yes
    toc: false
    dev: cairo_pdf
  beamer_presentation:
    pandoc_args: 
    - --latex-engine
    - xelatex
documentclass: bxjsarticle 
classoption: ja=standard, xelatex 
header-includes:
- \setlength{\headsep}{0.2cm}
- \usepackage{color}
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \usepackage{luatexja}
- \usepackage{xltxtra} 
- \usepackage{zxjatype} 
- \usepackage[ipa]{zxjafont} 
- \usepackage{ctex} 
- \usepackage{CJKutf8} 

工作环境:

sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] readr_1.0.0         formattable_0.2.0.1 pixmap_0.4-11       boot_1.3-18        
 [5] StatMatch_1.2.4     lpSolve_5.6.13      RANN_2.5            survey_3.31-5      
 [9] survival_2.39-4     Matrix_1.2-6        clue_0.3-52         proxy_0.4-16       
[13] xtable_1.8-2        RGraphics_2.0-14    DT_0.2              data.table_1.9.6   
[17] sparkTable_1.2.0    Rglpk_0.6-2         slam_0.1-40         shiny_0.14.2       
[21] Cairo_1.5-9         gtable_0.2.0        cowplot_0.7.0       gridExtra_2.2.1    
[25] dplyr_0.5.0         reshape2_1.4.1      lubridate_1.6.0     scales_0.4.0       
[29] ggalt_0.1.1         ggthemes_3.2.0      ggplot2_2.1.0       rticles_0.2        
[33] rmarkdown_1.2.9000  markdown_0.7.7      knitr_1.14         

loaded via a namespace (and not attached):
 [1] splines_3.3.1      lattice_0.20-33    colorspace_1.2-6   htmltools_0.3.5    yaml_2.1.14       
 [6] chron_2.3-47       DBI_0.5-1          RColorBrewer_1.1-2 plyr_1.8.4         stringr_1.0.0     
[11] munsell_0.4.3      htmlwidgets_0.8    evaluate_0.10      labeling_0.3       httpuv_1.3.3      
[16] Rcpp_0.12.6        KernSmooth_2.23-15 backports_1.0.4    formatR_1.4        mime_0.5          
[21] proj4_1.0-8        digest_0.6.11      stringi_1.1.1      ash_1.0-15         rprojroot_1.1     
[26] tools_3.3.1        magrittr_1.5       maps_3.1.1         lazyeval_0.2.0     tibble_1.2        
[31] cluster_2.0.4      MASS_7.3-45        assertthat_0.1     R6_2.1.2  

有人可以帮忙解决这个问题吗?谢谢!

0 个答案:

没有答案