[l2h] -local_icons bug

Erling D. Andersen Erling D. Andersen" <e.d.andersen@twi.tudelft.nl
Sun, 21 Mar 1999 16:49:25 +0100


Hi,

I have installed the DOS version of latex2html. Unfortunately -local_icons does
bot
work. At  least in my installation the icons are not copied to the destination
directory.

I am have never worked with PERL before but this new copy_icons
procedure seem to fix the problem (lines with # are the old lines):

sub copy_icons {
    local($icon,$_);
    print "\nCopying navigation icons ... ";
    foreach (keys %used_icons) {
        # each entry ends in gif or png
        if ($ALTERNATIVE_ICONS) {
#           &cp("$ALTERNATIVE_ICONS/$_", ".")
            &cp("$ALTERNATIVE_ICONS/$_","$_")
                if (-e "$ALTERNATIVE_ICONS/$_") && !(-e "$_");
        } elsif (/(gif|png)$/) {
#           &cp("$LATEX2HTMLDIR/icons.$1/$_",".")
            &cp("$LATEX2HTMLDIR/icons.$1/$_","$_")
                if (-e "$LATEX2HTMLDIR/icons.$1/$_") && !(-e "$_");
        }
    }
}

It seems that replacing "." by "$_" makes it works.

Regards, Erling