Arjun Ravi Narayan <contact <at> arjunnarayan.com> writes:
> I am editing a document for submission to the R-news newsletter, and
> in my article my Sweave code inserts a dynamically generated PDF
> report that my R program generates.
> 

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.

Thanks, Gregor

default: Sweave fixTex
        texi2pdf --clean wrapper.tex && evince wrapper.pdf

Sweave: # Sweave myPaper.Rnw
        R CMD Sweave myPaper.Rnw

fixTex: Sweave # Change all S* environments to smallverbatim
        @cat myPaper.tex | sed -e '/\\begin{Sinput}/d' \
                               -e '/\\end{Sinput}/d' \
                               -e '/\\begin{Soutput}/d' \
                               -e '/\\end{Soutput}/d' \
                               -e 's/\\begin{Schunk}/\\begin{smallverbatim}/g' \
                               -e 's/\\end{Schunk}/\\end{smallverbatim}/g' \
        > myPaper2.tex
        @mv -f myPaper2.tex myPaper.tex

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to