如何在knitr中指定PDF后备字体?

时间:2017-02-02 20:47:18

标签: r pdf knitr

使用R Markdown文件时,有没有办法指定多个mainfont选项,当第一个选项不可用时,允许knitr回退到字体?

当前样本YAML标题:

---
title: "Super Fancy Report"
mainfont: BentonSansRE
output:
  pdf_document:
    latex_engine: xelatex
    fig_caption: yes
    toc: yes
  html_notebook:
    code_folding: hide
    css: html-styles.css
    toc: yes
    toc_depth: 3
    toc_float: yes
---

我想做(非功能性示例):

---
title: "Super Fancy Report"
mainfont:
- BentonSansRE
- Arial Narrow
output:
  pdf_document:
    latex_engine: xelatex
    fig_caption: yes
    toc: yes
  html_notebook:
    code_folding: hide
    css: html-styles.css
    toc: yes
    toc_depth: 3
    toc_float: yes
---

0 个答案:

没有答案