[Top][All Lists]

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

Re: [groff] man 7 groff; was Make editorial fixes.

From: Tadziu Hoffmann
Subject: Re: [groff] man 7 groff; was Make editorial fixes.
Date: Tue, 2 Jul 2019 17:24:57 +0200
User-agent: Mutt/1.11.4 (2019-03-13)

> A personal false-identification hazard:
> in the court of groff I will be declared innocent if I call
> myself M. Douglas McIlroy,
> but will be sentenced if I call myself Mr. Douglas McIlroy,

Not sure what you mean here.  Groff will treat both exactly the
same, it's TeX that will treat them differently (period after
lower-case letter = end of sentence, period following capital
letter = not end of sentence).

In groff it's much simpler: end of sentence is recognized as
period at end of line or period followed by two spaces.  
(Ditto for question mark and exclamation mark.)
Excess spaces will be treated by groff as usual, i.e., just
copied as-is to the output.

Consider the attached example.  The resulting text in nroff
with the exaggerated sentence space, and the number of spaces
in the output, are:

              Output                    Number of spaces
      M. Douglas McIlroy                 1
      Mr. Douglas McIlroy                1
      M.       Douglas McIlroy           7 =   1   + 6
      Mr.       Douglas McIlroy          7 =   1   + 6
      M.       Douglas McIlroy           7 = 2 - 1 + 6
      Mr.       Douglas McIlroy          7 = 2 - 1 + 6
      M.         Douglas McIlroy         9 = 4 - 1 + 6
      Mr.         Douglas McIlroy        9 = 4 - 1 + 6
      M.  Douglas McIlroy                2
      Mr.  Douglas McIlroy               2
      M.    Douglas McIlroy              4
      Mr.    Douglas McIlroy             4

The "roff" manpage suggests:

  Start each sentence on a line of its own, for the spacing
  after a dot is handled differently depending on whether it
  terminates an abbreviation or a sentence.  To distinguish
  both cases, do a line break after each sentence.

(I guess what is actually meant is "should typographically be
handled differently", because groff has no way to automatically
recognize abbreviations.)

The recommendation is also useful (even when you're using TeX
or HTML or some other markup language that allows text reflow)
if you are keeping documents in a line-oriented version control
system, because it restricts the differences detected between
versions, in that it does not cause an entire paragraph to
become flagged as different if only one sentence is changed.

Description: Text document

reply via email to

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