[OS X TeX] MacTeX 2007 setup query
Rowland McDonnell
rjmmnet-lists at yahoo.co.uk
Mon Feb 11 09:24:49 CET 2008
>
> On 9 feb 2008, at 07:16, Rowland McDonnell wrote:
>
> >> TeX Live has provisions for a local texmf tree which can be
> >> accessed by all users on a machine. This tree is placed in
> >>
> >> /usr/local/texlive/texmf-local
> >>
> >> This tree is NOT overwritten when the 2008 version is installed.
> >
> > We don't know that because the 2008 installer has not been
> > released. In any case, that directory tree might be overwritten
> > some other way.
> >
> > Am I being paranoid and excessively mis-trustful? Could be - but
> > then again, I've had a lot of bad experiences with installers.
>
> This is the way the TeXLive installer has worked for years.
Perhaps so, but the way MacTeX 2006 worked is that
/usr/local/teTeX/share/texmf.local/ was used by MacTeX.
Is this behaviour going to re-appear in a future version of MacTeX?
That's my main concern.
> The
> standard TeXLive installer is a shell script. With the number of shell
> functions they use it is a bit tricky to figure out what they do,
Trickier in this case, where the normal user has no idea how to view the
script (although I see you tell me where it is later on in the email).
> but
> the TeXLive installer indeed does not touch the directory if it is
> there already.
Righto.
> I just checked the postflight script in the MacTeX installer package
> (2007 edition), and the tree is created there only if it doesn't exist
> already (see end of message).
>
> And since the author of MacTeX 2008 is making this statement,
Is that you or Richard Koch?
> I think
> you can be pretty sure this statement isn't going to change for the
> next release.
Okay. That'll do.
> > I'd like to have my local texmf tree in a position that the MacTeX
> > installer and so on don't even think about to avoid the risk of
> > having my data messed about with.
> >
> > On the other hand, is there /good/ reason to think that it's a safe
> > place to put local additions for all users?
>
> This is what the TeXLive documentation says about this tree:
>
> TEXMFLOCAL
> This tree is where the TEX system (not as part of the initial
> installation, but rather as time goes by) puts non-version-specific
> files, primarily fonts. The default value is /usr/local/texlive/texmf-
> local, independent of the current TEX Live release, because it’s also
> the recommended location to put any local packages or configuration
> settings. (http://tug.org/texlive/doc/texlive-en/live.html)
Which sounds to me like a /very/ good reason for having my own
system-wide additional directory tree separate to texmf-local, and not
put any of my stuff in texmf-local.
When the documentation says `the TEX system puts non-version-specific
files, primarily fonts', what does the `putting'?
Is that a reference to some sort of automation I know nothing about? If
not, what does it mean?
[I am not used to `the TeX system' doing anything but sitting there
being manually maintained, and I'm not happy at the thought that my
local additions are going to be mixed up with some sort of automated
system for adding and deleting files.]
> I think there are four options for you:
>
> * Modify texmf.cnf to point TEXMFLOCAL to your tree
>
> * Modify texmf.cnf to add your tree to the search list (similar to how
> you do it now). This has the advantage that TeX & Co will always
> search the disk, thus not requiring a mktexlsr call after adding a
> package. Depending on the size
No matter what, it's bound to be quicker than OzTeX 3 running on my old
Performa 475. ;-)
(on the other hand, maybe a mktexlsr to build an index would be useful -
but I'll leave that for another day)
> * Create a symbolic link to your tree at the location /usr/local/
> texlive/texmf-local which points to your tree.
That's roughly what I've done as a stand-in measure; except I've used a
MacOS alias.
> Of course if you
> update, you'll have to temporarily remove the link to completely
> eliminate the link between tex and your tree.
Why? Surely the worst that's likely to happen is that my link will get
replaced?
> * Put your tree in the TeXLive location /usr/local/texlive/texmf-local
> and keep a backup. I don't know how frequently you change items in
> this shared tree, but this location is covered by Time Machine on
> Leopard.
I won't be using MacOS X 10.5 - no Classic.
> You'll probably go with the second option, as it is the most
> convenient from an end-user perspective.
Ish, ish. Using an alias to point /usr/local/texlive/texmf-local at `my
local tree that exists somewhere else' is easier to set up. But that's
a bit dodgy because of the reference in the docs to the TeX system
adding stuff to the texmf-local tree, not to mention MacTeX 2006's way
of using it for `MacTex 2006 stuff'.
> On line 114 of /usr/local/texlive/2007/texmf/web2c/texmf.cnf the TEXMF
> variable is set:
>
> TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!
> $TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
>
>
>
> Add your tree before this line:
>
> TEXMFRM = /Users/Shared/texmf.rjmm
Okay (I'd've understood `Add your tree before that line' rather more
easily).
> and modify line 114 to
>
> TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFRM,!!
>
$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
Okay - that's straightforward. I've made that modification, and a basic
`Can I LaTeX a file using a package from my additional tree' test works.
> I don't think you'll need to modify SYSTEXMF.
texmf.cnf says of this list:
`The system trees. These are the trees that are shared by all users.'
Given that, how can it be right to not modify it?
> This tree is used for
> generated fonts, and the default will be just fine.
Eh? But multiple trees are specified by SYSTEXMF, and surely the
texlive designers weren't so mad they arranged to put generated founts
in multiple places?
The texlive documentation states that the default place to put founts is
the TEXMFVAR tree - which isn't listed in SYSTEXMF.
texmf.cnf specifies of SYSTEXMF:
`if a tree appears in this list, the mktex* scripts will use VARTEXFONTS
for generated files, if the original tree isn't writable; otherwise the
current working directory will be used.'
Which tells me two things about where generate founts are put:
1) It's more complicated than `they're just put here'
2) I have no idea where generated founts are put.
Any idea how can I find out? texmf.cnf isn't a lot of help on this one,
and the texlive documentation is rather confusing for someone new to it
like me.
[btw, if MacTeX 2007 deals with generated founts in a similar way to the
previous installer, I'll /definitely/ be wanting to make some changes.
But that'll be a problem for another day - just getting basic operation
out of MacTeX 2007 is my aim at the moment.]
> Besides you'll
> need to make sure that some permissions are set correctly if a tree is
> going to be suitable for this type of use. At least that is how I read
> the comments.
Write permissions will be needed for something or other, possibly. But
the MacTeX I've got installed at the moment seems to put generated
founts in a single place (not the multiple trees specified by the
SYSTEXMF variable) - a `user specific temporary directory' from which
they seem to be removed at some point. Certainly, I've had TeX
re-generated founts that it's generated before. I'd like to be able to
keep generated founts - but as I explain above, that's a problem for
another day.
> This is very similar to what you had figured out, except a missing
> comma.
?? Missing comma? Where? (I ask because I want to understand things
properly, and I can't see anything like a missing comma - which implies
that I've failed to understand the syntax properly).
> There is a fifth option (cue Monty Python jokes, I started out with
> three options), but this requires the execution of a single command
> for each user on your system. Beyond that, there is no configuration
> to be changed. The disadvantage is that there will be no separate per
> user texmf tree. Execute
>
> ln -s /Users/Shared/texmf.rjmm ~/Library/texmf
>
> This only works if you don't already have a private tree.
Righto.
> > Either that, or could someone convince me that it's safe to use the
> > standard mechanism for a local system-wide texmf tree? At the
> > moment, I'm unconvinced.
>
> Given our previous encounters on the list, I doubt that we can. It
> will however work without a hitch on future updates.
I'm still concerned about texmf-local being the place that `the TeX
system' puts files in. That suggests I'll have some hitches due to
automation getting in my way - do you know what automation I might run
into? If I knew what automation existed, I could read its
documentation. I can see no reference to such automation in the texlive
documentation, but I could easily have missed something.
(the texlive documentation is definitely `optimised for Unix
experts'...)
> This is the script fragment that creates the tree right after
> installation. You can find it in /Volumes/TeXCol2006-2007/mactex/
>
MacTeX-2007.mpkg/Contents/Packages/TeXLive-2007.pkg/Contents/Resources/
> postflight on the MacTeX 2007 DVD:
(or just plain:
MacTeX-2007.mpkg/Contents/Packages/TeXLive-2007.pkg/Contents/Resources/
postflight
for those of us who just have the installer)
> # Add /usr/local/texlive/texmf-local if completely absent
>
> if [[ ! -d /usr/local/texlive/texmf-local ]]; then
> mkdir /usr/local/texlive/texmf-local
> mkdir /usr/local/texlive/texmf-local/bibtex
> mkdir -p /usr/local/texlive/texmf-local/bibtex/bib/local
> mkdir -p /usr/local/texlive/texmf-local/bibtex/bst/local
> mkdir -p /usr/local/texlive/texmf-local/dvips/local
> mkdir /usr/local/texlive/texmf-local/fonts
> mkdir -p /usr/local/texlive/texmf-local/fonts/source/local
> mkdir -p /usr/local/texlive/texmf-local/fonts/tfm/local
> mkdir -p /usr/local/texlive/texmf-local/fonts/type1/local
> mkdir -p /usr/local/texlive/texmf-local/fonts/vf/local
> mkdir -p /usr/local/texlive/texmf-local/metapost/local
> mkdir /usr/local/texlive/texmf-local/tex
> mkdir -p /usr/local/texlive/texmf-local/tex/latex/local
> mkdir -p /usr/local/texlive/texmf-local/tex/plain/local
> mkdir /usr/local/texlive/texmf-local/web2c
> chmod -R 755 /usr/local/texlive/texmf-local
> fi
>
> The first line is the important one: "if the directory /usr/local/
> texlive/texmf-local does not exist then…" See man test for the test (-
> d) itself. The 2008 version will be created by adding a few lines to
> the end of this script, the beginning will be used unaltered.
Well, that's okay for the next version, I suppose. <shrug> Just so
long as I can be sure that nothing will clobber my local extras
directory in between major updates, I expect things will be okay.
However, using your suggestion on how to add a new local extras texmf
tree to the search path is probably best - and it's what I've done.
So stage 1 in `setting up MacTeX 2006' is over... I might have a
usefully working system in a week or two. ;-)
Thanks,
Rowland.
More information about the macostex-archives
mailing list