[ESS] Combining sweave and pdflatex into one helper function

Brett Presnell presnell at stat.ufl.edu
Mon Feb 14 17:50:06 CET 2011


Sorry, forgot to mention that my R is version 2.12.1 (x86_64-pc-linux-gnu).

Brett Presnell <presnell at stat.ufl.edu> writes:

> I grabbed what you posted yesterday and added it into my .emacs, but I
> had one strange problem that pushed me back to "M-n s" + "M-n P".  The
> problem was that the line
>
> \SweaveOpts{keep.source=TRUE}
>
> which I usually put that the top of my .Rnw file seems to be ignored
> when I run Sweave with "C-cC-c Sweave", while it is correctly picked up
> by "M-n s".
>
> I haven't gotten around to figuring out why this is happening, but it's
> definitely a deal breaker for me.  I don't have time at the moment to
> try the SVN version of ESS, but I am currently running
>
>  Ubuntu 10.10
>  GNU Emacs 23.1.1
>  AUCTeX 11.86
>  ESS 5.12
>
> FWIW, I did check that that "M-n s" followed by "C-cC-c LatexSweave"
> works correctly, so the problem arises in the running of Sweave, not
> pdflatex.
>
>
> Seb <spluque at gmail.com> writes:
>
>> On Fri, 11 Feb 2011 16:18:46 +0000,
>> Dirk Eddelbuettel <edd at debian.org> wrote:
>>
>>> Seb <spluque <at> gmail.com> writes:
>>>> I haven't looked at this particular problem, but I suggested an
>>>> alternative way of working to Dirk (off-list), which he liked (so
>>>> we're 2 at least!), but that requires AUCTeX, so may not appeal to
>>>> everyone.
>>
>>> In fact I liked it so much that I encouraged Seb to post it here, and
>>> I am glad to see he now did. Given that this about ESS + Sweave (ie
>>> LaTeX) I do not think it is a stretch to assume AUCTeX (ie LaTeX).
>>
>> I've just implemented this in SVN (4460).  All that should be required
>> is:
>>
>> (setq ess-swv-plug-into-AUCTeX-p t)
>>
>> or toggle the menu option Noweb -> Sweaving, Tangling, ... -> AUCTeX
>> Interface.  This variable defaults to nil.  Can you give it a try?
>> Thanks.



More information about the ESS-help mailing list