discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: dev@sgregoratto.me
Cc: discuss@mandoc.bsd.lv
Subject: Re: [Suggestion]: Document that the Er macro can be used as a width.
Date: Tue, 28 Sep 2021 18:03:52 +0200	[thread overview]
Message-ID: <YVM86DxfrB3w+cue@asta-kit.de> (raw)
In-Reply-To: <YVGBh2rRnyy+f8OE@www.stare.cz>

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


      reply	other threads:[~2021-09-28 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  1:51 Stephen Gregoratto
2021-09-27  8:32 ` Jan Stary
2021-09-28 16:03   ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YVM86DxfrB3w+cue@asta-kit.de \
    --to=schwarze@usta.de \
    --cc=dev@sgregoratto.me \
    --cc=discuss@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).