I am trying to transition from Sweave to knitr, but there are a few
things about customization of the appearence of R input and output that
I did not get yet. Maybe somebody on the list can help me.
In my Sweave presentations I used a slanted font for the R input and a
normal font for the output, both in a small font. I also indented
everything by an extra 2em. All this was achieved by the following
instructions in the .Rnw file:
\DefineVerbatimEnvironment{Sinput}{Verbatim}{xleftmargin=2em,
?fontsize=\footnotesize, fontshape=sl}
\DefineVerbatimEnvironment{Soutput}{Verbatim}{xleftmargin=2em,
?fontsize=\footnotesize}
In order to get a similar result (with a tiny size instead of a footnote
size, but that is not the point) with knitr I included in the .Rnw file
the lines
\ifdefined\knitrout
?\renewenvironment{knitrout}{\begin{tiny}\slshape}{\end{tiny}}
\else
\fi
What I get is something like this:
http://definetti.uark.edu/~gpetris/knitr-output.pdf
The problem is that the prompt sign '>' did not change either size or
shape. So I am probably not using the correct approach. How should I be
doing?