[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sectional table of contents in HTML output
From: |
Gavin Smith |
Subject: |
Re: Sectional table of contents in HTML output |
Date: |
Sun, 19 Jan 2020 11:06:55 +0000 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Sun, Nov 03, 2019 at 10:17:05AM +0100, Patrice Dumas wrote:
> On Fri, Nov 01, 2019 at 02:12:37PM +0000, Gavin Smith wrote:
> > I would like a way of having a menu in each HTML file that lists the
> > section names of subordinate nodes. This would replace the menu that
> > already exists which is generated from the @menu block in the source.
> > I don't believe there is any way to do this currently with texi2any.
>
> Should it be placed at the same place as the menu, or be right after the
> command heading?
I think it should be in the same place as the menu.
I understand the change you sent overrides _convert_heading_command.
The new code is this:
if ($command->{'section_childs'} and @{$command->{'section_childs'}}) {
# and $cmdname ne 'top') {
$result .= $self->_attribute_class('ul', $NO_BULLET_LIST_CLASS).">\n";
foreach my $section_child (@{$command->{'section_childs'}}) {
my $content_href = $self->command_href($section_child);
my $heading = $self->command_text($section_child);
if ($content_href) {
$result .= "<li> "."<a href=\"$content_href\">$heading</a>" . " </
>li>\n";
}
}
$result .= "</ul>\n";
}
I think it should be controlled with a new customization variable. I
will look at the code you sent and try to combine it with the work I
had in progress on this.
> I attach an example that generates such a list right after the heading.
> Something that looks strange is that the node names are used in the
> navigation header, while the sections names are used in the list of
> subordinate sections/nodes.
Yes, the section names should be used in the navigation header too.
Perhaps this could be controlled with @xrefautomaticsectiontitle.
- Re: Sectional table of contents in HTML output,
Gavin Smith <=