render_chunk.RdReasonably savvy in selecting the right option for your output.
render_chunk(x, options, inline = FALSE, ...)
| x | Character. Chunk output. |
|---|---|
| options | List. Options as passed from |
| inline | Logical. As passed from |
| ... | Other parameters passed from |
knitr object for printing.
Currently the function uses render_html_chunk
if the knitr output is an htmlwidget or knitr_kable.
Otherwise, if results is set to "asis",
it uses render_asis_chunk.
For standard fenced output (beginning and ending with three backticks),
surprisinglytidy relies on sassy.js
to post-process Pandoc-syntax classes into remark.js classes.
# NOT RUN {
# In \code{knitr} setup:
knitr::opts_chunk$set( # first option tells knitr to use function
render = surprisinglytidy::render_chunk
class.source = ".r-source", # you can set each separately
class.warning = ".r-warning",# class.output is what render_chunk will use
class.message = ".r-message",# note that you can use multiple classes,
class.error = ".r-error", # separated by a space
class.output = ".r-output .another-class"
)
# }