Magnus Metz
Magnus Metz

Reputation: 626

Set font color of code output of knitr to black only

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

Upvotes: 5

Views: 3406

Answers (1)

Yihui Xie
Yihui Xie

Reputation: 30114

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

Upvotes: 6

Related Questions