Re: Reinitialization of kpathsea after \write18

Zhang Lin-bo <[email protected]> Wed, 8 Dec 2004 06:26:59 +0800 (CST)
Newsgroups gmane.comp.tex.tetex.beta
Message-ID <[email protected]>
Thanks for the explaination. It should solve my problem.
I'll have a try :)

But even with TFM files, it might be useful to reload the
ls-R's, because it is possible to create more than just
one TFM file in one call of mktextfm.

LB

On Tue, 7 Dec 2004, Olaf Weber wrote:

> Thomas Esser writes:
>> On Mon, Dec 06, 2004 at 09:38:43PM +0800, Zhang Lin-bo wrote:
>
>>> I'm trying to use the \write18 function to implement a feature to
>>> create on the fly the configuration files and font metric files for
>>> a given Chinese font (the newly created files are stored in the
>
>> Hm... This is more a matter for the kpathsea / web2c maintainer (Olaf
>> Weber), since teTeX follows his releases. For 3.0, no such feature
>> is planned. I wonder, however, why you can't simply omit !! before
>> $HOMETEXMF, so files can be found even if not present in kpathsea's
>> hash table.
>
> kpathsea will not read an ls-R file more than once, instead it
> explicitly insert in its hash table the name of a file produced by any
> of the mktex* scripts.  For \write18, no such thing is done (kpathsea
> doesn't know about \write18 at all).
>
> Basically, the problem you're seeing is that if there is an ls-R file
> kpathsea will not search the disk unless the "must_exist" flag is set.
> That flag is set for tfm files, but not for \openin.  (This is because
> \openin is used for things like LaTeX .aux files, which do not always
> exist.  The most expensive search is to pound the disk for a
> non-existent file.  Arguably this is an over-optimization.)
>
> To get this to work you have to do two things:
>
> - Remove any !! for $HOMETEXMF.
> - Remove $HOMETEXMF/ls-R.
>
> Now kpathsea will always do a disk search in $HOMETEXMF.
>
>> Thomas
>
>

--