output: Output format of an R Markdown document

Description Usage Details Value Author(s) Examples

Description

Helper function to determine the document's current pandoc output format.

Usage

1

Details

The function is useful for defining different behavior depending on the output format, e.g. figure settings.

Value

A character string specifying the pandoc output format.

Author(s)

Andrzej OleÅ› <andrzej.oles@embl.de>, 2016

Examples

1
2
3
4
5
6
7
## Not run: 
## Switch between SVG and PDF figures depending on document output format
knitr::opts_chunk$set(
  dev = switch(output(), html = "svg", latex = "pdf")
  )

## End(Not run)

aoles/BiocStyle documentation built on Oct. 15, 2021, 4:50 a.m.