Re: [xsl] Hyphenation in XSL FO

Subject: Re: [xsl] Hyphenation in XSL FO
From: Gustaf Liljegren <gustaf.liljegren@xxxxxx>
Date: Wed, 10 Jan 2001 12:41:26 +0100
Sebastian Rahtz wrote:

> > intention is (please correct) that implementors has to learn and make
> > hyphenation rules for different countries, languages and scripts. First of
> > all, it must be quite a large job only to implement half a dozen of the
> > most common cases within ISO 8859-1.

>its been done already, for many languages

But how can it be done with so many exceptions to the rules? There are lots
of words that should not be hyphenated; names on persons, streets and
places, days, months and so forth. Acctually, there's even a need for not
splitting two words sometimes; number + unit/currency, street + number and
so on. But I wouln't call for *that* other than in professional WYSIWYG
publishing programs. Overall, I tend to be a bit sceptical about processing
formatting for a whole book in one big step, without a chance to handle
exceptions like this.

> >   <fo:block hyphenation-exception="uri(list.txt)">

>DSSSL is not a formatter, so how can it have a hyphenation exception

Formatter or specification for a formatter, what does it matter? Here's the
property I found:

hyphenation-exceptions: is a list of strings. Each string is a word which
may contain
hyphen characters, #\-, indicating where hyphenation may occur. If a word
to be
hyphenated occurs in the list, it may only be hyphenated in the specified
places. The initial
value is the empty list.

>Cant speak for FOSI, but TeX's hyphenation exception lists
>are bundled with the patterns, and compiled in, not read at runtime.

Sorry, I'm just a TeX (or acctually LaTeX) newbie, so I'm not familiar with
the concept of patterns. Do you think this is a criteria for processing a
hyphenation list? Would it be too slow otherwise?

> > list are never hyphenated. If this feature is not added, I'm afraid we'll
> > have to wade through a lot of FO code to correct bad hyphenation before
> > processing the final output.

>you dont know what the hyphenation is going to be, when you read a FO file..

I meant doing the processing time after another until everything is right.

> > Finally, I think there should be a property for setting the minimum number
> > of characters for hyphenated words.

>isnt that hyphenation-push-character-count and

Unless you're working with very narrow columns, there is seldom a need for
hyphenating words with less than, say, 6 characters, although a hyphenation
with only 2 characters on either line may still be okay (acctually no less
than 3 for hyphenation-push-character-count in my country). So I figure
that a property like this would in some cases replace, and in some cases
help the other two.

Gustaf Liljegren

 XSL-List info and archive:

Current Thread