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

discuss@mandoc.bsd.lv

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/mandoc-discuss

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 mandoc-discuss mandoc-discuss/ https://inbox.vuxu.org/mandoc-discuss \
		discuss@mandoc.bsd.lv
	public-inbox-index mandoc-discuss

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.discuss


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git