[OS X TeX] /Library/TeX (was local vs. global symlink)

Jérome Laurens jerome.laurens at u-bourgogne.fr
Wed Nov 29 03:54:29 EST 2006


Le 29 nov. 06 à 03:53, Charilaos Skiadas a écrit :

> On Nov 28, 2006, at 8:36 PM, Claus Gerhardt wrote:
>
>> In my home directory are 11 "folders" and nothing else. Two of the  
>> folders are symlinks  texmf and texprograms and I can't detect any  
>> clutter or pollution by junk . I already encountered similar  
>> reactions about the questions if one could place a symlink texmf  
>> in ~/ as I did, but these reactions are very difficult to  
>> understand - at least for someone like me.
>>
> The Apple Guidelines are very clear on this matter:
> http://developer.apple.com/documentation/MacOSX/Conceptual/ 
> BPFileSystem/Articles/WhereToPutFiles.html
>
> "It is important to remember that the user domain (/Users) is  
> intended for files created by the user. With the exception of the ~/ 
> Library directory, your application should never install files into  
> the user’s home directory. In particular, you should never install  
> files into a user’s Documents directory or into the /Users/Shared  
> directory. These directories should only be modified by the user."
>
> I like the idea of putting things under a ~/Library/TeX folder. I  
> would perhaps suggest ~/Library/Application Support/TeX instead  
> (http://developer.apple.com/documentation/MacOSX/Conceptual/ 
> BPFileSystem/Articles/LibraryDirectory.html).

Yes. Both are good.
In general Application Support should be used for one app in particular
for example TeXShop was expected to put its private stuff in .../ 
Library/Application Support/TeXShop
Of course, there is /Library/Safari, /Library/iTunes... that are not  
in Application Support, but they are Apple's...
We can say that /Library/TeX can gather everything related to TeX,  
including any distribution which does not depend on a specific  
application.
Finally I would say that from a developper point of view, \Library/ 
TeX is better (shorter and space character free)

I assume that every /Library/TeX folder is reserved for TeX purpose,  
for an open world, here is what it should look like

if it exists ~/Library/TeX/bin is a folder containing (links to)  
executable (CLI  or apps)
it seems a good name to gather general CLI programs related to TeX.
It satisfies the WhereToPutFiles requirements, it contains "TeX", it  
contains "bin" like /usr/bin, /usr/local/bin...

if it exists ~/Library/TeX/bin/current-distribution is a link to a  
folder containing (links to) executable (CLI  or apps)

if it exists ~/Library/TeX/distribution is a folder containing  
uniquely identified directories where installers are allowed to put  
whatever they want.

if it exists ~/Library/TeX/distribution/unique_id/bin is a folder  
containing (links to) executable (CLI  or apps)

The same for the global domain:

if it exists /Library/TeX/bin is a folder containing (links to)  
executable (CLI  or apps)

if it exists /Library/TeX/bin/current-distribution is a link to a  
folder containing (links to) executable (CLI  or apps)

if it exists /Library/TeX/distribution is a folder containing  
uniquely identified directories where installers are allowed to put  
whatever they want.

if it exists /Library/TeX/distribution/unique_id/bin is a folder  
containing (links to) executable (CLI  or apps)


A TeX distribution installer should ask the user whether it should  
install in the user domain (/Users/me) or in the local domain.
Then it whould put all its stuff in for example ???/Library/TeX/ 
distribution/TeXLive or whatsoever
then make an appropriate symlink to ???/Library/TeX/bin/current- 
distribution
where ??? stands for /Users/me or nothing
A poor man switcher (like Claus TeX switcher) could just look what is  
inside the /Library/TeX/distribution and make the appropriate links

A frontend would just have to search binaries in  ~/Library/TeX/bin:~/ 
Library/TeX/bin/current-distribution:/Library/Tex/bin:/Library/TeX/ 
bin/current-distribution.
In no way the frontend should read any profile.
This is very easy to implement, but I do not know if textmate, alpha  
X, textwrangler, would be smart enough to support that.
By the way, textmate just has to use /Library/TeX/bin/current- 
distribution and it will work better than it works now,
in the sense that it will not be sensible to a change in the  
distribution.


For the CLI, the PATH environment variable should contain

PATH="...blah:~/Library/TeX/bin:~/Library/TeX/bin/current- 
distribution:/Library/Tex/bin:/Library/TeX/bin/current- 
distribution:blah..."

such that when the terminal looks for a command, it searches for the  
first occurrence in

1: ~/Library/TeX/bin
2: ~/Library/TeX/bin/current-distribution
3: /Library/Tex/bin
4: /Library/TeX/bin/current-distribution

This is an open design and average users won't see any difference.

The names are not really important here, only the overall design.

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