Re: grohtml: confused about constant-width font handling

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260120173714.nqecu2qf4nnf62aa@illithid>
At 2026-01-20T15:32:20+0000, Colin Watson wrote:
> On Tue, Jan 20, 2026 at 03:20:55PM +0000, Colin Watson wrote:
> > My current plan is to add the following preamble to the affected
> > pages:
> > 
> >  .ie n .ds CR R
> >  .el .ds CR CR
> > 
> > ... and then just use `.ft \*(CR` in each of the places where it
> > currently has a conditional.
> 
> On reflection, in this particular case I think these pages could just
> use .EX/.EE instead of messing around with fonts manually.

Yes!  I think this is one reason I didn't give much priority to this
issue.

_Usually_, when a document, and especially a man page, wants to bust
into a monospaced font, it wants to do so in a _display_--one that is
set exclusively with a monospaced font family.

> However, the HTML output problem remains.

A back-of-the-envelope solution might be to hack up groff man(7)'s `EX`
and `EE` macros to inject a "<div style="font-family: mono>" into the
former and "</div>" into the latter.

Caveat: I don't actually know how to spell the CSS for what I'm talking
about.  Don't take the foregoing literally.

`EX` and `EE` already have special machinery for dealing with the "dvi"
and "lbp" output devices, so all one needs to do is follow that control
structure model for "html".

https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/tmac/an.tmac?h=1.24.0.rc1#n1117

If I'm correct about how constrained this solution is (if it works),
then if this is something you have the time to tackle, I can see it
getting in to 1.24.0 final.  At present, only C/C++ code is frozen, and
I have one more macro package-affecting ticket I want to try to dispose
of.  It happens to be an mdoc(7) cousin of this very issue.[1]

https://savannah.gnu.org/bugs/?66126

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmlvvUMACgkQ0Z6cfXEm
bc7diA//VBPPYdvc1MUHaxeXPB3x6r67BnAw6X2sDT0Tnmm+FtYa2ZCIe20xaAJp
qMaCv/9jTGLGmq/yU0cAlhW8O1BKW16WIsoTzE4lvz700XCrzyF+JKfQFvd3OgcC
F1zXSaoenYK6uGgtw0ecBMygYswGNSOmWgdWcG6dA7cDvGpsp97c8UY5p/90NirM
xyD4LQu+ecTCVhsSinYu+GclLvb1LN1k9cG5L/hXYBU6Hq86ukk6uGKyAozpwf/i
8YI4aqFmRBJFSQTdxWBpCnV++KKmV+WMcr5Io6YFKuDJq6SUKyLaAvdFNCucfEOI
lBvpOZpvr5HZL+ebp8pF6UysAq9T0ctsKvR8W9gc1KxMcQoHgpoZHymO0cfojqKe
Ztv33YEYpbFc2ilvNMkDp067yHcKRaiWhfDbNqNOeGc2UyIYQoEvufqpKfG2HaCV
PRK/8DvhrYwKSimlwm04GzbuYRWcMklU9kz8KAbcFOwnm6MvxC2zVzhJ4ECeByek
sd38bQZHyAxkNK/kAVCGTz1BE0JNK1QGHX45HBNETxpNhfuDSYwYmtNov7g+ohcZ
aVgfL6V4aSwZXz72BA2NdvUDRis0ohhsdLjF0QH/bm4zG3y5SeBNIu/o7DeLSmLE
CPlnqRle0p2o0Zf3Qf1OYO+cMumBabSthEfpgo+xRfYdT9+YGCY=
=vr4V
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.