[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Inserting softHyphens in FO


Subject: RE: [xsl] Inserting softHyphens in FO
From: "Roland Neilands" <rneilands@xxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Aug 2002 08:50:43 +1000

> I have a document that has lots of tables. These tables
> document our XML
> Schema which has some very long element, entity, and datatype
> names that
> are composed of many words and partial words glommed
> together. For instance:
>
> PCBASICDRIVER
> ScheduleType
> IncludedExcludedIndicator
> PCCREDITSURCHARGE
> NonOwnedAutoCategory
>
> These values show up in a column of this table. With FOP it
> doesn't seem to
> hyphenate or break these values in anyway. Instead it just
> overruns into
> the next column.
>
> Now I have a little routine that counts a number of
> characters and inserts
> a space so I get some wordwarp. Problem is that I use a
> proportional font
> so the Words with all caps runover at an early point then
> words with lots
> of skinny characters.
>
> I need a better approach to make these word breaks. I would
> like to find
> the actual print width of the word and then divide it
> according the amount
> of space needed rather than counting characters.
>
> My other choice would be to try and get some new hyphenation
> rules or be
> able to insert my own soft-hyphens that FOP would recognize
> and use when it
> needs the space.
>
> Any ideas on how to do this?
>
> ..dan

Check the FOP list archive for instructions on hyphenation.
http://marc.theaimsgroup.com/?l=fop-user&r=1&w=2#

Alternatively for things like part numbers inserting zero width spaces using
XSLT is common, you could try this before each capital letter. This method
is in the archive too.

Regards,
Roland



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords