Actually, for AUCTeX v11.91 (and presumably 11.88), this doesn’t quite do it.
You need to tweak that…
(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("SweavePDF" "R CMD Sweave %s.Rnw; pdflatex %s" TeX-run-command t t :help 
"SweavePDF") t))

But, this is tricky since the two versions of AUCTeX (v11 and v12) seem to have
slightly different behavior.  How do we do this in a 
way?  And is that the trick to getting ESS to do this automatically?

Rodney Sparapani, PhD
Assistant Professor of Biostatistics
Medical College of Wisconsin, Milwaukee
From: Rodney Sparapani <>
Date: Friday, January 19, 2018 at 12:05 PM
To: Kasper Daniel Hansen <>
Cc: Stephen Eglen <>, ess-help <>, Vincent 
Goulet <>
Subject: Re: [ESS] Sweave with ESS and AUCTeX

Well, at least, for v11.88.  You need this definition…
(eval-after-load "tex"
  '(add-to-list 'TeX-command-list
                        '("SweavePDF" "R CMD Sweave --pdf %s.Rnw" 
TeX-run-command t t :help "SweavePDF") t))
And then add this to make it the default with C-c C-c
%Local Variables:
%TeX-command-default: "SweavePDF"

______________________________________________ mailing list

Reply via email to