[xep-support] Re: Hyphenation Question

Kevin Brown kevin at renderx.com
Tue Feb 15 16:49:21 PST 2011


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 at renderx.com
[mailto:xep-support-bounces at 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! 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20110215/9893b2c3/attachment.html>


More information about the Xep-support mailing list