[l2h] File names
Bruce R Miller
Bruce R Miller" <miller@cam.nist.gov
Wed, 30 Jun 1999 13:03:52 -0400
On Jun 13, 8:26pm, Bek Oberin wrote:
> Subject: [l2h] File names
>
> I want to have the file names in a personalized format, like
> this:
>
> <secnumber>-filename
>
> or
>
> <secnumber>.<subsecnumber>-filename
>
> depending if it's a subsection or not. I have a hook that correctly
> generates the filename, but I can't figure out how to put the
> secnumbes in it. Here's the sub:
[...]
It would be nice to be able to directly get to structural information about
the document, but currently the only way I know of is to force the titles
to include the section numbers in themb by
$SHOW_SECTION_NUMBERS = 1; # DO use section numbers in HTML
Then you can extract the information you need from the titles using something
like this:
$CUSTOM_TITLES=1; # Do create them from custom_title_hook.
sub custom_title_hook {
my($title)=@_;
$title=purify($title);
$title =~ /^([^\s]*)/; # the section number is (hopefully) 1st `word'
my $name = $1;
$name =~ tr/\(\)/_/d; # translate parens to _
$name =~ s/\.$//; # remove trailing .
$name; }
--
--
bruce.miller@nist.gov
http://math.nist.gov/~BMiller/