discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Getting semantically-correct mdoc fonts outside of requests
@ 2022-05-28 19:03 наб
  2022-05-28 22:28 ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2022-05-28 19:03 UTC (permalink / raw)
  To: discuss

[-- 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 --]

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

end of thread, other threads:[~2022-05-29 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28 19:03 Getting semantically-correct mdoc fonts outside of requests наб
2022-05-28 22:28 ` Ingo Schwarze
2022-05-29  0:15   ` наб
2022-05-29 17:34     ` наб

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).