[xep-support] Re: Hyphenation Question

From: Jeffrey Thalhammer <thalhammer@apple.com>
Date: Tue Feb 15 2011 - 16:30:58 PST

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.



(*) 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
Received on Tue Feb 15 16:31:08 2011

This archive was generated by hypermail 2.1.8 : Tue Feb 15 2011 - 16:31:09 PST