Re: A proposed standard for CSS-controlled sentence spacing

Thomas A. Fine 2013-01-09:
> The javascript relies on finding two spaces between sentences for
> sentence detection.

This is specific to English habits (only).

> This eliminates all sorts of ambiguous situations,


There are at least two ways to unambiguously markup sentences, 
so there would need to be about as many ways in CSS, too.

 <p><phrase>I知 a sentence.</phrase> <phrase>Me too!</phrase></p>

 <p><phrase>I知 a sentence.</phrase><phrase>Me too!</phrase></p>

 <p><phrase>I知 a sentence.</phrase>Me too!</p>

 <p>I知 a sentence.<phrase>Me too!</phrase></p>

 <p>I知 a sentence.<gap> </gap>Me too!</p>

 <p>I知 a sentence.<gap/> Me too!</p>

 <p>I知 a sentence.<gap/>Me too!</p>

 <p>I知 a sentence.&gap; Me too!</p>

 <p>I知 a sentence.&gap;Me too!</p>

> There's no reason why CSS can't directly use 
> the two spaces following terminal punctuation as a way to reliably 
> detect sentences in a way which is fully controlled by the user, 
> and yet trivial at content creation time.

CSS could reliably use a single period followed by any number of whitespace characters as well, 
if all other occurrences are marked up properly.

  <p>I知 a sentence with an <abbr>abbr.</abbr> in the middle, 
     <abbr>i. e.</abbr> interesting. I知 a sentence, too.  
     My 2.0 cents (no space).</p>

  p    {gap-size: 1.4ch;} /* or 壮entence-spacing */
  abbr {gap-size: 0.6ch;}

What about the horizontal tabulator, however?

 <p>I知 a sentence.	Me too!</p>

 p {tab-size: 2; white-space: pre-wrap;}

Maybe a new value for the 層hite-space property would be preferable, 
叢re-space would have a row entry of 鼎ollapse Preserve Wrap in the table 
at <>.

You could also argue that CSS should be able to set the 
(exact or minimum and maximum) size of some of the space characters 
defined by Unicode, besides U+0009.

Received on Thursday, 21 August 2014 13:36:08 UTC