bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

control over sectioning and splitting


From: Per Bothner
Subject: control over sectioning and splitting
Date: Sat, 9 Oct 2021 18:42:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

Compare
    https://domterm.org/Wire-byte-protocol.html
with
    https://domterm.org/Frontends.html

The former is a section, it is divided into subsections,
which appear in the sidebar (when the page is selected) and in the Contents.

The latter is a chapter.  It is divided into pseudo-subsections,
using @subheading commands, none of which appear in the sidebar or Contents.

I'd like to have the subheadings appar in the sidebar and the Contents,
but I haven't figured out a good way to do that.

Is there a way to divide a "chapter" into "sub-chapters" such that they appear 
on the
same web-page, but show up in the sidebar and the Contents?

It seems possible for info.js to add extra entries in the side-bar by scanning
the page looking for <h4 class="subheading">.  However, that seems a bit kludgy
and does not add the "sub-chapter" to the ToC.

One idea is to allow the children of a @chapter to be @subsections, skipping the
@section elements - but texi2any doesn't allow that.

Another idea is some kind of @samepage annotation to could be added to a 
@section,
to prevent page-spliting.  (This might be also useful for printed manuals.)

Another idea is to use @part: Everything that should be a separate page should 
be its
own @chapter, but we use @part to group together characters that should not show
in the sidebar until the @part if expanded.  (It is desirable to avoid putting
too much in the sidebar, to make it less overwhelming.)

Another idea is to allow special handling for "single-section chapters".
In the source you could write @chapter immediately followed by @section, which 
the
same name and no separate @node command:

@node Frontends
@chapter
@section Frontends including browsers

This would be logically equivalent to:

@node Frontends
@chapter Frontends including browsers
@node Frontends-section-
@section Frontends including browsers

However, in the output (assuming --split=section) the chapter and ection
would be merged into a single page, and similar merging in the sidebar and ToC.

Ideas?  Hacking info.js is something I could do, but it doesn't help for
traditional info and it doesn't solve the missing entries in the ToC.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

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