[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] line breaks / hyphenation in tables
Hi Benjamin,The DocBook FO stylesheet has a feature for inserting soft hyphens in long URLs for links, as described here:
http://www.sagehill.net/docbookxsl/Ulinks.html#BreakLongUrlsThis would have to be adapted through a customization layer to apply to certain strings in table cells. The customization would call the template named 'hyphenate-url' with a param named 'url' that contains the string you want to hyphenate. It returns the string with the soft hyphens (or zero-width spaces) inserted after the characters you designate in the stylesheet param 'ulink.hyphenate.chars', which would include underscore in your case. The template's usage is shown in fo/xref.xsl in the templates matching on <link> and <ulink>.
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 5/21/2015 1:08 AM, Kallauch, Benjamin (EEIN) wrote:
Dear folks, I faced an issue with hyphenation in table cells. We automatically export strings from a database, that cannot be matched by the FOP hyphenation. I use the precompiled JAR made available through OFFO. The strings in the table cells are kind of: “vvvvv_xxxxx_yyyyyy_zzzzz” with underscores between the substrings and the substrings being of variable length. The problem occurs, that long strings will not break at the cell border and bleed into the next cell. Of course I could use soft hyphens manually, but this is only a work around as the database export of the strings should be done automatically. Is there any docbook attribute or PI, that I could use? Or is it probably best to add a special hyphenation pattern? If so, has anyone of you done this once for FOP? I know that this is maybe not the best list for this. But if anyone had a solution here, why not asking also this list? best regards, Benjamin
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]