[R] [Rmarkdown] html_document - custom CSS for code snippets

Omar André Gonzáles Díaz oma.gonzales at gmail.com
Fri Aug 21 15:38:26 CEST 2015


Hi Community,

I'm using custom CSS to modify my html_document, genereted using knirt.

According to this page:

http://rmarkdown.rstudio.com/html_document_format.html

I have to turn off: 1) theme: null  and 2) highlight: null. And use:
3) css: my_styles.css (my css document).

I've achieved to use some html tags, like <main></main> to give some
left margin to the document. But i cannot apply correctly html tags to
the code snipets, and convert it's background to gray.

So my code snipets show the code, but the background is white, and has
no difference with the white background of the page.

What can i do?

*Extra: Now i'm displaying some R code, but i would like to display
also some javascript code. Is this possible?



More information about the R-help mailing list