knitr (version 0.3)

render_latex: Set output hooks for different output formats

Description

These functions set built-in output hooks for LaTeX, HTML and Markdown.

Usage

render_latex()

render_sweave()

render_listings()

render_html()

render_markdown()

render_gfm()

render_jekyll()

Arguments

Value

  • NULL; corresponding hooks are set as a side effect

Details

There are three variants of markdown documents: ordinary markdown (render_markdown()), GFM (GitHub Flavored Markdown; render_gfm()) and Jekyll (a blogging system on GitHub; render_jekyll()). For LaTeX output, there are three variants as well: knitr's default style (render_latex(); use the LaTeX framed package), Sweave style (render_sweave(); use Sweave.sty) and listings style (render_listings(); use LaTeX listings package). Default HTML output hooks are set by render_html().

These functions can be used in the first chunk of the input document (ideally this chunk has options include = FALSE and cache = FALSE) so that all the following chunks will be formatted as expected.

You can use knit_hooks to further customize output hooks; see references.

References

See output hooks in http://yihui.name/knitr/hooks