yml_output: Capture, validate, and write output YAML

View source: R/yml_output.R

yml_outputR Documentation

Capture, validate, and write output YAML

Description

yml_output() writes valid YAML for the output field of R Markdown YAML. yml_output() captures the actual output functions, such as pdf_document(), and translates them to YAML. This function accepts multiple output formats (separated by commas) and validates each by evaluating the function internally. The YAML fields in under output come from arguments in their respective R functions. If you wanted to see the available fields in pdf_document(), for instance, you would read the documentation for that function using ?pdf_document.

Usage

yml_output(.yml, ...)

Arguments

.yml

a yml object created by yml(), as_yml(), or returned by a yml_*() function

...

valid R code calling functions that return objects of class rmarkdown_output_format, such as the *_document() functions in rmarkdown.

Value

a yml object

See Also

Other yml: asis_yaml_output(), bib2yml(), draw_yml_tree(), has_field(), read_json(), use_yml_defaults(), use_yml_file(), use_yml(), yml_author(), yml_blogdown_opts(), yml_bookdown_opts(), yml_citations(), yml_clean(), yml_distill_opts(), yml_latex_opts(), yml_pagedown_opts(), yml_params(), yml_pkgdown(), yml_reference(), yml_replace(), yml_resource_files(), yml_rsconnect_email(), yml_rticles_opts(), yml_runtime(), yml_site_opts(), yml_toc(), yml_vignette()

Examples


yml() %>%
  yml_output(html_document())

yml() %>%
  yml_output(
    pdf_document(keep_tex = TRUE, includes = includes2(after_body = "footer.tex")),
    bookdown::html_document2()
  )


ymlthis documentation built on Aug. 5, 2022, 5:23 p.m.