[ESS] ess-swv-PDF hack(?)

Martin Maechler maechler at stat.math.ethz.ch
Mon Nov 17 10:13:34 CET 2008


>>>>> "ChuckB" == Charles C Berry <cberry at tajo.ucsd.edu>
>>>>>     on Sat, 15 Nov 2008 14:25:35 -0800 writes:

    ChuckB> Dear Ess-weaveRs,

    ChuckB> Lately I been getting complaints about Sweave.sty not being found by 
    ChuckB> pdflatex.

    ChuckB> I guess that utils:::texi2dvi or R CMD texi2dvi are
    ChuckB> intended to resolve this for me, and in command line
    ChuckB> operations, I am now in the habit of typing

    ChuckB> R CMD texi2dvi -p myfile.tex

    ChuckB> which helpfully sets TEXINPUTS (I assume) and runs
    ChuckB> pdflatex as many times as needed to resolve
    ChuckB> references.

    ChuckB> To get the equivalent in ess-swv-PDF, I am using this

    ChuckB> ;; old version (call-process "pdflatex" nil tex-buf 1 latex-filename))

    ChuckB> (call-process "R" nil tex-buf 1 "CMD" "texi2dvi" "-p"  latex-filename ))

    ChuckB> This seems to do the trick for me - M-n P pdflatex's
    ChuckB> the file and pops up my viewer, but I wonder if there might be
    ChuckB>  some gotchas and/or if there is a better version of this.

Thank you, Chuck.
I don't see why your solution should be called "hack".

To the contrary, I find it quite reasonable to rely on

   R CMD texi2dvi -p <filename>

to work properly even in those cases where direct 
   
   pdflatex -p <filename>

would not work.
I do agree with Sebastian that putting Sweave.sty into the
"TEXINPUTS / texmf path" is a more generally useful solution
{which we have been using locally "forever"}.

The more important question for this mailing list (!) remains what
we -- ESS-core -- should do about this :
Should we replace the above  (call-process ..) line the same or
similarly as Chuck did it?


Martin Maechler, ETH Zurich




More information about the ESS-help mailing list