[Top][All Lists]

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

Re: 5n vs 7n: is it an objective question?

From: G. Branden Robinson
Subject: Re: 5n vs 7n: is it an objective question?
Date: Mon, 10 Apr 2023 19:20:15 -0500

Hi Alex,

At 2023-04-10T22:43:18+0200, Alejandro Colomar wrote:
> I'm not going to answer in Savannah, because as Ingo, I also do not
> like interactive web interfaces.  Let's discuss it over email.
> Ingo claimed 7n is wasting screen.

I'll come back to this.

> Branden claimed that preferring 5n is subjective.

It _is_ also traditional in English typography.  I'm old enough to
remember typing class--maybe I'm in the last generation that had that.
But I "cheated" and never learned to touch type properly because I'd
already taught myself on the keyboard of an 8-bit micro.  But what the
instructors did have to impart were formatting rules.  Half an inch, or
5 spaces (same thing at 10 pitch, i.e., 10 characters per inch).  Though
I remember 4 spaces being preferred in some quarters.  I don't have
citations for any of this; my copies of MLA 8th ed. and Chicago MoS are
in storage.

> I agree with Branden that it is subjective, and moreover, prefer 7n.
> For my rationale, I'll say that I like indenting code with tabs, and
> tabs are of course 8-columns wide.

Wouldn't that militate more for 8n indentation?  ;-)

Ingo looked and the groff default of 7.2n seems to have been an early
choice of James Clark's (pre-groff 1.01) with no rationale documented.
I can confirm this.  (The 7n alternative for nroff mode was a change by
Werner Lemberg in commit 73e686cef3, 2002-12-09, for the rounding issues
warned about in groff_man(7) to this day.)

Because the same indentation was used for the base paragraph left
margin and incrementally for the additional inset of relative insets
(RS/RE) and tagged/indented paragraphs (TP, IP, HP), my hypothesis is
that Clark did some experimenting on an existing corpus of man pages
(SunOS 4's seems likely candidates based on other evidence and accounts)
and determined that these defaults produced a good result.  What
constituted that good result I'll come back to in a moment--first, I'd
like people to note that "7.2n" (on typesetting devices) is weirdly

So, in what sense did 7.2 produce a good result?  My guess is that
these values minimized the output page count, by locating a sweet spot
for paragraph tag widths.

You don't have to read many man(7) pages to notice that `TP` is heavily
used.  If one has an "Options" section, this macro is far and away the
preponderant means of presenting command-line options.  Observe that 5n
is just a bit too short to hold "-a arg", once one remembers that some
separation between the paragraph tag and the subsequent text is
necessary.  So even with this fairly laconic form (ignoring long
options, be they GNU- or X11-style, and eschewing descriptive noun
phrases for metasyntactic parameters), 5n just wouldn't work.  6n and 7n
would, and the latter would furthermore give you two ens of separation,
making it pretty clear that the tag was not (necessarily) the start of a
sentence.  That's an important consideration if the option description
fits on one output line.  And you never know how wide someone's terminal
will be.

An experiment occurred to me, such that I might format all of groff's
man pages (~60 documents, ~380 pages) in PostScript repeatedly, changing
the "standard indentation" (IN) register value in increments of 0.1i
from 5n (0.5i) to 10n (1i).  Then, see which choice of IN in this range
produced the fewest pages.

> That pretty much tells all I think about this, except for one thing.
> Long lines are hard to read, and I tried reading a few pages with 5n,
> just to see, and I run `mman 3bsd arc4random` and a few more, just to
> see how it looks like.  The first impression is:  too much text.
> I have similar issues with the PDF book of the Linux man-pages that
> Deri produced.  Too loong lines.
> I'm not saying all this to start a war between 5n and 7n, but rather
> to agree that we will disagree in what we consider sane defaults, and
> so I think having this configurable will be good for both.

I don't have strong feelings about 5n versus 7n.  I do value having
reasonably economic use of the page without crowding it.  But "crowding"
is a subjective thing too--although we do have the benefit of a few
hundred years of typographic tradition informed by interaction of page
arrangement with the human visual system.  On the other hand, those
traditions were informed by reading of the printed page, not graphical

My other goals are:

1.  Ensure that such rendering parameters are reader-tunable (i.e., via
-r and -d command-line options and via the "man.local" file).  This is
an anti-goal for mandoc(1), as I understand it, so that project may have
to make more difficult choices.

2.  Minimize temptation of man page authors to take recourse to
explicitly specifying indentation amounts.  These will override the
readers' preferences (if expressed), and while they may sometimes be
necessary, I don't think they should be a tool of first resort.

3.  Discourage "stupid man(7) tricks"[1] like ".TP \w'my longest tag'".
This sort of cleverness is fine for any other application of *roff but
in man pages it bloats the amount of *roff knowledge the document
maintainer needs to have.  It is also prone to bit rotting when someone
adds another tagged paragraph later and doesn't understand, or perhaps
even see, what '\w' was doing in the first place, because it's more than
3 lines of context away in a diff.

ObGroffReleaseNews: I got the go-ahead from Bertrand to merge all the
"risk tier 1" changes to master, so I'll be doing that shortly.  He said
he'd like to use identical commits for RC4 and the final tag, assuming
no show-stoppers arise in the interim.


[1] David Letterman references surely date me as badly as having been in
    a typing class in elementary school.

Attachment: signature.asc
Description: PGP signature

reply via email to

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