bug-texinfo
[Top][All Lists]
Advanced

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

Re: @menu puts too many restrictions to produce the .info file


From: Gavin Smith
Subject: Re: @menu puts too many restrictions to produce the .info file
Date: Wed, 21 Oct 2020 12:32:02 +0100
User-agent: Mutt/1.9.4 (2018-02-28)

(switching to bug-texinfo)

On Tue, Oct 20, 2020 at 10:49:29PM +0200, Patrice Dumas wrote:
> On Tue, Oct 20, 2020 at 05:59:56PM +0100, Gavin Smith wrote:
> > On Tue, Oct 20, 2020 at 04:53:11PM +0100, Gavin Smith wrote:
> > > If an author wants to have irregular menu or node structures for some
> > > reason (I haven't made sense exactly of what Christopher is doing
> > > with his documents) then they could use explicit node pointers,
> > > specifying Next/Prev/Up for each node.
> > 
> > Another idea is to make it so that if a node has explicit node
> > pointers, then its menu would not be used to determine structural
> > relations between nodes.  The menu, along with the node pointers, would
> > be trusted to be correct, and intended by the author, but not used
> > for anything else.
> 
> I was certain that it was already the case...

Not exactly.  For example, with this input:

\input texinfo
@node One,,,
@chapter One

@menu
* Two::
* Three::
@end menu

@node Two
@section Two

@node Four
@section Four

@node Three
@section Three
@bye

there are the following errors (in the current development version: the
wording has changed slightly since the last release):

test.texi:10: warning: node next for `Two' is `Four' in sectioning but `Three' 
in menu
test.texi:13: warning: node next for `Four' is `Three' in sectioning but not in 
menu
test.texi:13: warning: node prev for `Four' is `Two' in sectioning but not in 
menu
test.texi:13: warning: node up for `Four' is `One' in sectioning but not in menu
test.texi:2: warning: node `One' lacks menu item for `Four' despite being its 
Up target
test.texi:16: warning: node prev for `Three' is `Four' in sectioning but `Two' 
in menu
test.texi: warning: document without Top node


Note that although the "One" node has explicit node pointers, there are
still warnings about its menu.

The explicit node pointers stop warnings about the pointers of a single
node only.  For example:

\input texinfo
@node One,,,
@chapter One

@menu
* Two::
* Three::
@end menu

@node Two
@section Two

@node Four,,
@section Four

@node Three
@section Three
@bye


Here, the node "Four" has explicit pointers, so the warnings about its
pointers go away, while the other warnings remain:

test.texi:10: warning: node next for `Two' is `Four' in sectioning but `Three' 
in menu
test.texi:16: warning: node prev for `Three' is `Four' in sectioning but `Two' 
in menu
test.texi: warning: document without Top node

> As I said in another mail, to me the only constraint should be that any
> node is reachable from any point in the document through nodes or menus.
> Other than that, I do not think that we need to put constraints,
> although we could want to have warning messages for unusual structures.

That is a stronger constraint than you might think, because you may have
disconnected "islands" of several nodes that all reference each other,
but which are not accessible from outside the island.



reply via email to

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