[OS X TeX] Re: PS on TeX Switcher
Charilaos Skiadas
skiadas at hanover.edu
Fri Nov 24 20:01:29 CET 2006
On Nov 24, 2006, at 11:28 AM, Richard Koch wrote:
> Folks,
>
> On Nov 24, 2006, at 6:48 AM, Charilaos Skiadas wrote:
>>
>
>> 1) I would have thought that all this could be done with a simple
>> shell script, possibly wrapped around in an applescript to get
>> root permissions. What does having it as a mpkg offer?
>
> TeX_Switcher is one small "program" for all distributions. It makes
> the
> two changes described in an earlier message.
> It is easy to change the /usr/local/texprograms link; that could be
> done by lots
> of programs in a multitude of ways. The harder thing to do is to
> maintain
> Gerben's method of setting PATH and MAN pointers. I think it is very
> important to continue using his method; otherwise users who use
> Gerben's distributions (surely the vast majority of us) will run
> into problems
> that are hard to diagnose.
That sounds reasonable, but why does this method need a mpkg and a
whole installer? Or is it just more convenient that way? Looking at
the package right now, I am basically seeing three scripts:
settexpath
setloginpath
postflight
So I guess those are the scripts you are talking about? I suppose
they are easier to manage inside the mpkg, but essentially it is just
a question of just running those three scripts from the appropriate
pkg file?
> I've admitted that TeX_Switcher is a hack and welcome other
> programs to do the
> same thing, BUT
I wouldn't call it a hack, what it offers seems perfectly reasonable
to me. It is just running a couple of scripts. I guess it's a hack in
the sense that it uses the Apple Installer in a way that it was not
perhaps meant to be used.
>> 2)
>> Wouldn't it be much better for the user, for there to be a simple
>> program that offers a list of all distributions in the user's
>> system, and allowing the user to pick which one should be the
>> default one?
>
> What other distributions are we talking about? I'd be happy to add
> others to the program, or you
> can open up TeX_Switcher yourself and see what it does. You'll find
> that there are three
> packages inside, one for each switch, and it will be very easy to
> determine exactly how the
> package makes the switch.
I'm thinking of the possibility that some user might want various
versions of the TeXLive distro around, but perhaps noone would want
something like that, I don't know.
>> 3) I hadn't really heard of /usr/local/texprograms before, and it
>> is not set up in my system, which admittedly follows a relatively
>> old tetex install. Is this something that was added to the MacTeX
>> distros, or is it also there in recent i-installer TeX packages?
>> Is it reasonable to assume that from now on /usr/local/texprograms
>> will point to the latex executables the user will want to be
>> using? If TextMate was to help the user set up path issues, in an
>> old install like mine, would it be reasonable for it to link /usr/
>> local/texprograms to the user's preferred TeX install?
>
> I just made this addition. i-Installer doesn't add it (and doesn't
> destroy it either). Adding this link is very
> easy; just make a symbolic link to your tex binary directory. For
> Gerben's distributions, running
> TeX Switcher will add the link if you installed the distribution
> with i-Installer.
>
> GUI programs don't have to be modified at all. Users can configure
> them using the link
> or not as they desire.
>
> ----------------------------
>
> The main reason I'm replying here is to urge that we avoid
> confusion on the matter of setting
> PATHS, by either using Gerben's method or making it very clear that
> we aren't.
>
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. Instead, the user needs to set the
"Path Settings" in the case of TeXShop, to the full path to the
executable, like in my case the path would be: /usr/local/teTeX/bin/
powerpc-apple-darwin-current
And I guess every time I want to change the install, I need to change
this ( or set it once to /usr/local/texprograms and trust the scripts
above to do the dirty work). In TextMate, we want to call kpsewhich,
among other things, but it is not easy to locate which is the correct
kpsewhich, unless you somehow read the setting set in /etc/profile.
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.
This is what we do (or actually ask our users to do) in TextMate, to
take the value of the PATH variable from the command line, and set it
in ~/.MacOSX/environment.plist so that GUI programs can use it.
Unfortunately of course this requires the user to update this file
when they install a new TeX distro.
So this is the file we mess with, though frankly I'd much rather the
TeX_Switcher took care of that as well, but currently it doesn't. We
don't touch anything in /etc/profile.
> 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 macostex-archives
mailing list