Next: Hyphenation, Previous: Filling, Up: Text [Contents][Index]
A passionate debate has raged for decades among writers of the English
language over whether more space should appear between adjacent
sentences than between words within a sentence, and if so, how much, and
what other circumstances should influence this spacing.24
GNU
troff follows the example of AT&T
troff; it attempts to detect the boundaries between sentences, and supplements
them with inter-sentence space.
Hello, world!
Welcome to groff.
⇒ Hello, world! Welcome to groff.
GNU
troff flags certain characters
(normally
‘!’,
‘?’,
and
‘.’)
as potentially ending a sentence.
When
GNU
troff encounters one of these
end-of-sentence characters
at the end of an input line,
or one of them is followed by two
(unescaped)
spaces on the same input line,
it appends an inter-word space
followed by an inter-sentence space in the output.
R. Harper subscribes to a maxim of P. T. Barnum.
⇒ R. Harper subscribes to a maxim of P. T. Barnum.
In the above example, inter-sentence space is not added after ‘P.’ or ‘T.’ because the periods do not occur at the end of an input line, nor are they followed by two or more spaces. Let’s imagine that we’ve heard something about defamation from Mr. Harper’s attorney, recast the sentence, and reflowed it in our text editor.
I submit that R. Harper subscribes to a maxim of P. T.
Barnum.
⇒ I submit that R. Harper subscribes to a maxim of
⇒ P. T. Barnum.
“Barnum” doesn’t begin a sentence!
What to do?
Let us meet our first
escape sequence,
a series of input characters that give instructions to
GNU
troff instead of being used to construct output device glyphs.25
An escape sequence begins with the backslash character
\
by default,
an uncommon character in natural language text,
and is
always
followed by at least one other character,
hence the term “sequence”.
The dummy character escape sequence \& can be used after an
end-of-sentence character to defeat end-of-sentence detection on a
per-instance basis. We can therefore rewrite our input more
defensively.
I submit that R.\& Harper subscribes to a maxim of P.\&
T.\& Barnum.
⇒ I submit that R. Harper subscribes to a maxim of
⇒ P. T. Barnum.
Adding text caused our input to wrap; now, we don’t need \& after
‘T.’ but we do after ‘P.’. Consistent use of the escape
sequence ensures that potential sentence boundaries are robust to
editing activities. Further advice along these lines follows in
Input Conventions.
Normally, the occurrence of a visible non-end-of-sentence character (as
opposed to a space or tab) immediately after an end-of-sentence
character cancels detection of the end of a sentence.
For example,
it would be incorrect for the formatter to infer the end of a sentence
after the dot in ‘3.14159’.
However,
it treats several characters
transparently
after the occurrence of an end-of-sentence character—it does not
cancel end-of-sentence status upon encountering them.
Such characters are often used as footnote marks
or to close quotations and parentheticals.
The default set is ‘"’, ‘'’, ‘)’,
‘]’, ‘*’, \[dg], \[dd], \[rq], and
\[cq].
The last four are examples of
special characters,
escape sequences whose purpose is to obtain glyphs
that are not easily typed at the keyboard,
or which have special meaning to the formatter
(like \ itself).26
\[lq]The idea that the poor should have leisure has always
been shocking to the rich.\[rq]
(Bertrand Russell, 1935)
⇒ "The idea that the poor should have
⇒ leisure has always been shocking to
⇒ the rich." (Bertrand Russell, 1935)
Configure the sets of characters that potentially end sentences
or are transparent to sentence endings
with the
cflags
request
(see Characters and Glyphs).
Use the
ss
request
to change—or eliminate—supplemental inter-sentence space
(see Manipulating Filling and Adjustment).
Next: Hyphenation, Previous: Filling, Up: Text [Contents][Index]