Reputation: 825
In the official knitr manual, comments are in green and they are upright as opposed to italic. But whenever I use knitr to compile a PDF, my comments are purple and italic. How can I change this?
Upvotes: 5
Views: 450
Reputation: 825
Answering my own question:
Thanks to mnel for the tip. Just use knit_theme
: you use the knit_theme
command within the R Sweave document, similar to the way in which you put in code chunks.
E.g.:
\documentclass[12pt,a4paper,final]{article} # Setting document class
<<adjust-preamble, include=FALSE>>= # Using knit_theme
knit_theme$set("seashell")
@
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{savetrees}
\begin{document}
etc.
Upvotes: 3