Re: Reinitialization of kpathsea after \write18
Zhang Lin-bo <[email protected]> Tue, 7 Dec 2004 08:32:10 +0800 (CST)
| Newsgroups | gmane.comp.tex.tetex.beta |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Thanks for your information. So this feature is missing
in current teTeX implementation :(
In fact I have tried with the 'mktextfm' script.
The problem is I have to modify the 'mktextfm' script, or
change the PATH (or define a shell function) to execute a
different script. I like better \write18 because it allows
to work with existing TeX installation without any change.
I made some more tests and figured out that in fact, the
paths for TFM files seems to be refreshed after executing
\write18, but the paths for TeX files are not , and I need
the latter (I believe it is the same with mktextfm).
I think refreshing paths for tex files after \write18 and
mktextfm (or do it with a option for performance reason)
might be useful in many cases (this is what MikTeX does,
I believe), and it should be easy to modify the code
to implement it.
The problem can be easily seen by texing the following small
example with the '-shell-escape' option.
%---------------------------------- cut
\immediate\write18{
set -x;
mkdir -p $HOME/texmf/tex;
echo "Hello." > $HOME/texmf/tex/xxxxxxxx.tex;
texhash $HOME/texmf;
grep xxxxxxxx.tex $HOME/texmf/ls-R
}
\openin0 xxxxxxxx.tex %
\immediate\write16{***}
\immediate\write16{*** The file is \ifeof0 not \fi found}
\immediate\write16{***}
\closein0 %
\immediate\write18{
set -x;
/bin/rm -f $HOME/texmf/tex/xxxxxxxx.tex;
texhash $HOME/texmf
}
\bye
%---------------------------------- cut
On Mon, 6 Dec 2004, Vladimir Volovich wrote:
> "ZL" == Zhang Lin-bo writes:
>
> ZL> So my question is: is it possible to add the above feature to the
> ZL> incoming new version of teTeX (3.0?)? (or maybe I'm not doing
> ZL> things the right way?)
>
> kpathsea has a feature of calling the script "mktextfm" when TeX fails
> to find a TFM file, after which it re-initializes the search paths for
> TFM files. So why don't you want to use this already existing mechanism?
>
> Best,
> v.
>
--