[OS X TeX] Local additions repository
Bruno Voisin
bvoisin at mac.com
Thu Jan 18 18:38:15 EST 2007
Last post from me today I promise.
I was thinking about where to put local customizations of TeX. MacTeX
recommends ~/Library/texmf, which has several advantages:
- You can create folders and move files and folders directly in the
Finder.
- You don't need to run texhash (= mktexlsr) afterwards.
- In case you have several TeX distributions installed (I have both
gwTeX and TeXLive-2007, and for some time at least teTeX), all of
them will see and use that very same ~/Library/texmf.
This comes at a price though: the customizations are specific to the
user in whose account they are installed. Imagine you have a
household, or a student dorm, with several TeX users, all of whose
share the same Mac, having separate accounts on it: the customization
needs to be repeated for each account.
Or imagine you decided for once to follow the recommendation of
security gurus (I don't), and use an admin account for installing
stuff and a non-admin account for daily work, in order to minimize
the risk of compromising your Mac by accident. You cannot install the
TeX customizations in the admin account, and use them in the non-
admin account. Moreover, in order to be able to run updmap(-sys) and
fmtutil(-sys) and make them create map and format files where they
ought to, you must use the admin account in order to be able to run
sudo; which makes it impossible to place font and map files in the ~/
Library/texmf directory of your non-admin account, and get TeX to use
them in this account.
On the other hand, each distribution includes a location for putting
local customizations: /usr/local/teTeX/share/texmf.local for teTeX, /
usr/local/gwTeX/texmf.pkgs for gwteX, and /usr/local/texlive/texmf-
local for TeX Live. (The TeXDist structure simplifies this, by
providing a unique symlink /Library/TeX/Distributions/.DefaultTeX/
Contents/TexmfLocal to the corresponding location in the currently
active distribution.) By putting customizations there, you install
them system-wide, namely they are available to all account owners on
your mac in one go.
This too comes at a price:
- You cannot access this location directly in the Finder: you must
use Cmd-Shift-G, or switch to Terminal and use cd.
- You cannot create folders and move files and folders there as you
would normally do in the Finder: folder creation wouldn't work at
all, and attempts to move files and folders would bring up an
authentication dialog in some but not all cases (moving files from a
protected location to another protected location doesn't seem to
work). instead, you must switch to Terminal and use mkdir, mv, cp and
rm.
- You need to run texhash afterwards.
- You need to repeat your additions in the TexmfLocal repositories of
all the distributions that are installed.
In order to make things simpler, I was wondering whether it would be
possible to use symlinks as is done for establishing the TeXDist
structure, but reversed:
- The TeXDist structure creates, in essence, symlinks to the
"customization directories" of each installed distribution (such as /
Library/TeX/Distributions/TeXLive-2007.texdist/Contents/TexmfLocal
pointing to /usr/local/texlive/texmf-local), and make /Library/TeX/
Distributions/.DefaultTeX/Contents/TexmfLocal a symlink pointing to
the TexmfLocal symlink of the currently active distribution.
- Couldn't instead the TexmfLocal directories of all the installed
TeX distributions (/usr/local/teTeX/share/texmf.local for teTeX, /usr/
local/gwTeX/texmf.pkgs for gwteX, and /usr/local/texlive/texmf-local
for TeX Live) be turned into symlinks to a unique real directory /
Library/TeX/Local, where the additions would be installed?
In this way, one could create folders and manipulate files and
folders inside /Library/TeX/Local as one normally does in the Finder,
any addition put there would be system-wide, and the additions
wouldn't need to be repeated for each distribution.
I imagine there are good reasons why things have not been set up in
this way: incompatibility with the TDS, with the workings of TeX
Live; incompatibility with the TeXDist structure; or security
implications. And given the various distributions include different
components, an addition for one distribution would be redundant with
the built-in content of another distribution.
But I thought the idea should be mentioned anyway.
Bruno Voisin
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list