From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: discuss@mandoc.bsd.lv
Subject: Getting semantically-correct mdoc fonts outside of requests
Date: Sat, 28 May 2022 21:03:13 +0200 [thread overview]
Message-ID: <20220528190313.5jdgvy57pnaqen62@tarta.nabijaczleweli.xyz> (raw)
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
Hi!
This is something I've run my head into again and again while using
tbl(7) tables ‒ since you cannot usefully execute mdoc requests while
in a table, I've been either hardcoding fonts or in recent passes doing
.ie n .ds fAr I
.el .ds fAr CI
(with a preprocessing pass for mandoc which pretends to be nroff even
when it's typesetting; groff needs I/CI distinctions since tty output
is 4-font only and C? fonts render as R).
This does work, but (a) it's ass and (b) duplicates the macro package,
badly.
groff's doc.tmac sets doc-??-font strings for all the semantic macros,
such that \*[doc-Nm-font] expands to \fB under nroff
and \f(CB (+ a font size reset) under troff, d-Pa-f to I/C, &c.
Now, mandoc's mdoc doesn't really allow for that in a trivial fashion,
especially in its much richer -Thtml output which doesn't trivially map
to/from 8 fonts, but, well, that's my best attempt at prior art.
So: is there a better way?
Best,
наб
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2022-05-28 19:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-28 19:03 наб [this message]
2022-05-28 22:28 ` Ingo Schwarze
2022-05-29 0:15 ` наб
2022-05-29 17:34 ` наб
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=20220528190313.5jdgvy57pnaqen62@tarta.nabijaczleweli.xyz \
--to=nabijaczleweli@nabijaczleweli.xyz \
--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).