[xep-support] Re: Hyphenation Question

From: Kevin Brown <kevin@renderx.com>
Date: Tue Feb 15 2011 - 16:49:21 PST

XEP is Liang's . what one would consider the authority on hyphenation
algorithms.

 

Personally, I would not take hyphenation from a web browser as indicative of
anything. It can't even contemplate flow, pagination and much else
correctly. It is, afterall, a web browser and not a high-quality document
publishing application. In other words . web browsers will actually break
words at "any" location they desire to make things fits into a small space.
I have often seen things .

 

Lik

e

thi

s

 

Kevin

 

From: xep-support-bounces@renderx.com
[mailto:xep-support-bounces@renderx.com] On Behalf Of Jeffrey Thalhammer
Sent: Tuesday, February 15, 2011 4:31 PM
To: RenderX Community Support List
Subject: [xep-support] Re: Hyphenation Question

 

 

On Feb 15, 2011, at 4:17 PM, Kevin Brown wrote:

The suggested solution is the exact correct solution. If you have certain
elements where this exists, you can just do a recursive XSL template to
insert a zero-width space (U+200B or 8203) right after the "-" character you
have in the XML content (if you are using XSL). This essentially has the
effect of inserting an invisible (zero width) space character at that point.
With hyphenation off, the formatter would break at any space and if your "-"
is at or near the end-of-line, then it could break at this location.

 

 

We're not using XSL, but that is basically what we'll probably do. In our
case, it is a bit more complicated because not all hyphens are candidates
for line breaks. In some situations, the hyphen-minus (U+002D) really means
non-breaking hyphen (U+2011), and sometimes it means hyphen plus zero-width
space (U+200B). But that is another issue -- nothing to do with XEP.

 

I think the most interesting part is that HTML rendering engines treat
U+002D as a breakable character and XEP does not. Anyone know the history
there? I read the article on hyphens on Wikipedia, but didn't get any clues
there.

 

-Jeff

!DSPAM:87,4d5b1ac663733521636351!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Tue Feb 15 16:49:35 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 16:49:37 PST