On Tue, Mar 05, 2024 at 11:59:23AM +0100, Patrice Dumas wrote: > On Mon, Mar 04, 2024 at 09:16:44PM +0000, Gavin Smith wrote: > > \itemcontents expands to \asis and then TeX tries to take the } following > > as the argument to \asis, which is invalid. > > > > Basically @asis takes an argument in the TeX implementation, whereas > > commands like @bullet or @minus don't, even though you usually should > > write them as @bullet{} and @minus{}. > > To me this supports even more changing the Texinfo language to have > braces for @bullet or @minus on the @itemize line, as not having them > seems to be permitted by an implementation detail of the TeX > implementation. > > I attach a diff for the Texinfo manual to remove the permission not to > have braces for mark commands on the @itemize line. > > Would that be ok to apply?
"@itemize @asis" is definitely wrong and could give a warning if not an error. That seems the main thing to change. I don't agree with changing the language to require braces. There is not a good reason to change it. Although writing "@itemize @bullet{}" may be more regular than "@itemize @bullet", it is a core and stable part of the Texinfo lanugage, regardless of which one you might prefer. I would rather say that "@itemize @w{}" is the usage that is permiitted by details of the implementation. "@itemize @bullet" is the more typical usage. It seems like there are two permitted types of argument * @itemize with a glyph command as an argument, without braces * @itemize with any valid Texinfo argument. For example, "@itemize A" to use the letter "A" as the bullet. The second is hardly encouraged or used at all, except for "@itemize @w{}". The last could be checked for as a special case. We could try to check in existing manuals how @itemize is used. There may not be a benefit in trying to be more general.