[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] man 7 groff; was nroff.1.man Make editorial fixes.
From: |
John Gardner |
Subject: |
Re: [groff] man 7 groff; was nroff.1.man Make editorial fixes. |
Date: |
Wed, 3 Jul 2019 02:34:22 +1000 |
>
> *or some other markup language that allows text reflow*
Text reflow? What the hell is that?
<https://raw.githubusercontent.com/Alhadis/Coding-Style/master/README.md> =)
Seriously though, I advocate the "one sentence per line" rule in
reflow-friendly languages as much as possible. Aside from the obvious
benefits to diffing and version control, it facilitates code review — I
remember leaving feedback on a pull-request at GitHub that had three
*paragraphs* one one line (that's right, not sentences, *entire paragraphs*).
Since I was proof-reading, all my comments would have been easier to follow
had they been written under the relevant line-numbers... (screenshot
<https://user-images.githubusercontent.com/2346707/47905214-a0fd6d00-deda-11e8-93a4-5736274c131a.png>
if
you need help visualising).
Total pain-in-the-ass...
On Wed, 3 Jul 2019 at 01:54, Tadziu Hoffmann <address@hidden>
wrote:
>
> > 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.
>
>
>