[OS X TeX] TeXShop-2.10beta

Jerome Laurens Jerome.Laurens at u-bourgogne.fr
Tue Jun 6 00:26:52 CEST 2006


Selon Gerben Wierda <Gerben.Wierda at rna.nl>:

> On Jun 5, 2006, at 13:35, Maarten Sneep wrote:
>
[...]
> > I don't know how the rest of TeX is handled (in TeXShop), but it seems
> > to me that XeTeX and gwTeX should be treated as similarly as possible.
> > A loger term solution that I can see is to (eventually) create a
> > universal set of tools.
>
> It is a difficult problem. Having universal binaries is easier for Dick
> but removes the download-only-what-you-need option.

Which can save space on small drives...

>
> What is the community's opinion?
>

Gerben, may be you should make a poll from your site in order to reach the
larger audience of your distribution, if the forthcoming fix does not fit.

As far as I understand, the problem rose because the shell scripts launched by
TeXShop must manage the PATH environment variable by themselves.
We can see here one of the limitations of such a design. We have seen in the
previous mails various hacks to solve this problem but fortunately, there is a
much simpler solution.

A proper design in that situation is to set up properly the PATH environment
variable -from- the front end -before- launching the shell script.
I won't enter into details, but it makes both developer life and end user life
easier, without talking about Gerben's life...

This can be achieved with this small code snippet adapted from iTeXMac2 source:

        NSTask * task = [[[NSTask allocWithZone:[self zone]] init] autorelease];
        NSMutableDictionary * processEnvironment = [[[[NSProcessInfo
processInfo] environment] mutableCopy] autorelease];
		NSString * PATH = [processEnvironment objectForKey:@"PATH"];
		PATH = [NSString
stringWithFormat:@"%@:%@",PATH,@"/the/proper/path/to/the/binaries"];// or
whatever you find usefull
		[processEnvironment setObject:PATH forKey:@"PATH"];
       [task setEnvironment:processEnvironment];
		....
		[task launch];

That's all.

J. Laurens

------------------------- 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