Re: [groff] How can you prevent \| from sabotaging end-of-sentence detection?

2018-02-05 Thread Dave Kemper
On 2/5/18, Boss Hog  wrote:
> The \| isn't truly a character, it simply instructs groff to pick up its
> pen and move a few steps to the right. By using the .char request we may
> create a virtual character to operate on.

Thank you, that was exactly what I needed.

In fact, once you gave me the idea to wrap the horizontal movement in
a .char request, I discovered I could assign even the \| escape in
this manner, not needing to resort to the lower-level \h.

This method seems like a little unnecessary overhead, but one
advantage is that you can make different uses of the thin space
context-dependent; that is, you can tell groff that \[Q_S] should be
ignored in end-of-sentence detection, but other thin spaces (using \|
directly, or a different .char definition) should not be.  Not a
practical consideration for me, since separating quotation marks is
the only place I use it, but my inner programmer appreciates the
semantic distinction.



Re: [groff] How can you prevent \| from sabotaging end-of-sentence detection?

2018-02-04 Thread Boss Hog
On Sun, Feb 04, 2018 at 06:19:56PM -0500, Dave Kemper wrote:
> 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.
> 
> 
> What's the correct way to get groff to ignore the thin-space character
> in end-of-sentence detection?
> 

This works for me:

.cflags 32 \[Q_S]
.char \[Q_S] \h'.5n'
.ss 12 48
\[lq]He said `seven.'\[Q_S]\[rq]
John frowned

***
The \| isn't truly a character, it simply instructs groff to pick up its
pen and move a few steps to the right. By using the .char request we may
create a virtual character to operate on.