At 4:18 PM -0400 4/23/98, Bruce R Miller wrote:
>On Apr 23,  7:56pm, Steffen Klupsch wrote:
>> Subject: latex2html: Static file names for specific html pages possible?
>> I need to provide static file names for some entry points in my l2h
>> documents. At the moment I "produce" this file names using the
>> sectioning commands.
>
>This isn't exactly what you're asking for, but it is probably a safer way to
>get the same effect (I imagine that changing the output file names at random
>points is likely to be problematic)
>
>You _can_ have the filenames based on the section titles.  There's a couple of
>ways built in:
> set $LONG_TITLES to the number of words from the section title that you
>want to have in the name
>  or
> set $CUSTOM_TITLES and define the sub custom_title_hook($title) to
>derive the filename you want from the title.


Yes, this is the recommended way to set HTML filenames.


>For example, with section numbering on, the following code names the files
>after the section numbers.
>$SHOW_SECTION_NUMBERS = 1;
>$CUSTOM_TITLES=1;
>sub custom_title_hook {
>    my($TITLE)=@_;
>    $TITLE =~ /^([^\s]*)/;
>    $1; }

Within  sub custom_title_hook  you are free to do whatever you like
with the available data passed to it; i.e. the section-title.
This includes discarding it completely and using a totally
different naming scheme.


You could make use of the  \HTMLset  command from  html.sty

e.g.  \section{My important data.\HTMLset{mytitle}{ABC}}

Now with the simple subroutine definition:

   sub custom_title_hook { $mytitle }

the HTML page for this section will be named  ABC.html  .
(or ABC.htm  with  $SHORTEXTN  set,  using -short_extn )

Neat huh.  :-)


        Hope this helps,

                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