On Sat, Feb 15, 2025 at 04:38:34PM +0000, Gavin Smith wrote: > On Sat, Feb 15, 2025 at 01:16:13PM +0000, Werner LEMBERG wrote: > > > > [folding answers to two e-mails into one] > > > > >> Because in Info a `@node` always needs a `@menu` entry, AFAIK, > > >> which is inconsistent with the `@XXXheading` behaviour. > > > > > > The @node directions and @menu entries, if explicit, are, in > > > principle, fully independent from sectioning commands such as > > > @*section and other. > > > > OK. > > > > > So, this is not different if a @node is before an @XXXheading, it > > > may appear in an explicit node direction and in another @node menu. > > > > Well, the behaviour of `@node` in a split HTML document is to start a > > new file. However, this is exactly what I would like to avoid. > > Yes, as far as I can tell the primary purpose of @node is to define > units of output. In Info output, these are Info nodes. In split HTML > output, these are files.
This is only true if USE_NODES=1. For HTML, if USE_NODES=0, the sectioning commands define units of output and @node are only used ase targets of cross-references. > So what I am thinking now is that we would allow and encourage > multiple section or heading commands within single @node. For example, We already allow for that and we do not discourage. > So our example above becomes: > > @node One > @chapter One > > @label Sec One > @section Section One > > @label Sec Two > @section Section One > > @node ... > > For TeX processing, the implementation of @label would be different from > that of @anchor in that the entry would only be written to the auxiliary > file when the following @section was read. This would allow recording > the label and section name together. > > By default, or depending on some setting, the "xrefautomaticsectiontitle" > behaviour would be used so that e.g. @xref{Sec One} produced > "See Section One". There is also the idea that the following would lead to @label associated to @heading, and not @section, as is the case now for @node: @label Heading 1 @heading heading one @section a section > This would be enough for your needs, as far as I can tell, but in case > we also wanted "xrefauto'ed" links to arbitrary locations, not just > headings, then we'd need to extend @anchor as discussed elsewhere in this > discussion: > > @table @asis > @item Papilon@namedanchor{Butterfly, Papilon} > ... > @end table > > (This follows Patrice's suggestion.) > > Then the "anchor name" would be "Butterfly"; the name for cross-references > would be "Papilon". (I'm not sure how to refer to the name for > cross-references as both "name" and "label" are confusing terms. The > "refname"?) Maybe we could wait for actual use cases before implementing this? -- Pat