[l2h] 2 bugs in l2h

Ross Moore Ross Moore <ross@ics.mq.edu.au>
Mon, 4 Dec 2000 23:56:04 +1100 (EST)

> > No; a better place to do this is at the end of:  sub find_prog
> > within  config.pl .
> >     return "\"$prog\"";
> >            ^^^     ^^^  ---------  insert these quotes.
> > Please try this, and report back with your findings.
> Yes, it is definitely better, then in the check_file.

While this works during installation, to check the versions
of dvips  and any other executables, it actually creates more problems.
Indeed, because it writes the extra "..." into  cfgcache.pm 
then subsequent uses of configure fail everywhere.
(That's what happens under Unix, so I guess it is similar for you.)

This means that the fix is 2-fold, and must be done specifically
for the applications tested by  config.pl .

e.g. (in config.pl)

  foreach $try (@try_opts) {
    my ($stat,$out,$err) = &get_out_err("\"'$kpsewhich'\" $try");
                                         ^^^          ^^^

> >> The reason is that when we give $cmd to redir.pl, quotes disapear,

... yes, but not *both* sets of quotes, in the line above.

The 2nd part of the fix is then within  l2hconf.pin ,
where you can choose to use the values read from  cfgcache.pm 
or can override with a specific path, including extra quotes as needed.

Only do this if you find that LaTeX2HTML jobs fail because applications 
are not found.  Installation does not need this, but it may be needed
at run-time, depending upon platform and/or shell.

The problem is caused by loading what are essentially system applications
into a directory tree in which space-characters occur within the names.
Since spaces are delimiters for constructed commands, then this is not
an appropriate thing to do. (No Unix sysop would ever install that way,
even though spaces are valid in filenames; it creates too many hassles. ;-)

My advice is to move the MikTeX installation tree to another branch of
your file-system tree.

> >> althouth now our path with spaces lives in ARGV[0]. So, I think we
> >> must add
> >>
> >> $ARGV[0]="\"$ARGV[0]\"";
> > this didn't help, with my testing under Unix.
> Really? You tried changing find_prog (check_prog) and
> changing redir.pl TOGETHER (if you do not do the first thing,
> ARGV[0] is  "c:\Program")? I wondered.

The problem is that some tests legitimately have an argument,
which comes as part of $ARGV[0] .
By putting quotes at this stage, those tests are doomed to fail.

> By the by, I understood, that one can temporarily spile up it
> by specifying $abs_path_names=0. It works, if $extrapath is not used.

If that works, then fine; use it by all means.  However, I think that moving
the TeX installation is probably a more reliable fix. 

Hope this helps,

	Ross Moore

> Roman