This object can be used to set or get themes in knitr for syntax highlighting.
An object of class
list of length 2.
We can use
knit_theme$set(theme) to set the theme, and
knit_theme$get(theme) to get a theme. The
theme is a character
string for both methods (either the name of the theme, or the path to the CSS
file of a theme), and for the
set() method, it can also be a list
returned by the
get() method. See examples below.
The syntax highlighting here only applies to ‘.Rnw’ (LaTeX) and ‘.Rhtml’ (HTML) documents, and it does not work for other types of documents, such as ‘.Rmd’ (R Markdown, which has its own syntax highlighting themes; see http://rmarkdown.rstudio.com).
Ramnath Vaidyanathan and Yihui Xie
For a preview of all themes, see https://gist.github.com/yihui/3422133.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.