On Thu, Nov 17, 2022 at 11:17:10AM +0100, Vincent Lefevre wrote: > On 2022-11-16 23:22:27 +0000, Gavin Smith wrote: > > The square brackets can also be used to mark optional arguments in > > other programming languages, so it may not be better to change the > > font for these. > > Since C (including C++) is very common (and its prototype formats > is used for library interfaces), I think that it would be worth to > define new commands for it. > > > You can get the regular monospace font with @t: > > > > @deftypefun int f (char *t@t{[]}) > > Unfortunately this hack is broken, because in HTML, it is rendered > as <tt>[]</tt>, while with @deftypefn, *all* the argument part is > written without tt and with em (thus in italics). So this makes the > HTML output inconsistent. However, the issue is rather that tt is > not used at all with @deftypefn in HTML. IMHO, the style for HTML > output should be aligned with TeX output, where tt is used.
Have you tested this with Texinfo 7.0 or with the latest development version? The font for HTML output for @deftypefn should be in the tt style and this was a recent change following lengthy discussion on this list.