[OS X TeX] Re: PS on TeX Switcher

Charilaos Skiadas skiadas at hanover.edu
Fri Nov 24 18:15:16 EST 2006


On Nov 24, 2006, at 2:46 PM, Richard Koch wrote:

> Charilaos,
>
> Thanks for these messages; it is interesting to see new issues like  
> these arise.
>
> On Nov 24, 2006, at 11:01 AM, Charilaos Skiadas wrote:
>
>> That sounds reasonable, but why does this method need a mpkg and a  
>> whole installer?
>
> Because I was lazy, and primarily because using Administrator  
> privileges from a Cocoa
> program is hard. This hack provided a way around that problem.  
> Emphasis on the
> lazy part.

Right, administrator privileges are indeed easier this way. I suppose  
an applescript could easily execute shell scripts with administrator  
privileges as well. But it works, that's all that matters!

>> I'm thinking of the possibility that some user might want various  
>> versions of the TeXLive distro around
>
> Good point. But I think it is premature to design for this.
>
true ;)

>>
>> There is however the following important problem. GUI programs  
>> don't get to use what happens in /etc/profile, since they don't  
>> get to see the shell. /etc/profile only kicks in when a shell is  
>> being used, namely in the Terminal. So all these changes to the  
>> PATH variable don't help programs like TeXShop and TextMate to  
>> determine where the correct TeX is to be found etc.
>
> I was hoping that the /usr/local/texprograms link would solve this  
> problem. This solution works for all of the
> GUI programs I've tried, and it seems to me that it would work to  
> find kpsewhich. One problem is that
> Gerben doesn't currently create this link, but on the other hand he  
> doesn't destroy it, so if it is
> set once (by say TeX_Switcher) it will remain valid.

Right, so in that sense it would probably be a not bad idea if  
TextMate prompts the user to set this link for them from /usr/local/ 
texprograms to their current tex install?

>> If on the other hand those installers, instead of taking care only  
>> of /etc/profile, also took care of ~/.MacOSX/environment.plist,  
>> setting an appropriate value for the PATH variable there, then the  
>> settings in that file are indeed read by all GUI apps, and so  
>> neither TextMate nor TeXShop would need to do any particular work,  
>> they could just call all TeX tools without a need to be told what  
>> explicit path to use.
>
> Gerben has explained several times on this list why he thinks changing
> environment.plist is a bad idea. This is an area where experts can  
> disagree.
> I have to report that Gerben has convinced me; TeX_Switcher definitely
> won't change environment.plist.

Hadn't actually read those threads before, looking at them now. But  
if I understand them correctly, is there really any harm done by  
setting the PATH variable there to be:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/texprograms

along with setting /usr/local/texprograms to link to the appropriate  
thing?

I agree with some of the points there, that individual applications  
should set their own preferences. But in this case I don't thing we  
are talking about the setting of one particular application. We are  
talking about the settings of the TeX installation, which a number of  
applications need to have access to. So we need to set the indicator  
of the current TeX install in a way that all apps needing it can  
access it. If this is not done in environment.plist, I suppose the  
only other option is to agree to use something like /usr/local/ 
texprograms.
The alternative is really requiring the user to set this path in  
every single app needing to use LaTeX, which I don't think is really  
very efficient/robust.

I personally like the idea of just relying on /usr/local/texprograms,  
and having TM prompt to set it for the user if it is not already set.  
Don't know if there are any possible problems of that though.
>
> Dick
> koch at math.uoregon.edu

Haris


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list