groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .TQ to replace .PD 0


From: Ingo Schwarze
Subject: Re: .TQ to replace .PD 0
Date: Mon, 23 May 2022 04:29:45 +0200

Hi Doug,

Douglas McIlroy wrote on Sun, May 22, 2022 at 09:21:19PM -0400:

> .TQ strikes me as awfully special pleading: a single-shot zero-spaced
> tagged list item.

The typical use case is in a tagged list that uses normal vertical
spacing in general, but contains a few entries that need two or more
tags for a few of the list entries.  For example, in a csh(1)
manual page, you might say something like:

  .TP
  \fBcd\fP [\fIname\fP]
  .TQ
  \fBchdir\fP [\fIname\fP]
  Change the shell's working directory to ...
  .TP
  .B continue
  Continue execution of the nearest enclosing
  .B while
  or ...

to format as:

    cd [name]
    chdir [name]
        Change the shell's working directory to ...

    continue
        Continue execution of the nearest enclosing while or ...

> .PD is at least general-purpose. It sets paragraph spacing globally,
> which I deem much better than setting it separately (via .TQ) for
> every item in a list.

Indeed, you wouldn't normally use .TQ if you want the whole list
without vertical spacing.

All that said, yes, you have a point that it is a bit dubious macro
design to have a special macro for this rather limited use case.

Then again, it is kind of typical for today's man(7) implementations
that on the one hand, they have a number of excessively specific
macros that are used infrequently or are awkward to use (consider
for example .DT .OP .SB) but at the same time lack macros for
some common tasks (consider for example the "\fBcd\fP [\fIname\fP]"
three-font problem appearing above, which even the \c trick cannot
solve inside .TP next-line scope).

> I fail to see any case for deprecating .PD.

I have no strong opinion on that.  FWIW, i did not mark .PD as
deprecated in the man(7) manual page distributed with mandoc(1),
apart from marking the whole man(7) language as deprecated in
the first place.

Yours,
  Ingo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]