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

-- 
Olaf Weber

               (This space left blank for technical reasons.)

Reply via email to