Re: [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config

"G. Branden Robinson" <[email protected]>
Newsgroups org.kernel.vger.linux-man
Message-ID <20260807034935.elgrkedh7c2a4txp@illithid>
At 2026-08-06T23:29:43-0400, DJ Delorie wrote:
> The problem I had with .PD placement was not the compactness of the
> list itself, but the inter-line spacing between the list and
> previous/following paragraphs.  You just have to know to put the .PDs
> before the paragraphs that come after the space you want to affect:

Right.  But having to know that is one of those fiddly details that
deters people from using man(7), no?

https://lore.kernel.org/linux-man/[email protected]/

> .P
> normal paragraph
> .P
> * list item
> .PD 0
> .P
> * list item
> .P
> * list item
> .P
> * list item
> .PD
> .P
> normal paragraph
> 
> My HTML background had me put the first .PD before the first list
> item, which bunched the list up against the previous paragraph.

Control of this sort of detail of formatting is, I submit, more
straightforward with the new `LS`/`LE` macros forthcoming in groff 1.25.
If you want a (compact) list bunched up against the preceding paragraph,
don't put a `P`[1] between the paragraph text and the list.  If you
don't want it bunched, _do_ put a `P` there.

Here's an illustration of your example above using each method.

$ cat ATTIC/dj-delorie-demo-PD.man
.TH foo 1 2026-08-06 "groff test suite"
.SH Name
foo \- frobnicate a bar
.SH Description
Baz qux.
.P
normal paragraph
.P
* list item 1
.PD 0
.P
* list item 2
.P
* list item 3
.P
* list item 4
.PD
.P
normal paragraph
$ cat ATTIC/dj-delorie-demo-LS-LE.man
.TH foo 1 2026-08-06 "groff test suite"
.SH Name
foo \- frobnicate a bar
.SH Description
Baz qux.
.P
normal paragraph
.P
.LS itemized 1 2n
.IP *
list item 1
.IP *
list item 2
.IP *
list item 3
.IP *
list item 4
.LE
.P
normal paragraph

These render the same.  Here, I'll prove it:

$ nroff -man ATTIC/dj-delorie-demo-PD.man >| dj-PD.txt
$ nroff -man ATTIC/dj-delorie-demo-LS-LE.man >| dj-LS-LE.txt
$ cksum dj-*
3663585518 394 dj-LS-LE.txt
3663585518 394 dj-PD.txt

Since groff 1.25.0 isn't released yet, let me add full disclosure.

$ nroff --version | head -n 1
GNU nroff (groff) version 1.25.0.rc2.16-0e05a

The result?

$ cat dj-LS-LE.txt
foo(1)                       General Commands Manual                      foo(1)

Name
     foo - frobnicate a bar

Description
     Baz qux.

     normal paragraph

     * list item 1
     * list item 2
     * list item 3
     * list item 4

     normal paragraph

groff test suite                   2026‐08‐06                             foo(1)

Regards,
Branden

[1] or its synonyms `PP` or `LP`
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmp1VccACgkQ0Z6cfXEm
bc5VoA//XrUkxULw+OJBifYjEkeeTFU9ehJ8CMEChDgRZCF4wt5KtmdlDGeZ1xiy
25+DmlPZKylBUPBNc25ZcpCycnW4yUabiEd6KfcLHQY3bxCTx+s0VZHCd4kpqCnL
wnJuigQOI11QyybJLF6nPxmYfVR1c7ec+y0pQGaAOXTUCdfa0kRxgdl+hCZBC4YE
q2nvmhKIECTKf0Sym1U7MLeLz50wd2xRe1VDUIM+T7tz+BYss0lD6IIAtpRDK+RW
8BW6cuGDn8DSJtRsGW/pjiR9v2Z3lBT91DNxmejSJGaai8is6oeEdBCsR6Ovyz1m
DiWdmeLp3RNQZL2gt0+EzKm5VWgmeBB548m4nt6pk4j9C6h4Hx/L+QxPvX7ZO064
Q/IcGlQcvZRjtE2b/SKSSZImGDnaPc7FFFm4wwvWtWdfIKU1m/2GpREhrWFVwKma
ooJb36i+iswXTPC4EkkChdXn9kul1qmeuytrkwIKcNp6HSNpoMRyqJTLOmTn2Ma3
75o5DjORl4W69Y9K0syX2BOu7ptajl25Sz08LLiSlrRvQu8GDHungJQD/TME7NQ4
Ikd0DVN7iJdm1P0R0I/A/tXP4pBdA5ELUBG/x2SUlAHCWCTDMBhBfInQHq4/DVOr
a76VyeU4/QJUNJktiOsgOQohodzcb1oI9IXkLDJG2yp/oMWeznw=
=bdW8
-----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.