Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear Simon, > -Original Message- > From: Simon Urbanek [mailto:simon.urba...@r-project.org] > Sent: March-16-15 3:57 PM > To: j...@mcmaster.ca > Cc: Berend Hasselman; r-sig-mac@r-project.org > Subject: Re: [R-SIG-Mac] checking for pdflatex > > > > On Mar 16, 2015, at 3:43 PM, John Fox w

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Simon Urbanek
> On Mar 16, 2015, at 3:43 PM, John Fox wrote: > > Dear all, > > I've now implemented Simon's solution, setting the path in the .onLoad() > function of the Rcmdr package and resetting it to its pre-existing value in > .onUnload(). This seems to work fine for me and, I hope, will be a more >

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Prof Brian Ripley
Note that it not just MacTex which uses /usr/texbin. /usr/texbin is a link to /Library/TeX/Distributions/Programs/texbin which is an /etc/alternatives scheme to manage multiple TeX distributions which used (prior to Yosemite, at least) to be controlled by a Systems Preferences widget. See htt

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear all, I've now implemented Simon's solution, setting the path in the .onLoad() function of the Rcmdr package and resetting it to its pre-existing value in .onUnload(). This seems to work fine for me and, I hope, will be a more robust solution. Thanks again to everyone for their help. John

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear Berend and Simon, I've now tried Berend's solution and it appears to work fine: If necessary, I add /usr/texbin to the path when the Rcmdr GUI starts up and restore the path to its previous state when it closes. I agree that Simon's solution will be more flexible since it should work if p

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Ian Gow
On 16 Mar 2015, at 13:48, John Fox wrote: > Dear Gabor, > >> -Original Message- >> From: Gábor Csárdi [mailto:csardi.ga...@gmail.com] >> Sent: March-16-15 12:39 PM >> To: John Fox >> Cc: Simon Urbanek; R-SIG-Mac >> Subject: Re: [R-SIG-Mac] checking for pdflatex >> >> John, >> >> my guess

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Berend Hasselman
John, > On 16-03-2015, at 18:53, John Fox wrote: > > Dear Berend, > …. >> >> For what it’s worth: I have the following code in the .First function in >> ~/.Rprofile: >> (R 3.1.3 on OS X Yosemite) >> >>if( .Platform$GUI == "AQUA" ) { >># this appends /usr/local/bin to what is alread

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear Berend, > -Original Message- > From: Berend Hasselman [mailto:b...@xs4all.nl] > Sent: March-16-15 1:27 PM > To: j...@mcmaster.ca > Cc: Simon Urbanek; r-sig-mac@r-project.org > Subject: Re: [R-SIG-Mac] checking for pdflatex > > > > On 16-03-2015, at 17:25, John Fox wrote: > > > > De

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Simon Urbanek
> On Mar 16, 2015, at 12:25 PM, John Fox wrote: > > Dear Simon, > > Thanks for this, and to the others who responded to my question. The FAQ and > Matt Denwood's response jogged my memory, and reminded me that I encountered > this problem before. > > In this case, I don't see a good solution

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear Gabor, > -Original Message- > From: Gábor Csárdi [mailto:csardi.ga...@gmail.com] > Sent: March-16-15 12:39 PM > To: John Fox > Cc: Simon Urbanek; R-SIG-Mac > Subject: Re: [R-SIG-Mac] checking for pdflatex > > John, > > my guess is that on OSX, >95% of the users have https://tug.org/

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Berend Hasselman
> On 16-03-2015, at 17:25, John Fox wrote: > > Dear Simon, > > Thanks for this, and to the others who responded to my question. The FAQ and > Matt Denwood's response jogged my memory, and reminded me that I encountered > this problem before. > > In this case, I don't see a good solution, but

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Gábor Csárdi
John, my guess is that on OSX, >95% of the users have https://tug.org/mactex/, which seems to have pdflatex in /usr/texbin. If it is not there, then most likely the user does not have pdflatex installed, and you can give a note or warning about it. If you want to be sure, you can check other tex

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread John Fox
Dear Simon, Thanks for this, and to the others who responded to my question. The FAQ and Matt Denwood's response jogged my memory, and reminded me that I encountered this problem before. In this case, I don't see a good solution, but I'll think about the problem some more. Without providing

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread David Winsemius
On Mar 15, 2015, at 6:29 PM, John Fox wrote: > Dear Jordan, > > I'm not looking for an R package, I'm looking for the pdflatex program. In a Terminal session pdflatex does not appear to be on the bash path: my-computer-name:~ myusername$ which pdflatex # Nothing Whereas in an R.app session (

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Simon Urbanek
John, see R for Mac FAQ 10.13: I get “command not found” in the GUI yet it works in the Terminal – why? Cheers, Simon > On Mar 15, 2015, at 6:21 PM, John Fox wrote: > > Dear Ian, > > Thanks for this. Please see below: > >> -Original Message- >> From: Ian Gow [mailto:iand...@gmail.c

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Ian Gow
John: It might be useful to see how TeX editors (TeXShop, TeXWorks, Texpad, etc.) do this. I guess if there’s a way, these programs would use it. Other software I have seen use a “look in all the usual locations” approach to solve a similar problem. Finally, I can find a few using locate. It s

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Rainer M Krug
"John Fox" writes: > Dear Jordan, > > I'm not looking for an R package, I'm looking for the pdflatex program. Isn't there an R package which requires latex? You might find one and check how it is done there? knitr[1] comes to mind? Please post your findings here as it is an interesting question

Re: [R-SIG-Mac] checking for pdflatex

2015-03-16 Thread Matt Denwood
On 15 Mar 2015, at 23:21, John Fox wrote: > Dear Ian, > > Thanks for this. Please see below: > >> -Original Message- >> From: Ian Gow [mailto:iand...@gmail.com] >> Sent: March-15-15 5:07 PM >> To: John Fox >> Cc: r-sig-mac@r-project.org >> Subject: Re: [R-SIG-Mac] checking for pdflatex