On Mon, Jun 23, 2025 at 02:13:39PM +0300, Eli Zaretskii wrote:
> The automatic calculation of Prev/Next/Up node pointers assume a
> strict tree-like structure of a manual, and it also assumes that the
> @menu item for a node appears in its parent node.  If these conditions
> are not fulfilled, then the Texinfo source should explicitly specify
> the Prev/Next/Up pointers on the @node line, because it is
> unreasonable to expect makeinfo to figure out what the author meant by
> such an irregular structure.
> 
> So I don't think you should try fixing this problem.  It is something
> to be fixed by the authors of the glibc manual.
> 
> > I expect the warnings were not reported before because the direction 
> > pointers
> > are given explicity for Getopt on the @node line.
> 
> Which is expected in this case.
> 
> > However, the output is badly structured, especially for any output
> > format other than Info, so I guess that the warnings (or similar)
> > should be kept.
> 
> I'm not sure I understand what is the bad structure.  If you allude to
> the lack of link back to Getopt's node, then that's expected with such
> a structure.  Users could perhaps click ""BACK" to go back to the
> Getopt page.  If a warning is preferred in this case, then I think
> this:
> 
>   startup.texi:1: warning: node `Program Basics' lacks menu item for `Getopt' 
> but is above it...
> 
> already fits the bill, IMO.

The bad structure is that the Info file has a menu in "Parsing Program
Arguments" that lists Getopt, but this is not listed as a subsection in
the HTML manual.  As Patrice says, this is not so bad, as it is there
as a link anyway.

However, it appears that the "Suboptions" node is incorrectly "adopted"
in the sectioning structure by the last node given in argp.texi,
"Argp User Customization", which is a @subsection:

  @include getopt.texi
  @include argp.texi
  
  @node Suboptions, Suboptions Example, Argp, Parsing Program Arguments
  @c This is a @section so that it's at the same level as getopt and argp
  @subsubsection Parsing of Suboptions

The comment contradicts the fact that it is a @subsubsection.

I haven't checked the latest sources to see if this is still the case, but
this can be seen in the current web documentation:

https://www.gnu.org/software/libc/manual/html_node/Argp-User-Customization.html

There is a link at the end to the "Suboptions" node, titled "Parsing of 
Suboptions".

Likewise, "Suboptions Example" is adopted by "Argp" and appears at the
end of the list of subsections in the HTML output:

https://www.gnu.org/software/libc/manual/html_node/Argp.html

Neither "Suboptions" nor "Suboptions Examples" is referenced in the
HTML output for "Parsing Program Arguments", even though they are listed
in the @menu in that node.

So while the Info output is basically fine, output that doesn't use
menus, including the default HTML output and output with TeX, has
problems.  Hence I believe we should keep the new warnings with
CHECK_NORMAL_MENU_STRUCTURE, even though the authors have provided
explicit node pointers that match the intended document structure, as
you describe.

Reply via email to