eclipse_theme {knitr}R Documentation

Download and convert a theme from eclipsecolorthemes.org to CSS

Description

This function uses the XML package to parse the theme as an XML file, then converts to a CSS file using a brew template in the knitr package. The CSS file can be further parsed with knit_theme$get(), and the result will be ready for knit_theme$set() to set the highlighting theme.

Usage

eclipse_theme(id)

Arguments

id

id of theme to save as CSS

Value

Path to the CSS file converted from the website.

Author(s)

Ramnath Vaidyanathan and Yihui Xie

References

http://www.eclipsecolorthemes.org/

See Also

knit_theme

Examples

# http://www.eclipsecolorthemes.org/?view=theme&id=1
library(knitr)
## Not run: 
# this relies on eclipsecolorthemes.org being accessible
opts_knit$set(out.format = "latex")
(css = eclipse_theme(1))
thm = knit_theme$get(css)
knit_theme$set(thm)
opts_knit$restore()

## End(Not run)

[Package knitr version 1.12.3 Index]