[R] Formatting Sweave in R-News

Gregor Gorjanc gregor.gorjanc at bfro.uni-lj.si
Wed Aug 22 17:49:48 CEST 2007


Hi Duncan,

Duncan Murdoch wrote:
>> Slightly off Arjuns topic is a problem with Schunk, Sinput and Soutput
>> environments. They just use to much inline space. I have tweade this
>> problem with sed (see bellow for Makefile content), but wonder if there
>> is a better solution.
> 
> You can change the spacing by redefining those environments.  I use this:
> 
> % This removes the extra spacing after code and output chunks in Sweave,
> % but keeps the spacing around the whole block.
> 
> \fvset{listparameters={\setlength{\topsep}{0pt}}}
> \renewenvironment{Schunk}{\vspace{\topsep}}{\vspace{\topsep}}

Nice trick. Thank you.

I am CCing to a friend that had the same issue.

-- 
Lep pozdrav / With regards,
     Gregor Gorjanc
----------------------------------------------------------------------
University of Ljubljana     PhD student
Biotechnical Faculty        www: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department     blog: http://ggorjan.blogspot.com
Groblje 3                   mail: gregor.gorjanc <at> bfro.uni-lj.si
SI-1230 Domzale             fax: +386 (0)1 72 17 888
Slovenia, Europe            tel: +386 (0)1 72 17 861



More information about the R-help mailing list