[ESS] \Sexp{} problem, how to add syntax="SweaveSyntaxNoweb" option to M-n s?

Marc Schwartz marc_schwartz at me.com
Tue Mar 23 20:24:27 CET 2010


On Mar 23, 2010, at 7:20 AM, Werner W. wrote:

> Hi,
> 
> I am currently getting into Emacs & ESS on Windows and it starts to feel like a very nice environment to program in R and Sweave.
> However, I have a little problem: is it possible to add the option syntax="SweaveSyntaxNoweb" to the issued command when pressing M-n s? Right now I always get an "Undefined control sequence" error from the latex compiler since Sweave is not replacing the \Sexpr{} command at all. I know that this is no problem when I add the above option. I looked at the ess-swv.el file but could figure out how to add an option. It would be great if someone had a hint towards the solution for me.
> 
> Thanks so much,
>  Wern


Typically, when the \Sexpr's are not being evaluated, that is being replaced with a scalar, it is an indication that the sweave.sty file is not being found, as it is in that file, that the relevant code is located.

You can either manually add the \usepackage{PATH.TO.SWEAVE/Sweave.sty} directive to your .Rnw file's preamble, or see the Details section of ?RweaveLatex for information on other configuration options.

HTH,

Marc Schwartz



More information about the ESS-help mailing list