Line Breaking

[originally posted 4/14/2009]

Some useful links from yesterday about line breaking:

XSL-FO is good for a lot of things, but there’s a lot that’s outside the scope of pure FO. Line breaks, for example. Deliberate line breaks are easy enough, using the element, but what about line breaks that occur in the natural course of flowing a page? FO doesn’t handle that; it’s left as an exercise for whoever implements the page flow portion of the FO renderer. Unicode provides us with some help here:

The Unicode line breaking specification:

A list of line break characters:

Even applications that ‘follow the spec’ have a significant amount of latitude in implementation though, which makes line breaking a little bit different with each page flow engine you use. If you’ve got specific concerns (say, about breaking after a solidus in URLs vs. in dates), it’s wise to test them before making implementation choices and see if they can be configured to your needs. Some formatting tools will allow you to configure the line break rules, but some won’t.

To configure line breaking in XSL Formatter, use the axf:line-break attribute, along with the various include/append dependent attributes (information here:

Comments are closed.