[R-SIG-Mac] texi2dvi error "Sweave" and "exams"

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Sun Aug 19 21:40:07 CEST 2012


The standard way to install Tex on the Mac is to use MacTex (a port of
Texlive to the Mac), see

You should probably install the big 2.1GB package on the front page.
That should also place the tex utilities on your path (as far as I


On Sun, Aug 19, 2012 at 3:23 PM, Paul Ossenbruggen <pjo at cisunix.unh.edu> wrote:
>         I have installed Sweave as recommended. http://lifeasclay.wordpress.com/tag/sweave/.    Placing a test.Rnw file, for instance, in  "/Library/Frameworks/R.framework/Versions/2.15/Resources/library/utils/Sweave" generates test.tex files that generate pdf files with LaTeX. To be honest, placing Rnw files seem to make sense. The "exams" package does require not this step. It uses texi2dvi and other tools to accomplish this result. Since I have a cursory knowledge of Mac OSX and the role that texi2dvi plays, I cannot understand the error message obtained below. The error occurs when executing the Example from R help(exams).
>> library(exams)
> Loading required package: tools
> starting httpd help server ... done
>> getwd()
> [1] "/Users/PJO"
>> library("exams")
>> options(device.ask.default = FALSE)
>> myexam <- list(
> +   "boxplots",
> +   c("tstat", "ttest", "confint"),
> +   c("regression", "anova"),
> +   "scatterplot",
> +   "relfreq"
> + )
>> sol <- exams(myexam)
> Error in texi2dvi(out_tex[j], pdf = TRUE, clean = TRUE, quiet = quiet) :
>   Running 'texi2dvi' on 'plain1.tex' failed.
>         I am running:
> R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
> Copyright (C) 2012 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
> and Mac OSX Version 10.8.
>         After submitting the above to r-help-request "12. texi2dvi error "Sweave" and "exams" (Paul Ossenbruggen)", I delved further into the problem and discovered the source of the problem:
>> exams(file = "tstat.Rnw", quiet = FALSE)
> Writing to file tstat.tex
> Processing code chunks with options ...
>  1 : keep.source term hide
> You can now run (pdf)latex on ‘tstat.tex’
> Error in texi2dvi(out_tex[j], pdf = TRUE, clean = TRUE, quiet = quiet) :
>   Running 'texi2dvi' on 'plain1.tex' failed.
> Output:
> You don't have a working TeX binary (tex) installed anywhere in
> your PATH, and texi2dvi cannot proceed without one.  If you want to use
> this script, you'll need to install TeX (if you don't have it) or change
> your PATH or TEX environment variable (if you do).  See the --help
> output for more details.
> For information about obtaining TeX, please see http://www.tug.org.  If
> you happen to be using Debian, you can get it with this command:
>   apt-get install tetex-bin
>         Apparently, it is a simple matter to fix the error; however, I don't have sufficient knowledge to know how to proceed.
>         I installed LaTeX using TeX Live and use TeXShop as my LaTeX driver. A bibtex folder is stored on the path /library/texmf but TeX is not. I suspect that I must install TeX in this folder but again unsure.
>         Any help will be greatly appreciated.
> Thanks,
> Paul
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

More information about the R-SIG-Mac mailing list