添加pdf报告的字体功能后,Rmarkdown没有响应

时间:2017-06-02 05:41:37

标签: r r-markdown

我有一个.Rmd文件,使用以下起始代码生成PDF格式的报告:

---
title: "Report1"
author: "AK88"
date: "May 31, 2017"
output: pdf_document
---

现在我尝试使用以下内容将默认字体更改为verdana

---
title: "Report1"
author: "AK88"
date: "May 31, 2017"
output: 
  pdf_document:
    latex_engine: xelatex
mainfont: verdana
---

没有进行任何其他更改。 RStudio运行到output file: rep.knit.md并且一直在思考。检查完文件夹后,我发现我有2个新文件夹rep_filestex2pdf.6516以及2个MD个文件rep.knitrep.utf8

任何解决方案?

等待约20分钟后:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
! 
! The font "verdana" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.16     \setmainfont[]{verdana}

pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS rep.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output rep.pdf --template "C:\Users\AK88\Documents\R\R-3.3.3\library\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --variable graphics=yes --variable "geometry:margin=1in"' had status 43 
Execution halted

0 个答案:

没有答案