[l2h] Old bug not fixed

Ross Moore ross@ics.mq.edu.au
Sat, 11 Aug 2001 06:26:58 +1000 (EST)

> Bruce Miller wrote:
> > Strictly speaking, it is _NOT_ a bug in latex2html.
> > It's a bug in RedHat's installation of Perl.
> > Namely, Perl requires that the db used (for tying to hashes)
> > must allow empty keys, but RedHat overrides or ignores the warning.
> >
> > Of course, it still would be worthwhile for l2h to work around ...

I've just committed some changes to  latex2html.pin  at latex2html.org
(i.e., the CVS archive at Bayreuth).
> Right!  Please let's have this change.
>      $global{$key}-- if $making_name;
> to
>     $global{$key}-- if ($key && $making_name);

This is included.
(Sorry, I should have done this a couple of weeks ago.)
> and
>        #ensure no more than 32 characters, including .html extension
>         $title =~ s/^(.{1,27}).*$/$1/;
> to
>         #ensure no more than 55 characters, including .html extension
>         $title =~ s/^(.{1,50}).*$/$1/;

No; I'll have to veto this suggestion.

The $title here is the file-name for a file in which the HTML is to be written.
Hence it is a name that will appear in the browser, and will be used when a surfer
tries to save the HTML source from the browser.
But some file-systems limit filenames to 32 characters, hence the restriction.

Note that it is a restriction for the surfer's system, not for the system
on which the HTML pages are generated.

Also note that the $title here should *not* include directory delimiters.
If you need long names because you are including a directory path,
then that should be done differently.

Here's the code-block:

    if ($title) {
        #ensure no more than 32 characters, including .html extension
        $title =~ s/^(.{1,27}).*$/$1/;
        join("", ${PREFIX}, $title, $EXTN);
    } else {

Note that there is a $PREFIX variable.
Perhaps you can use this for longer names which include directory paths.

Also note that if you are generating HTML files for a specialised purpose
that will be used on a fixed system where you know that there will
be no problem with long names, then ...

 ... you can write a modified subroutine &make_name that overrides
the built-in one, by removing the name-length restricion. 
Have this in your .latex2html-init  of  other configuration file.
I don't think that it belongs in the main latex2html script.

Hope this helps,

	Ross Moore

> Bob Williams
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html