[l2h] [BUG][PATCH] TEXINPUTS handling.

Jan van Dijk jan@etpmod.phys.tue.nl
Sun, 29 Sep 2002 05:28:11 +0200

[please CC me. I am not subscribed and don't know where to read it online]

	Dear latex2html developers,

As I know _nothing_ about Perl, nor about latex2html I am a bit reluctant to 
make strong statements. However:

Is it me, or the handling of the environment variable TEXINPUTS completely 
broken in latex2html? If this is true, this problem seem to exist for more 
than a couple of years... 

The argument which represents the TEXINPUTS variable which is passed to 
texexpand is unrelated to what I have in my environment, just before invoking 
latex2html (I added some print statements to check this).

It seems that the internal variable TEXINPUTS has been confused with the 
environment variable $ENV{'TEXINPUTS'} in the final assignment in the 
subroutine absolutize_path. What happens at present is that the environment 
variable with this name is modified, while the _internal_ variable is later 
passed to texexpand (using its -texinputs option).

The one-liner patch below (against the latex2html-2002-2 drop, but probably it 
applies to older versions as well) fixes the problem by rather assigning the 
absolutized path list to the $TEXINPUTS variable.

By the way: Latex2Html rocks, thanks! Our (quite complex) generated latexfiles 
are converted almost perfectly. If only somebody could implement the 
listings.sty ;-) 

	Kind Regards,

	Jan van Dijk

eldhcp16:/usr/local/src/latex2html-2002-2 # diff -u latex2html.orig latex2html

--- latex2html.orig     Sat Sep 28 19:08:13 2002
+++ latex2html  Sat Sep 28 19:09:01 2002
@@ -1256,7 +1256,7 @@
     if ($ROOTED) {$TEXINPUTS .= "$envkey$FIXEDDIR"}
     $TEXINPUTS = &absolutize_path($TEXINPUTS);
-    $ENV{'TEXINPUTS'} = join($envkey,".",@_,$TEXINPUTS,$ENV{'TEXINPUTS'});
+    $TEXINPUTS = join($envkey,".",@_,$TEXINPUTS,$ENV{'TEXINPUTS'});

 # provided by Fred Drake