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.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)