[tex-k] note from Prof Knuth
Karl Berry
karl at freefriends.org
Wed Nov 1 19:52:25 CET 2006
Dear Dr. Knuth (and Maggie too),
My apologies for the ridiculously late reply. You may well have solved
this already, but in case you haven't, here are my ideas on the painful
problem of the formats being regenerated. (I wish I could come over to
Stanford and fix it for you, instead of you having to waste a moment on
this junk!)
(Thomas, please chime in if I'm making mistakes or you have other ideas.)
My basic guess is that a different texmf.cnf is being found all of a
sudden for some reason (network mount change?), or values in texmf.cnf
have changed.
The mktexfmt script is another name for fmtutil. fmtutil determines
where to put the generated fmt's with this:
: ${MT_TEXMFVAR=`kpsewhich -var-value=TEXMFVAR`}
destdir=$MT_TEXMFVAR/web2c
If MT_TEXMFVAR is set in the environment (probably not, but may as well
check), that's used. (Or the --destdir or --fmtdir options are
specified, which they aren't.) Otherwise, kpsewhich -var-value=TEXMFVAR
is run, which is presumably returning /home/uno/.texmf-var, which seems
reasonable -- that location is the default for TEXMFVAR in teTeX 3.0.
Now, when TeX starts up, it tries to find the .fmt file along the path
TEXFORMATS. Again, if an envvar is set (again, probably not, but may as
well check), that will be used. If not, it'll use the value from some
texmf.cnf. By default, of course TEXMFVAR is included in TEXFORMATS.
I'm guessing that the TeX run is finding a different texmf.cnf than
fmtuil, and hence a different TEXFORMATS than the fmtutil run.
Please tell me how to diagnose the problem so that I can
tell him what needs to be fixed.
Run the two commands:
env KPATHSEA_DEBUG=-1 mktexfmt tex.fmt >&/tmp/mtf.out
env KPATHSEA_DEBUG=-1 tex \\bye >&/tmp/tex.out
(the output will be voluminous.)
I have hopes that somewhere in the output will lie the answer. I
certainly wouldn't want you to waste your time plowing through this
debugging junk; please send the files to me and I will try to diagnose
(more quickly than this response!). However, if you want to take a
quick peek, something like
grep tex.fmt /tmp/mtf.out /tmp/tex.out
might show an obvious discrepancy between where fmtutil is writing and
tex is reading. Then it's a matter of reading backwards in the log
to (hopefully) determine where the bad value is coming from.
Other possibly useful information:
kpsewhich texmf.cnf
should show the texmf.cnf being used; it'd be good to send that file, too.
And:
kpsewhich -var-value=TEXMF
should list all the texmf trees being used.
P.S. There's a file /var/lib/texmf/ls-R that hasn't changed since
As you surmise, it doesn't sound like it's related.
As you can see, this is an aggravating problem. I'm very sorry it's
happened to you! I hope I don't turn out to be totally off base in my
suggestions.
Best wishes,
Karl
P.S. As always, thanks for TeX & MF, and good luck with volume 4 :).
More information about the tex-k
mailing list