[R] LaTeX in system()

From: Christoph Heibl <christoph.heibl_at_gmx.net>
Date: Thu, 08 May 2008 13:37:10 +0200


Dear list,

I want to run latex from an R script:

        system("latex mysource.tex")

or:

        texi2dvi("mysource.tex", pdf = TRUE, clean = FALSE, quiet = TRUE, texi2dvi = latex)

but latex does not seem to be on the search path:

        /bin/sh: line 1: latex: command not found.

Although 'printenv PATH' tells me that the usr/texbin is looked for executables:

/Library/Frameworks/Python.framework/Versions/Current/bin:/sw/bin:/sw/ sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/texbin:/usr/ X11R6/bin

Or am I wrong here?

In any case this is strange because if I call latex from the Terminal shell it runs without problems. On the other hand texi2dvi from the tools package also does not work (for the same reason?)

I use R version 2.6.2 on Intel Mac OS X 10.4.11

Why is there a difference between the way the call to latex behaves directly in the shell or via the R system () command?

Thanks in advance for any advice!
Christoph


Christoph Heibl

Systematic Botany
Ludwig-Maximilians-Universität München
Menzinger Str. 67
D-80638 München
GERMANY phone: +49-(0)89-17861-251
e-mail: heibl_at_lmu.de

http://www.botanik.biologie.uni-muenchen.de/botsyst/heibl/ch-home.html

SAVE PAPER - THINK BEFORE YOU PRINT



R-help_at_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. Received on Thu 08 May 2008 - 11:40:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 08 May 2008 - 16:30:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive