[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] How can you prevent \| from sabotaging end-of-sentence detection
From: |
Dave Kemper |
Subject: |
[groff] How can you prevent \| from sabotaging end-of-sentence detection? |
Date: |
Sun, 4 Feb 2018 18:19:56 -0500 |
I'm probably overlooking something obvious here, but it's eluded me
long enough to type and send this message.
Consider this three-line input:
.ss 12 48
\[lq]He said `seven.'\[rq]
John frowned.
(The first line merely makes the sentence space large enough to be
visibly obvious; it has no effect on the core issue.)
groff recognizes that a sentence space should come between the right
double-quote character and the word "John," because the . has cflags
property 1 set (i.e., it is an end-of-sentence character), and both
end-quote characters have cflags property 32 set (i.e., they are
ignored for sentence-detection purposes.)
To improve typographic quality, it is common to insert a thin space
between an adjacent single-quote and double-quote character. In this
example, the second input line would thus become:
\[lq]He said `seven.'\|\[rq]
This addition, however, prevents groff from recognizing the period as
an end-of-sentence character, because while both end-quote characters
have cflags property 32 set, the thin space does not.
The obvious solution is to set this property for the \| character,
which should be done with the following line:
.cflags 32 \|
But this emits the warning "normal or special character expected (got
a horizontal space)" and has no effect on the output.
What's the correct way to get groff to ignore the thin-space character
in end-of-sentence detection?
- [groff] How can you prevent \| from sabotaging end-of-sentence detection?,
Dave Kemper <=