Search code examples
sweavernw

rnw linebreak, tidy won't work


I am new to R noweb. Actually, it is my first Rnw file (about 200 lines now, and Rnw is awesome!). My Problem: I have a couple of very long chunk lines, that exceed the paper. I have spent quite a long time on that now, and have of course stumbled over "tidy=TRUE". But that somehow won't work.

Here is a working example, which exceeds the paper in the pdf:

\documentclass[a5paper]{article}
\usepackage{Sweave}
\begin{document}
\SweaveOpts{concordance=TRUE}
<<example, tidy = TRUE>>=
1.111111111111111111111111111111111111111111111111111111111111111111111111111111
@
\end{document}

I am using R studio version 0.98.1103 and MiKTeX 2.9.

What do I do wrong? And how do I do it right?

Any help is highly appreciated! Serijoscha


Solution

  • After a very long time, I finally found the answer:

    The tidy=TRUE chunk argument is only for knitr.

    For Sweave, keep.source=FALSE can be used instead.