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? Also, what do I have customize, and how, in order to get the extra left margin? Final question: how can I get the continuation sign '+'? (This is for an introductory presentation in which I want to show people exactly what they are going to see on their screen.) Oops, one more... How can I change the spacing between regular text and R code (input/output)? With Sweave I would do \fvset{listparameters={\setlength{\topsep}{0pt}}} \renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}} Sorry for the many questions and thank you in advance for any help and insight you can give me. Best, Giovanni -- Giovanni Petris <gpet...@uark.edu> Associate Professor Department of Mathematical Sciences University of Arkansas - Fayetteville, AR 72701 Ph: (479) 575-6324, 575-8630 (fax) http://definetti.uark.edu/~gpetris/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.