[ESS] Snw files are not weaved by C-c C-c from AucTeX-mode

Johan Sandblom jsandblom at gmail.com
Wed Aug 2 19:11:18 CEST 2006


2006/8/2, Rodney Sparapani <rsparapa at mcw.edu>:
> A.J. Rossini wrote:
> >
> > You are missing one critical point, and that is that Noweb isn't
> > restricted to LaTeX.   Noweb (and Sweave) support HTML (and could
> > directly support RTF) for document markup.   Noweb is
> > documentation-mode independent, and noweb-mode can be tweaked to
> > support XML/HTML editing modes with minimal work.  We default to LaTeX
> > for historical reasons (my dislike of raw HTML editing).
> >
>
> I can only speak for myself, but it seems that noweb is over-kill.  For
> my purposes, I would like to see a method of supporting statistical
> package code within latex.  Something backwards compatible like latex
> environments such as Rinput, SASinput, etc.  But, with sweave-like
> functionality that would rely on some multi-mode under-pinnings, maybe
> mmm-mode?  Of course, Tony is the expert in this area and I'm just
> ranting :o)  However, if he or anyone else has any ideas/interest of how
> this might be done, I'd like to hear it.
>
> Rodney

You could switch to ConTeXt (http://wiki.contextgarden.net,
http://www.pragma-ade.com) and use the R module distributed with it,
like so:

\usemodule[r]
\starttext

\startR
pdf("test.pdf")
plot(1:10)
dev.off()
\stopR

\externalfigure{test}

\stoptext

You could even use mmm-mode with it:
(setq mmm-global-mode 'maybe)
(setq mmm-submode-decoration-level 2)
(mmm-add-group 'context-plus
               '((context-R
                  :submode r-mode
                  :face mmm-comment-submode-face
                  :front ".*\\\\startR\\w*\\({\\w*}\\|\\[\\w*\\]\\|\\)\\W*"
                  :back  ".*\\\\stopR")
                 (context-MP
                  :submode metapost-mode
                  :face mmm-code-submode-face
                  :front ".*\\\\start\\w*MP\\w*\\({\\w*}\\|\\[\\w*\\]\\|\\)\\W*"
                  :back  ".*\\\\stop\\w*MP")
                 ))
(add-to-list 'mmm-mode-ext-classes-alist '(context-mode nil context-plus))

But that would require learning another TeX dialect ...

>
> >
> > The ESS/Noweb approach (which is probably still supported in the code,
> > though I've not checked recently) is:
> >
> > <<thisChunkName.sas>>=
> > ** -*- mode: SAS -*- ;
> > proc mixed ...
> >
> > @
> >
> >
> > Originally, and in a historical sense, that should have been either:
> >
> > <<thisChunkName.sas,mode=SAS>>=
> >
> > @
> >
> > or
> >
> > <<thisChunkName.sas>>=
> >
> > @ %mode SAS
> >
> > Or simply recognizing the suffix on the chunk name (with the "default
> > code mode" being used should the chunk name not have a suffix or even
> > if the chunk is nameless).
> >
> >
> > but I was too lazy at the time to insist (by coding ESS or by convincing Fritz).
> >
> > best,
> > -tony
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>


--
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell


-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
"What is wanted is not the will to believe, but the
will to find out, which is the exact opposite"
- Bertrand Russell




More information about the ESS-help mailing list