Hi,
AFAIU the description of the format of menus in an Info file, the
following menu entry from the Index node of texi2any_internals manual
violates the spec:
* Texinfo::Convert::Converter initialization: ^?Texinfo::Convert::Converter
Converter Initialization^?.
(line 6)
(In the manual, the "^?" are the DEL characters.) This manual came
with Texinfo 7.3. There are several other entries there with the same
problem.
The above menu entry includes colons, so AFAIU it must be quoted, but
isn't. The Texinfo manual says in "Info Format Menu":
<menu> =
* Menu:
(<menu entry> | <menu comment>)*
The parts of a <menu entry> are also described in *note Menu Parts::.
They have the same syntax as cross-references, with a leading ‘*’
instead of ‘* (N|n)ote’ (*note Info Format Cross Reference::). Indices
extend the menu format to specify the destination line; *note Info
Format Printindex::.
In "Info Format Cross Reference" we read:
A general cross-reference in Info format has one of the following two
forms:
<cross-reference> =
* (N|n)ote <id>::
| * (N|n)ote <label>:<id>(.|,)
<id> = (<lparen><infofile><rparen>)?<node-spec>?
<label> = <label text> | <del><label text><del>
[..]
The second form has a descriptive label. A cross-reference in this
form should usually be terminated with a comma or period, to make it
feasible to find the end of the <id>.
If <label> contains a colon character (:), it should be surrounded
with a pair of <del> characters. Likewise, quoting characters may be
used for the node name if it contains problematic characters; then a
terminating comma or period is not needed. As stated earlier, this
quoting mechanism is not supported in all Info-reading programs.
AFAIU this description, the "Texinfo::Convert::Converter
initialization" part of the above menu entry is "<label text>", so it
should have been quoted due to embedded colons. However, "Info Format
Printindex", which is also referenced above, confusingly says
something slightly different:
An index in Info format is a kind of menu, with an additional directive
at the beginning to mark it as an index menu.
<printindex> =
^@^H[index^@^H]
* Menu:
<index entry>*
The <index entry> items are similar to normal menu entries, but the
free-format description is replaced by the line number of where the
entries occurs in the text:
<index entry> =
* <entry text>: <node-spec>. <line-spec>
<line-spec> =
<lparen>line <lineno><rparen>
The initial part, ‘<entry text>: <entry node>.’, should be on a
single line. The <entry text> is the index term.
Even though <entry text> is followed by a colon, it may itself
contain colons, so Info readers should try to include as much of the
line as possible in the <entry text>. (However, <entry text> may not
contain the ‘DEL’ characters that may occur in <node-spec>.)
This seems to say that "<entry text>" does NOT follow the conventions
of menus, where menu entry text is quoted if it includes colons (and
other special characters). But then an Index is not "just a menu",
and so the "* Menu:" heading at the beginning of Index nodes is at
least misleading.
Am I missing something, or is the above Index entry incorrect due to
some bug in texi2any? If such entries are correct, then it is
impossible for an Info reader to treat Index nodes as menus, and some
other strategy (but which one?) is needed for Index nodes. And if
this is indeed the case, what is the reason for the different
formatting of the menus in Index nodes?
FWIW, the stand-alone Info reader from Texinfo 7.3 also gets confused
on that line: if I press RET, it says "Cannot find node 'Converter
Converter Initialization'". But then the stand-alone reader fails on
all the lines in that Index node, so maybe it's a separate problem.