Last active
December 11, 2016 23:04
-
-
Save ijlyttle/000efb922103ff7bd55625443187e774 to your computer and use it in GitHub Desktop.
Sample Rmd file to use for testing knitr with class options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: Background color | |
output: | |
html_document: | |
keep_md: yes | |
--- | |
You will need a development version of knitr to get this to work (for now). | |
``` | |
# install.packages("devtools") | |
install_github("ijlyttle/knitr", ref = "option_class") | |
``` | |
```{r} | |
a <- 2 | |
``` | |
```{css} | |
.badSource { background-color: red; } | |
.badOutput { background-color: orange; } | |
``` | |
```{r mtcars} | |
library("magrittr") | |
mtcars %>% | |
summary() | |
``` | |
Putting in a second (meaningless) class in `class.output`, just to be sure that multiple classes work how I expect. | |
```{r cars, class.source="badSource", class.output=c("badOutput", "foo")} | |
summary(cars) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment