The ellipsis character in some fonts occasionally shows a lack of 
attention, and the spacing is often too tight. I'd rather just use normal 
non-breaking interword spaces between the dots of an ellipsis, and I'd like 
to handle end-of-sentence ellipses properly as well:

xxx xxx ... xxx ⟶ xxx xxx . . . xxx
xxx xxx.... Xxx ⟶ xxx xxx. . . . Xxx
xxx xxx!... Xxx ⟶ xxx xxx! . . . Xxx
xxx xxx?... Xxx ⟶ xxx xxx? . . . Xxx


(Typography geek note: Note that the dots in the “....” and “!...” are 
pretty much equidistant, but that “?...” isn't. That's something else I 
wanted to fix, even though it's more or less font-specific.)

So this was my first attempt:

# Ellipses 

# (1) Make "..." go back to default behavior. 

(?<!\\)\.\.\.=... 

# (2) "...." and "!..." 

([.!])\.\.\.=\1&nbsp;.&nbsp;.&nbsp;.
# (3) "?...", with slight kern to adjust for width of "?" 

[?]\.\.\.=<span style="letter-spacing: 
-0.1em;">?</span>&nbsp;.&nbsp;.&nbsp;. 

# (4) Normal non-escape ellipses again.

(?<!\\)\.\.\.=.&nbsp;.&nbsp;.
# (5) Escaped ellipses. 

\\\.\.\.=...


Given the source paragraph

So ... how does this work now?... Hey, pretty good!... Excellent.... \... 
yes?


I get:

<div class="paragraph"><p>So .&nbsp;.&nbsp;. how does this work 
now?.&nbsp;.&nbsp;. Hey, pretty good!.&nbsp;.&nbsp;. 
Excellent.&nbsp;.&nbsp;.. ... yes?</p></div>

The first normal ellipsis works, but unfortunately, the "normal non-escape 
ellipses" (expression 4) seems to take precedence over the other 
end-of-sentence replacements (expressions 2 and 3), thus screwing up the 
spacing.

This confuses me a bit, because according to the user guide's relevant 
section <http://www.methods.co.nz/asciidoc/userguide.html#X10>,

*Replacements are performed in the same order they appear in the 
configuration file replacements section.*


Anyone have an idea of what I'm doing wrong?

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to