[R-SIG-Mac] checking for pdflatex

John Fox jfox at mcmaster.ca
Sun Mar 15 21:46:10 CET 2015


Dear list members,

I need to determine whether pdflatex is installed and have been doing that via Sys.which("pdflatex"). This works when R is run in a terminal window (or in RStudio):

    > Sys.which("pdflatex")
                  pdflatex 
    "/usr/texbin/pdflatex" 

but not from R.app:

    > Sys.which("pdflatex")
    pdflatex 
          "" 

The session info is the same in both cases:

-------------- snip ----------------

> sessionInfo()
R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.2 (Yosemite)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

-------------- snip ----------------

Why is the result different? Is there a better way to check for the presence of pdflatex?

Any help would be appreciated.

Thanks,
 John

------------------------------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/



More information about the R-SIG-Mac mailing list