I've never heard of 'Portable MikeTex'.  Is this (Portable) MiKTeX?

What you are doing wrong is declaring texidvi to be pdflatex, and it simply is not. I think what you actually want is to include the MiKTeX bin directory in your path, or to set options(texi2dvi=) to the path to texi2dvi.exe (and that may still require the MiKTeX bin directory in the path).


On Fri, 12 Feb 2010, R Heberto Ghezzo, Dr wrote:

Hello, I am trying to start using Sweave. I copy the example from help Sweave

testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils")
    ## enforce par(ask=FALSE)
options(device.ask.default=FALSE)
    ## create a LaTeX file
Sweave(testfile)
    ## This can be compiled to PDF by
tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE)

and I get:

Sweave(testfile)
Writing to file Sweave-test-1.tex
Processing code chunks ...
1 : print term verbatim
2 : term hide
3 : echo print term verbatim
4 : term verbatim
5 : echo term verbatim
6 : echo term verbatim eps pdf
7 : echo term verbatim eps pdf
You can now run LaTeX on 'Sweave-test-1.tex'

tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE)
texify: -interaction=nonstopmode: unknown option
Error in tools::texi2dvi("Sweave-test-1.tex", pdf = TRUE) :
 unable to run E:\PortableUSB/PortableApps/MikeTex/miktex/bin/texi2dvi.exe on 
'Sweave-test-1.tex'

I  installed Portable MikeTex in E:/PortableUSB/PortableApps/MikeText
I modified Rprofile.site with

.First <- function() {
Sys.setenv("JAGS_HOME"=replace.substring.wild(R.home(), "R-*", "JAGS-1.0.3"))
Sys.setenv("LATEX"=replace.substring.wild(R.home(),"R*","PortableUSB/PortableApps/MikeTex/miktex/bin/latex.exe"))
Sys.setenv("PDFLATEX"=replace.substring.wild(R.home(),"R*","PortableUSB/PortableApps/MikeTex/miktex/bin/texi2dvi.exe"))
}

Can somebody tell me what other environmental variables to add? or what I am 
doing wrong?
Thanks
Heberto Ghezzo
McGill University
Montreal - Canada
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to