bookdown 文档的可用输出 key-value 选项?
Available output key-value options for bookdown doc?
我如何了解哪些输出选项 key-values 可用于不同的 bookdown 输出格式?
例如,下面我显示了我的一个簿记文档的 YAML header。我可以提供 word_document2
key-value 对 (reference_docx
, template-v01.docx
)。但是还有哪些其他键可用?我想知道是否有 font
键,因为我想将默认输出字体从 Cambria 更改为 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)
(根据相关性裁剪,您的版本可能不同)
其他的,你可以看看bookdown书更好的参考here. Note that the other values not on the output
object there will vary depending on what you're using as outputs and what the templates accept, but in general you can consult the bookdown book or the pandoc reference for more details (pandoc readme)。
字体问题,需要修改参考文档才能应用字体(参考this). The fontfamily: arev
should work for the pdf/latex output, however. If you're also outputting HTML, you might need to customize that in a CSS file, see and this
我如何了解哪些输出选项 key-values 可用于不同的 bookdown 输出格式?
例如,下面我显示了我的一个簿记文档的 YAML header。我可以提供 word_document2
key-value 对 (reference_docx
, template-v01.docx
)。但是还有哪些其他键可用?我想知道是否有 font
键,因为我想将默认输出字体从 Cambria 更改为 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)
(根据相关性裁剪,您的版本可能不同)
其他的,你可以看看bookdown书更好的参考here. Note that the other values not on the output
object there will vary depending on what you're using as outputs and what the templates accept, but in general you can consult the bookdown book or the pandoc reference for more details (pandoc readme)。
字体问题,需要修改参考文档才能应用字体(参考this). The fontfamily: arev
should work for the pdf/latex output, however. If you're also outputting HTML, you might need to customize that in a CSS file, see