Re: Reinitialization of kpathsea after \write18

Zhang Lin-bo <[email protected]> Thu, 9 Dec 2004 08:57:52 +0800 (CST)
Newsgroups gmane.comp.tex.tetex.beta
Message-ID <[email protected]>
Removing ls-R does work in my case. But I think there's
a small inconsistency in refreshing the ls-R files: when
a directory listed in $TEXMF doesn't have the '!!' prefix
it should be skipped by 'mktexlsr' (unless when it's
explicitly specified, of course) but actually it is not.

Thanks for all informations provided (I knew little about
the kpathsea stuffs before).

Best,
LB

On Wed, 8 Dec 2004, Zhang Lin-bo wrote:

> 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
>>
>>
>
> --
>

--