> 
> Ross Moore <[EMAIL PROTECTED]> writes: 
> > Interesting idea.
> > In a sense this is like giving a running head that is derived
> > from the section-title, but need not be identical to it.
> > 
> > I've just patched part of latex2html so that the optional argument
> > to a sectioning command is saved, rather than discarded.
> > Now this is used in the <TITLE> tag, and for hyperlinks to the
> > HTML page of the section. 
> > 
> > I'm not sure that this is best.
> > The TOC entry should be the original title, but other links...
> > ...maybe.
> 
> Using the optional argument would be great, but I'd also vote for
> having a <TITLE> hook in the same way custom_title_hook works.  Both
> the formal and optional title could be passed, and the user could
> build whatever window title he/she wanted using them.
> 
> I also think using the optional sectioning argument in the navigation
> panel would be great, especially for titles where truncation is a poor
> abbreviation.  Since the nav panel is already so customizable, would
> it be possible to provide an alternate set of variables like
> $NEXT_TITLE, $UP_TITLE, $PREVIOUS_TITLE, etc, that are set to the
> optional title if it exists, and the formal title if it doesn't?  That
> would leave the actual use of the optional titles up to the user.

The strategy to be used in v98.1p5  is as follows:

Each new section generates 2 title strings:
 1. appears on the HTML page and in the TOC and mini-TOCs
 2. appears in the <TITLE> and as the text of navigation hyperlinks

#2 is specified by the optional argument, else is the same as #1 .
(Technical issues of removing anchors etc. are taken care-of.)

For segmented documents, the string #1 is stored in  contents.pl
while the (perhaps simpler) string #2 is stored in  sections.pl
 
Earlier versions of LaTeX2HTML also used to have 2 separate strings,
but they got merged into one during '96 or '97, since there
was no documentation concerning their differences in purpose.
Now we are perhaps getting back to the original intention.



For user-control over how these strings are used, there are
now 4 user-definable hooks:

        &custom_title_hook      customises the file-name
                args: (#2 text)

        &custom_TITLE_hook      customises the <TITLE> tag
                args: (#2 text, #1 text)

        &custom_link_hook       customises navigation-panel text
                args: (#2 text, $toc_section_info{...})

        &custom_REL_hook        customises <LINK REL=....   attribute
                args: ($rel, $toc_section_info{...})

Each subroutine returns a string, to be used in the appropriate place.

Here the $toc_section_info is the complete sectioning information,
as stored in contents.pl . This includes file-name, sectioning levels, etc.
Together with the #2 text, this provides access to *all* the book-keeping
information that LaTeX2HTML retains about the HTML page for a section.

For the REL attribute, $rel is a single word (e.g. 'next', 'previous', ...)
for describing how the current HTML page relates to other pages.
In this case the $toc_section_info is that for the other page.


> That would be pretty cool, IMO.

The above should cover your needs, plus a bit more.  ;-)


All the best,

        Ross Moore


Reply via email to