我正在做一个 Bookdown 项目,并想使用 Tufte 格式。
我下载了Bookdown 演示和tufte包。然后,我只是将 YAML 更改index.Rmd
为:
---
title: "A Minimal Book Example"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output:
bookdown::tufte_html_book:
toc: yes
css: toc.css
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
github-repo: rstudio/bookdown-demo
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
---
唯一的变化在于output:
选项中,这是由Bookdown 书指定的
然后尝试了 Knit 按钮和bookdown::render_book()
. 演示构建成功。
但是,它没有产生 Tufte 格式。相反,我得到默认格式,带有白色背景、非斜体部分标题和脚注而不是边注(我在第二次运行时在文档中添加了脚注以使其可见):
我还在“bookdown”/“toc”等内容之前尝试了不同的间距,tufte::tufte_html: default
而不是任何“bookdown”/“toc”内容。
我需要做什么才能让 Bookdown 识别 Tufte 格式请求?我觉得我错过了一些非常简单的东西。