[R] Sweave/margin

Deepayan Sarkar deepayan at stat.wisc.edu
Fri Mar 18 23:01:41 CET 2005


On Friday 18 March 2005 15:49, Katharina Hoff wrote:
> Hi!
>
> I am currently using Sweave for writing my bachelor thesis - and I have a
> problem:
>
> I am using a LaTeX style (report) with quite big margin spaces. The Sweave
> generated LaTeX code "floats" into the margin - and it looks ugly. The text
> is blocked and fine... then there comes some flattering code running over
> the margin... and blocked text again.
>
> Considering the LaTeX output, I guess that Sweave puts the source code
> somehow in LaTeX-boxes and I suppose there is a place where I could change
> the width of the source code boxes (At a certain point, there is a break,
> closely before the text would drift out of the page. Then the code
> continues in new lines below.)
>
> Does anyone know where I could change or insert the box width?

If I understand your problem correctly, you might want to try putting

options(width = 40)

at the top of your first chunk.

> Or probably I am totally wrong and someone knows another solution...
>
> Hoping for help - and excuse if anyone asked this stupid question before, I
> did not find it in the archive,

It's in the Sweave FAQ: http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html

-Deepayan




More information about the R-help mailing list