Reputation: 3815
How can I learn what output option key-values are available for the different bookdown output formats?
For example, below I show the YAML header for a bookdown doc of mine. I can provide word_document2
the key-value pair (reference_docx
, template-v01.docx
). But what other keys are available? I'd like to know if there is a font
key because I'd like to change the default output font from Cambria to 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
---
Upvotes: 0
Views: 248
Reputation: 639
A quick and easy way to look for options into the specific version that you're using is just to go to your R console and type ?bookdown::word_document2
.
This is valid for all output formats, and you should see something with all format-specific options. This is the output of the ?rmarkdown::word_document
, that is used internally for 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)
(cropped for relevance, your version might be different)
For anything else, you can look into the bookdown book for better reference 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).
For the font problem, you need to change the reference document for it to apply the font (see 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 this and this for reference.
Upvotes: 1