Re: italicizing pointer stars (was: [PATCH] getline.3: wfix.)

G. Branden Robinson
2022-08-05T21:51:43Z

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Hi Alex,

At 2022-08-05T21:40:06+0200, Alejandro Colomar wrote:
> On 8/5/22 21:20, G. Branden Robinson wrote:
> > I'm wondering if we should really be setting the dereferencing
> > operator in italics here.
> >
> > In declarations, the star is part of the _type_, not the identifier.
> > Similarly, in expressions, the star is an operator, like "+", not
> > part of the identifier.
>
> Let me escape out of this a bit sideways :P
>
> *foo, as a whole, is an expression, consisting of an operator and an
> identifier. So I won't apply identifier rules for highlighting, but
> expression rules. The rules for marking expressions up are:
>
> man-pages(7):
> Formatting conventions (general)
> [...]
>
> Expressions, if not written on a separate indented line,
> should be specified in italics. Again, the use of non‐
> breaking spaces may be appropriate if the expression is
> inlined with normal text.

Ahhh. I had just reviewed that page while pondering a bunch of
miscellaneous suggestions I might craft into a patch series, but the
foregoing utterly failed to sink in.

> And the deep rationale why I would like to avoid having the star in a
> different font is that it could be confused with the glob-like
> expressions that we use for example to refer to SYS_* macros.

That makes sense. I think instead of adopting glob syntax, I would use
quotation, but quotation in man(7) is so awkward that many people act
like it's unavailable. This is just one of many reasons I think man(7)
should have a `Q` macro to facilitate it.

> Did I dodge the bullet?

I think so. :)

Regards,
Branden

[-- Attachment #2: signature.asc --]