discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* [Suggestion]: Document that the Er macro can be used as a width.
@ 2021-09-27  1:51 Stephen Gregoratto
  2021-09-27  8:32 ` Jan Stary
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Gregoratto @ 2021-09-27  1:51 UTC (permalink / raw)
  To: discuss

I'm currently rewriting the Illumos manpages in mdoc, and I realised
from looking at the OpenBSD manuals, that the error list is set up as
such:

.Bl -tag -width Er
.It Bq Er ENOTTY
...

This is a really neat feature that I think deserved to be documented.
AFAIK only Ds gets this treatment. Apparently it resolves to 17n from
looking at mdoc_validate.c:/^macro2len/.
-- 
Stephen Gregoratto
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Suggestion]: Document that the Er macro can be used as a width.
  2021-09-27  1:51 [Suggestion]: Document that the Er macro can be used as a width Stephen Gregoratto
@ 2021-09-27  8:32 ` Jan Stary
  2021-09-28 16:03   ` Ingo Schwarze
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stary @ 2021-09-27  8:32 UTC (permalink / raw)
  To: discuss

On Sep 27 11:51:10, dev@sgregoratto.me wrote:
> I'm currently rewriting the Illumos manpages in mdoc, and I realised
> from looking at the OpenBSD manuals, that the error list is set up as
> such:
> 
> .Bl -tag -width Er
> .It Bq Er ENOTTY
> ...
> 
> This is a really neat feature that I think deserved to be documented.
> AFAIK only Ds gets this treatment. Apparently it resolves to 17n from
> looking at mdoc_validate.c:/^macro2len/.

mdoc(7) says

  The most popular is the imaginary macro Ds,
  which resolves to 6n.


--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Suggestion]: Document that the Er macro can be used as a width.
  2021-09-27  8:32 ` Jan Stary
@ 2021-09-28 16:03   ` Ingo Schwarze
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Schwarze @ 2021-09-28 16:03 UTC (permalink / raw)
  To: dev; +Cc: discuss

Hi Stephen,

Jan Stary wrote on Mon, Sep 27, 2021 at 10:32:07AM +0200:
> On Sep 27 11:51:10, dev@sgregoratto.me wrote:

>> I'm currently rewriting the Illumos manpages in mdoc, and I realised
>> from looking at the OpenBSD manuals, that the error list is set up as
>> such:
>> 
>> .Bl -tag -width Er
>> .It Bq Er ENOTTY
>> ...
>> 
>> This is a really neat feature that I think deserved to be documented.
>> AFAIK only Ds gets this treatment. Apparently it resolves to 17n from
>> looking at mdoc_validate.c:/^macro2len/.

https://man.openbsd.org/mdoc.7#Bl says:

  The -width and -offset arguments accept macro names as described for
  Bd -offset, scaling widths as described in roff(7), or use the length
  of the given string.

And then https://man.openbsd.org/mdoc.7#offset :

>   The most popular is the imaginary macro Ds,
>   which resolves to 6n.

I'm not quite sure what you are proposing.

Listing all the default widths for all the macros would seem like
exposing too much irrelevant information to me.

Note that except for .Er, this feature is very rarely used, and it is
not really needed in practice, so isn't it better to treat the details
as implementation details and not document them, keeping the text short?

Or what exactly would you want documented?

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-28 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27  1:51 [Suggestion]: Document that the Er macro can be used as a width Stephen Gregoratto
2021-09-27  8:32 ` Jan Stary
2021-09-28 16:03   ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).