Edit comment Font in knitr

In the official knitr manual, comments are green and they are vertical rather than italic. But whenever I use knitr to compile a PDF, my comments are purple and italic. How can i change this?

+4
source share
1 answer

Answering my own question:

Thanks mnel for the tip. Just use knit_theme: you use the command knit_themein the R Sweave document, similar to how you put code snippets.

eg:.

\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.
+2
source

Source: https://habr.com/ru/post/1528009/


All Articles