[tex-live] Re: tex4ht bugfix
Olaf Weber
olaf@infovore.xs4all.nl
27 Jan 2003 22:07:43 +0100
Eitan Gurari writes:
> Would a code similar to the following within tex4ht.c work?
> system("TEX4HTFONTSET={alias,iso8859/2}; export TEX4HTFONTSET");
> htfname= kpse_find_file (name, kpse_program_text_format, 0);
No: the system(3) call is executed in a "subshell" which means that
changes to environment variables in the subshell are not propagated
back to the parent.
What _may_ work is
xputenv("TEX4HTFONTSET", "{alias,iso8859/2}");
which puts the definition into the environment of the current process.
(xputenv() is a variant of putenv(3) included in kpathsea.)
I think that due to the caching done by kpathsea, you'd have to put
these values into the environment before the first call to
kpse_find_file() or kpse_open_file().
It might make sense to have tex4ht set the "client_path" of the
kpse_format_info structures it uses before initializing them. (I'm
open for suggestions for a better -- that is, explainable --
interface.)
[...]
> I wonder whether I can help compiling tex4ht.c for kpathsea on my
> unix account. I tried the command line
> gcc -o tex4ht tex4ht.c -DKPATHSEA -I/usr/local/teTeX/include
> -L/usr/local/teTeX/lib
> -L/usr/local/teTeX/include/kpathsea
> at a private directory, and got complains of the form
> config.h: No such file or directory
> c-errno.h: No such file or directory
> The files are at /usr/local/teTeX/include/kpathsea.
You may want to retrieve
http://www.xs4all.nl/~infovore/tex4htk.tgz
which is a cut-down version of the current TeX Live development source
tree: it contains just kpathsea and tex4ht, with enough supporting
files that you should be able to do "./configure" and "make" to
compile it. This may make experimentation easier.
--
Olaf Weber
(This space left blank for technical reasons.)