On Mon, Sep 28, 2026 at 05:30:35PM +0100, Gavin Smith wrote:
> This suggests the lack of a warning is not specific to
> insert_nodes_for_sectioning_commands. The warning that does exist is probably
> a syntax error of @node, not from a check of the resulting node name itself.
>
> The correct output for a node name of "(Two)" would be for the node name to
> be wrapped in DEL bytes in most contexts.
I added some DEL-quoting when a node name begins with a ( and there is
no explicit external manual. I didn't add warning messages, as having
a parenthesis there is, in general, not erroneous, but means something
else.
I did not put DEL-quoting on manually specified parenthesized node name
with first parenthesis not escaped by @asis.
So for example, in the following, with insert_nodes_for_sectioning_commands
tree transformation, the @menu is automatically generated, and (Two) in
the menu is DEL-quoted:
@node Top
@top
@chapter (Two)
In the following, the (Two) in the explicit @menu is not quoted:
@node Top
@top
@menu
* (Two)::
@end menu
@chapter (Two)
But in the following, the @asis{(}Two) in the explicit @menu is quoted:
@node Top
@top
@menu
* @asis{(}Two)::
@end menu
@chapter (Two)
In the second case there are warnings since the Texinfo code of the node
name, which is "@asis{(}Two)" does not match the menu entry, node
direction Texinfo code or @xref argument, even if their normalized name
are the same.
It seems to me that we could keep the things as they are now, and we
could even document that the references manually added should have @asis
protecting the first parenthesis. It is not so clear that documenting
the use of @asis is such a good idea, though, as it is an implementation
detail that the user should not need to know and could change in the
future, for example if we add an @-command for an opening parenthesis.
--
Pat