public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: Alexis <flexibeast@gmail.com>
Cc: groff <groff@gnu.org>, linux-man@vger.kernel.org
Subject: Re: man(7) <-> mdoc(7) (approximate) correspondence table?
Date: Sat, 27 Apr 2024 10:41:44 +0200	[thread overview]
Message-ID: <Ziy6SLSeanPrcKaW@debian> (raw)
In-Reply-To: <87h6fnwcqv.fsf@gmail.com>

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

Hi Alexis,

On Sat, Apr 27, 2024 at 04:17:28PM +1000, Alexis wrote:
> [ Not subscribed to the linux-man list, so please cc me if replying there. ]
> 
> Hi all,
> 
> As someone who's much more familiar with mdoc(7) than man(7), is there an
> approximate 'correspondence table' somewhere that gives at least a rough
> sense of which man(7) macros to use when, in an mdoc(7) context, one would
> use a given mdoc(7) macro? Such a table might look something like (to use
> some obvious probable correspondences):
> 
> | mdoc(7) | man(7) | Notes
> +---------+--------+-------
> | Lk      | UR     |
> | Op      | OP     |
> | Sh      | SH     |
> | Ss      | SS     |
> | ⋮       | ⋮      |
> 
> i recognise that there's no bijection in general, and that specific mappings
> might differ between projects (e.g. the Linux man-pages project might use a
> certain man(7) macro where a different project uses another), but even a
> project-specific table would be helpful to me.

I have similar problems when writing mdoc(7).  What I tend to do is look
at good (e.g., OpenBSD) mdoc(7) pages' output, and then look at their
source to see what they use.

I can only recommend you look at pages in the Linux man-pages project,
and follow what you see (you can ask me if a page is a good reference).
I try to have them all with perfect source, but there are too many of
them.

> i thought there might be such a table in either groff_man(7) or
> groff_man_style(7), but nothing leapt out ....

It would be interesting if there would exist such a thing.

> Alexis.

Have a lovely weekend!
Alex

-- 
<https://www.alejandro-colomar.es/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-04-27  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27  6:17 man(7) <-> mdoc(7) (approximate) correspondence table? Alexis
2024-04-27  8:41 ` Alejandro Colomar [this message]
2024-04-27  9:41   ` Alexis
2024-05-12 23:49   ` Ingo Schwarze
2024-04-27 18:52 ` Lennart Jablonka
2024-04-28  4:46   ` Alexis

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=Ziy6SLSeanPrcKaW@debian \
    --to=alx@kernel.org \
    --cc=flexibeast@gmail.com \
    --cc=groff@gnu.org \
    --cc=linux-man@vger.kernel.org \
    /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