我如何了解可用于不同的预订输出格式的哪些输出选项键值?
例如,在下面,我向我的预订文档显示了YAML标题。我可以提供word_document2
键值对(reference_docx
,template-v01.docx
(。但是还有哪些其他钥匙可用?我想知道是否有font
密钥,因为我想将默认输出字体从坎布里亚更改为Calibri。
---
title: "A Minimal Book Example Foo"
author: "Yihui Xie"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output:
bookdown::pdf_book:
includes:
in_header: preamble-v01.tex
toc: no
bookdown::word_document2:
reference_docx: template-v01.docx
---
一种快速简便的方法来寻找您使用的特定版本的选项,只是转到您的r控制台并键入 ?bookdown::word_document2
。这对于所有输出格式都是有效的,您应该看到具有所有特定格式选项的内容。这是?rmarkdown::word_document
的输出,该输出用于bookdown::word_document2
:
Convert to an MS Word document
Description:
Format for converting from R Markdown to an MS Word document.
Usage:
word_document(toc = FALSE, toc_depth = 3, fig_width = 5,
fig_height = 4, fig_caption = TRUE, df_print = "default",
smart = TRUE, highlight = "default", reference_docx = "default",
keep_md = FALSE, md_extensions = NULL, pandoc_args = NULL)
(裁剪为相关性,您的版本可能不同(
对于其他任何事情,您可以在此处查看预订书以更好地参考。请注意,在output
对象上未使用的其他值会根据您使用的输出以及模板接受的内容而有所不同,但是通常您可以查阅"簿记书"或" PANDOC参考"以获取更多详细信息(Pandoc Readme(。/p>
对于字体问题,您需要更改参考文档以应用字体(请参阅此(。但是,fontfamily: arev
应适用于PDF/乳胶输出。如果您还输出HTML,则可能需要在CSS文件中自定义,请参阅此信息。