rmarkdown (version 1.18)

all_output_formats: Determine all output formats for an R Markdown document

Description

Read the YAML metadata (and any common output YAML file) for the document and return the output formats that will be generated by a call to render.

Usage

all_output_formats(input, encoding = "UTF-8", output_yaml = NULL)

Arguments

input

Input file (Rmd or plain markdown)

encoding

The encoding of the input file; see file.

output_yaml

Paths to YAML files specifying output formats and their configurations. The first existing one is used. If none are found, then the function searches YAML files specified to the output_yaml top-level parameter in the YAML front matter, _output.yml or _output.yaml, and then uses the first existing one.

Value

A character vector with the names of all output formats.

Details

This function is useful for front-end tools that require additional knowledge of the output to be produced by render (e.g. to customize the preview experience).