我有一个.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_files
和tex2pdf.6516
以及2个MD
个文件rep.knit
和rep.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