bug-texinfo
[Top][All Lists]
Advanced

[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: Tue, 28 Jan 2020 12:36:43 +0000
User-agent: Mutt/1.9.4 (2018-02-28)

On Thu, Jan 23, 2020 at 07:56:24PM +0100, Patrice Dumas wrote:
> On Mon, Jan 20, 2020 at 02:12:16PM +0000, Gavin Smith wrote:
> > On Sun, Nov 03, 2019 at 10:17:05AM +0100, Patrice Dumas wrote:
> > > 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.
> > 
> > I'm trying to work on changing the navigation header, but finding it 
> > hard to understand the code.  I think I need to make _element_direction 
> > return the text of the section name rather than the text of the node 
> > name.  (_element_direction is called from _default_node_direction.)  I 
> > found there were directions "Up", "Next" and "Prev" corresponding to 
> > "section_up", "section_next" and "section_prev" in Texinfo::Structuring, 
> > but these appear to refer to the same elements as "node_up", etc.

I've tried to implement this in commit 7fa44400e.  At the moment it is 
controlled with the '@xrefautomaticsectiontitle' setting.

> It is probably normal, as, in the classical case, elements are associated 
> both to a section and a node.  I think that it is a good thing that 
> the href is the element href, independently of the name shown.  
> Looking at Structuring.pm, it seems that the option to use sections as
> element_command, however, is available with split_by_section.  Maybe you
> could try to set USE_NODES to false.  I think that it won't be
> enough, however, as in _default_node_direction the call to
> _element_direction is explicitly set with 'node'.  So you may also need
> to have the call like 

I made _element_direction take 'section' as an argument instead of 
'node'.

> There is probably an alternate way.  If I recall well, I did the 
> _default_node_direction function to be sure that node names are used in
> any case.  Maybe simply changing 'SECTION_BUTTONS' to be
> 
> 'SECTION_BUTTONS'      => ['Next', 'Prev', 'Up', ' ', 'Contents', 'Index']
> 
> could give you what you are looking for, providing USE_NODES is 
> false.

I had tried changing 'SECTION_BUTTONS' to this, which didn't change 
anything, although I had not changed 'USE_NODES'.  I haven't 
investigated the effect of 'USE_NODES' on this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]