我正在尝试编写一本书,共有 9 章。我为此使用了 bookdown::bookdown_site 包,我已将其包含在 index.Rmd 的 YAML 标头中。但是当我使用 bookdown::tufte_book2 编织这本书时,pdf 文件会在块内生成具有不同字体颜色的文本。
当我尝试使用“tufte_handout”单独运行每一章时,结果符合预期。正文和内部块文本是单色和 TimesNewRoman。在 rStudio 中,在构建本书之前,我尝试在 Sweave/Program 默认中同时使用 Latex 引擎“xeLaTex”和“pdfLaTex”
index.Rmd 中的 YAML 标头
---
title: "Operations Research Using R<br />"
author: "Timothy R. Anderson"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
monofont: Times New Roman
highlight: monochrome
documentclass: book
bibliography: ["Master4Bookdowns.bib"]
---
每个单独的 ChapterX.Rmd 文件中的 YAML 标头:
---
title: 'Chapter 3: More LP Models'
header-includes:
- \usepackage{longtable}
- \usepackage{caption}
monofont: Times New Roman
output:
tufte::tufte_handout:
citation_package: natbib
latex_engine: xelatex
toc: TRUE
number_sections: true
highlight: monochrome
tufte::tufte_html: default
tufte::tufte_book:
citation_package: natbib
latex_engine: xelatex
highlight: monochrome
---
我希望所有文档都具有相同的字体类型和单色。