At 1:21 PM -0400 12/5/98, Fred L. Drake wrote:
>Uli Wortmann writes:
> >
> >     Fred> Override.pm overrides it.  Simply removing the definition in
> >     Fred> Override.pm makes things work.  This seems to be the most
> >
> > Hmmh, just a wild guess: I discovered that the calls to getcwd from
> > within latex2html use a sloppy syntax, that is &getcwd instead of
> > getcwd(). This comes from days before getcwd was defined in
> > Override.pm. Can you check that your call in question does indeed call
> > getcwd()?
>  The calls in question are *in* Override.pm, and use the old syntax.
>Changing these to the new syntax doesn't help; searching for files
>along a path ($TEXINPUTS) doesn't work.  The version of getcwd()
>defined in Override.pm just doesn't work for me, and
>make_directory_absolute() seems pretty close to necessary from where
>I'm standing.

There seem to be 3 issues here:

  A.  does  getcwd()  work properly.
  B.  using the value of  $TEXINPUTS  within  texexpand .
  C.  adjusting the value of  $ENV{'TEXINPUTS'} for  texexpand .


For A:

Looking inside Override.pm  the calls for  'os2' use a syntax:
        $orig_cwd = getcwd;

Should this be:  getcwd()  or  &getcwd()  or  &getcwd  ?
given that there is a subroutine definition:  sub getcwd {...
within the same module.

Which are valid syntax ?  Which ones should be identical ?
...using  use Cwd ?  ...using  use POSIX ?


I don't have any machines running  OS/2 so cannot test that case.
I'll make whatever edits are needed but someone has to tell
me precisely what is required.


The default Unix version uses  &getcwd() .
Does this cause anyone any trouble ?
If so, find an alternative that works
and tell me the value returned by  $^O  or  $OSNAME .

> >     Fred> portable and simplest fix.  Is there a platform for which
> >     Fred> Cwd::getcwd() isn't a working version of getcwd()?
> >
> > Yup, at least mine :-(

Please test the 4 different syntax variants:
        getcwd  &getcwd  getcwd()  &getcwd()
with each of the modules  Cwd  and  POSIX .


One more comment:
 Camel Book (2nd ed.) p387  says that  cwd()  is the safest way
to get the current working directory.
Should this replace  getcwd()  everywhere ?



For B.

Currently  $TEXINPUTS is not even known within  texexpand  !!
(at least not on my system) and it isn't used anywhere.
Instead it used $ENV{'TEXINPUTS'} which I think is wrong.

I've tested a version with a  -texinputs  switch that allows
the  latex2html  script to pass the value of $TEXINPUTS to  texexpand .
However this also requires a re-ordering of some code within  texexpand .




For C.

The environment variable  TEXINPUTS  is intended for LaTeX and  dvips etc.
to find files that they need. IMHO it should *not* be used by LaTeX2HTML
to find \input or \include files.

Reason:
  It may result in files withing the TeX/LaTeX/texmf hierarchy
  being matched, and erroneously included as part of a LaTeX2HTML job.

(BTW, note that when using Web2C it is best that TEXINPUTS does *not*
include any directories within the texmf hierarchy,
for these are found using a different mechanism.
Thus it is safe, but IMHO still conceptually wrong,
to use TEXINPUTS this way with LaTeX2HTML.)


Instead those directories to be searched automatically for commonly-used
input-files should be specified using the  $TEXINPUTS  variable.
This requires a mechanism for this to be used within  texexpand
such as I suggested above for B.

Of course these directories may be needed by LaTeX when running  images.tex
so the value of  $ENV{'TEXINPUTS'}  may still need to be adjusted locally,
prior to image-generation.  There should be *no other reason*
why LaTeX2HTML uses  $ENV{'TEXINPUTS'} at all.



Comments please.

I won't commit any changes to  texexpand  until favourable responses
indicate that such changes should indeed be made.




>  On a related note, l2h doesn't search for the "main" file along
>$TEXINPUTS; is there a reason for that?  I'm having to give both the
>path *and .tex extension* to use a main document file located along
>$TEXINPUTS.

OK, I see what you mean.
LaTeX can find the main document file not in the current directory,
so why not LaTeX2HTML ?

Currently the call to  texexpand  from  latex2html  gives a full path
to the main document file. So should we pass :
  1.  the filename only --- let  texexpand find the full path
OR
  2.  the full path still, but with  latex2html  having determined this.



If you have strong views on these issues, please respond ASAP.


All the best,

        Ross Moore


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ross Moore                             email: [EMAIL PROTECTED]
Mathematics Department                 phone:      +612 9850 8955
Macquarie University                     fax:      +612 9850 8114
Sydney, NSW 2109                      office:             E7A-419
Australia              WWW: http://www-math.mpce.mq.edu.au/~ross/

                ***************************

for the best in (La)TeX-nical typesetting and Web page production
join the  TeX Users Group (TUG) --- browse at  http://www.tug.org

                 <[EMAIL PROTECTED]>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Reply via email to