I have a bit of Sweave code as such:
<<label = Example1, echo= true>>=
//Bunch of R Code
@
I've tried putting it in my own float environment like so
\newfloat{rcode}{h!}{rcode}
\floatname{rcode}{Code Example}
\begin{rcode}[htb!]
<<label = Example1, echo= true>>=
bunch of R code
@
\caption{First code example}
\label{CodeEx1}
\end{rcode}
But then the float is too big and goes on the next page. How do I get it to split over the page like it did before the environment. I've tried the continuedfloat
package and wasn't able to get it working. I've also tried the algorithm
package and had problems there as well.
knitr
package instead of Sweave, with which you can use your own environment easily (e.g. gist.github.com/2760395) without writing\begin{rcode}
and\end{rcode}
repeatedly.