Generate Custom css for RStudio + knitr

Usage

custom_css(rprofile = FALSE, loc = QP("REPORT"), style.css = NULL, source = TRUE)

css_styles()

css_style_change(style.css, cur.style.css = QP("REPORT/css/style.css"))

css_style_add(loc = QP("PRESENTATION/assets/css"))

Arguments

rprofile
logical. If TRUE the style.R is added to the .Rprofile for sourcing upon startup.
loc
Path to the report location where the custom css should be placed. If NULL only the style.R is created in the base directory .Rprofile.
style.css
A path to a style.css file that will be used as the ‘~/css/style.css’. Also may take a character string indicating one of the reports package's built in style.css (see css_styles). Default in custom_css is a blank style.css.
source
logical. If TRUE the style.R is sourced intially.
cur.style.css
The location of the current style.css (this will be replaced).

Description

custom_css - Generate the components necessary for a custom css for use with RStudio and knitr.

css_styles - View the available built in style.css files.

css_style_change - Change a style.css.

css_styl_add - Add a style.css. Defaults to ‘~PRESENTATION/assets/css’.

Details

custom_css - The user must add the custom contents to the custom css located in ‘~/css/style.css’.

css_styles - prints a list of available style.css templates available within the reports package for use with the custom_css argument style.css. Feel free to submit your own to the reports package reports.rpackage@gmail.com marked with style.css template in the subject line.

See https://github.com/trinker/style.css_examples for examples utilizing the internal reports package style.css.

Note

The user has to source before the custom styles will be applied. The user may specify rfprofile = TRUE to add the style.R to the .Rprofile for sourcing upon startup. Otherwise, the user must open the style.R as the active tab in RStudio, check the `Source on Save` box and the click the save icon.

Examples

## custom_css(TRUE, style.css = css_styles()[1]) css_styles()
[1] "apa6" "rinker_vignette"
## css_style_change("rinker_vignette")