[tex-live] [patch] fmtutil and formats that preload other formats

Frank Küster frank at debian.org
Thu Mar 2 11:09:40 CET 2006


Hi everybody,

some formats depend on existing formats, mostly on latex.fmt, and
load the file when they are generated.  Currently, when all formats are
created with "fmtutil(-sys) --all", this means that latex.fmt (or
whatever) will be generated twice.  The reason is that first latex.fmt
is generated, but it's lying in the temporary directory and not found by
kpathsea.  When it comes to jadetex.fmt, latex.fmt is not found,
mktexfmt is called, latex.fmt is put into TEXMF(SYS)VAR, and jadetex.fmt
is created.  When all is finished, the first latex.fmt is moved to
TEXMFSYSVAR. 

The problem with that is not only that latex.fmt is generated twice,
which just takes some time.  More annoying is the fact that in such a
case, 

fmtutil-sys --all >/dev/null

spits out the TeX output of the second generation of latex.fmt on the
terminal (because mktexfmt is supposed to only echo the generated
filename on stdout).

fmtutil sets and exports TEXINPUTS="$tmpdir:$TEXINPUTS", but that is not
sufficient.  One has to set TEXFORMATS, too.  I therefore suggest the
following patch, based on teTeX-3.0's version:

--- texk/tetex/fmtutil	2006-03-02 10:48:46.000000000 +0100
+++ texk/tetex/fmtutil.new	2006-03-02 10:48:21.000000000 +0100
@@ -28,6 +28,7 @@
 
 ###############################################################################
 # program history:
+#   Do Mar 02 10:42:31 CET 2006 add tmpdir to TEXFORMATS
 #   Sa Jan 15 18:13:46 CET 2005 avoid multiple variable assignments in one statement
 #   Di Jan 11 11:42:36 CET 2005 fix --byhyphen with relative hyphenfile
 #   Fr Dez 31 16:51:29 CET 2004 option catcfg added (for being called by texconfig)
@@ -519,6 +520,10 @@
   # due to KPSE_DOT, we don't search the current directory, so include
   # it explicitly for formats that \write and later on \read
   TEXINPUTS="$tmpdir:$TEXINPUTS"; export TEXINPUTS
+  # for formats that load other formats (e.g. jadetex loads latex.fmt), 
+  # add the current directory to TEXFORMATS, too.  We could do the same for
+  # MFBASES and MPMEMS, but it doesn't seem to be necessary currently.
+  TEXFORMATS="$tmpdir:$TEXFORMATS"; export TEXFORMATS
 
   setupTmpDir
   cd "$tmpdir" || {


Regards, Frank
-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)



More information about the tex-live mailing list