Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set font color of code output of knitr to black only

Tags:

r

knitr

I want to change the font color of the code output of knitr to black for the whole output. The standard output has a grey background and different colors are used in the output for different types of expressions like functions, objects, etc.

My goal is to have a white background and the code should be all black. I already solved the background color problem with the chunk option background='#FFFFFF', but I couldn't find a solution for the font color of the code...

Who can help me?

Thank you very much in advance for your valuabe help!!

Sincerely yours,

broesel

like image 498
Magnus Metz Avatar asked Aug 09 '13 13:08

Magnus Metz


1 Answers

If you are talking about Rnw/LaTeX documents, you can turn off syntax highlighting using the chunk option highlight=FALSE. See documentation.

like image 157
Yihui Xie Avatar answered Sep 21 '22 21:09

Yihui Xie