Re: groff does not respect requests '.nh' and '.ad l' in man pages

"G. Branden Robinson" <[email protected]> Tue, 10 Mar 2026 18:04:27 -0500
Newsgroups gmane.comp.printing.groff.general
Message-ID <20260310230427.3b2zikg5lsun4i2x@illithid>
At 2026-03-10T22:17:29+0000, Bjarni Ingi Gislason wrote:
>   See the output of
> 
> ascii.1
> hd.1
> last.1
> login.1
> size.1
> strings.1
> strip.1
> ul.1

Your subject line is inaccurate.  groff "respects" them just fine.

$ nroff -rLL=72n -rU0 -man ATTIC/bjarni.man
foo(1)                   General Commands Manual                  foo(1)

Name
     foo - frobnicate a bar

Description
     The   nh   request   disables   hyphenation   of  a  lengthy  word:
     antidisestablishmentarianism.

     Automatic hyphenation is  restored  at  the  next  paragraphing  or
     (sub)sectioning macro call.  The same goes for the adjustment mode.

     While it is possible to temporarily disable adjustment, or alter it
     so as to center or right‐align text, that alteration is reverted at
       the next paragraphing or (sub)sectioning macro call, as seen here
                                                           with “.ad r”.

     The  hyphenation  and adjustment preferences of the user are sacro‐
     sanct.  This principle is critical for consistent layout of  multi‐
     ple man pages.

     People who resent readers’ ability to configure man page layout pa‐
     rameters should leave the task of man page composition to those who
     respect   it.    ⟨https://gitlab.com/procps-ng/procps/blob/7ac9a0e1
     f5606696dc799b773d5ec70183ca91a3/ps/ps.1⟩

     groff 1.24’s approach was thoroughly discussed  on  this  list  two
     years  ago  (March 2024) ⟨https://lists.gnu.org/archive/html/groff/
     2024-03/msg00160.html⟩ and in Savannah #67363 ⟨https://savannah.gnu
     .org/bugs/?67363⟩.

groff test suite               2026‐03‐10                         foo(1)

(Document source attached.)

>   These man pages were created with a "translator" (X to man)

I've never heard of that generator.  Maybe it needs to improve.

>   The SH macro uses
> 
> an*reset-adjustment-mode
> 
> an*reset-hyphenation-mode

Yes.

> but there should be no resetting of modes in this macro, besides this
> resetting is made each time the macro is executed !

No.  I disagree, and moreover that very question was explored on this
mailing list two years ago.

If you believe I misapprehended the consensus, you can review the thread
and point out specific messages that cumulatively represent a majority
view against the implementation as seen today.

> test-groff --version (in the master branch):
> 
> GNU groff version 1.24.0.rc4.80-9c4e2

If that's where your working copy is, it's no wonder you cannot locate
the '1.24.0' tag.[1]  You might want to 'git pull'.

Regards,
Branden

[1] https://lists.gnu.org/archive/html/groff/2026-03/msg00055.html
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmmwo3MACgkQ0Z6cfXEm
bc4YEQ//Zel2K1BVrVwsy5wVEGA99Rx7VGNYZAGgVsgUVJg9v7+KxjS9jUMLPkgz
L6X9z7OC6cuVe3ZyCwgOEGcVcKaxbEWapG9zpWRXj47y0K38JiHx16Hir4mRBajU
wJng6/YHbtX14XkTi79Tfjg0YraqRV9AuLgl/fAqkwx68rjUyO5zzhbm+b/aegSu
BIrntNNBroYPYfFPdYry1VaHTn9vPJX7yMVan7rezinBWm9fHj8NTwKUXCOy6Ikw
G39RdvNMWfLzzMXZ4YpGMUowtlLKbLbK1eHkCLb2uJo9sJapJPCSXRnTivg6WG4Y
avEP3x8EQEnmuvl3gmYO99JLl1z3iGQuRc20BU0tUqgG0zd1MGWbAai7Qid368Gi
KHV9uk8ZdrLMIacs9SWspUmPxu02bkv0aLNylMX7UJZpBrCv123K3WvUDPAUO/GL
gIB1GAJUlcq2/HyhFV2iXYGNja43HjZkH5RvOluKjZTwDHgn1Z1KEi6nS35KwUKx
bXockRJsBBRETVAhXJCb9sCizLN9KkBZ6P/vsTZSa+jFVLPf9YJwzUrKRxUrZbn8
qKSN6xRAkm4jIKEP2tZ57AFdpMjdpqIFPTpdUIzcnl4alg980wjmbpISSIyLFNq0
t7hLk/P7LDtLXjmOVccI+lXLaQC1w8uIH+d67cP1+4/sLuF8jgc=
=q7j9
-----END PGP SIGNATURE-----