n-t-roff / heirloom-doctools

The Heirloom Documentation Tools: troff, nroff, and related utilities
http://n-t-roff.github.io/heirloom/doctools.html
Other
127 stars 23 forks source link

Sentence space and -ms's \** #83

Open aksr opened 5 years ago

aksr commented 5 years ago

If a string is used to mark a footnote, the sentence-space isn't marked after it.

To reproduce:

  1. -ms
  2. .ss 6 100 (setting large sentence space is to show problem more clearly)
  3. Use \** somewhere
  4. Space after \** isn't treated as sentence space (modifing .sentchar doesn't do anything).

(It doesn't matter if the new sentence is marked with a double-space or if it's on the next line.)

MWE:

Nisi ea voluptatem nesciunt excepturi ut.
Voluptatem nesciunt excepturi ut.
Voluptates nisi ea voluptatem nesciunt excepturi ut.\**
Nisi ea voluptatem nesciunt excepturi ut.
Nihil et rem quas dicta error explicabo veniam.
Et rem quas dicta error explicabo veniam.\**  Nihil et rem quas dicta error explicabo veniam.
Et rem quas dicta error explicabo veniam.

It seems to me, it should be possible to use non-regular chars to mark a sentence ending. Maybe I'm missing something?

reffort commented 5 years ago

One thing I would like is a way to actively identify the end of a sentence, in addition to the passive mechanism we have now. This would probably be applicable to the issue you described.

It isn't really practical to identify every character that could be a transparent character--superscripts, for example, could be nearly anything [0-9, A-Z, a-z], and they might come from the ASCII set (reduced in size and shifted up) or be dedicated glyphs (OpenType's <sups> feature). Then there are the various quotation marks, not to mention hot links (and, of course, macros that process note numbers).

An additional issue related to sentence spaces (which isn't really related to this subject, but I'll mention it just to document it) is that when using .ss 12 0 to obtain zero additional space between sentences, a zero sentence space (the expected result) is obtained when the end of a sentence is followed by a newline, but when using the "period and two spaces" method of separating sentences, the result is two spaces, not zero. The User's Manual says otherwise, so this result is unexpected, although it is the traditional behavior. But if the sentence space is non-zero, .ss 12 1 for instance, the result is the requested sentence space size in both cases.