OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Break long programlisting lines without spaces?

On 14/04/11 09:06, Jirka Kosek wrote:
> David Cramer wrote:
>> I've done a little research on this and found on the fop list some
>> discussion (pasted below). The fop developers feel that using the
>> hyphenation character to achieve this is an abuse of the
>> hypenation-character property.
> I don't think so. Are FOP developers aware of the fact that DocBook
> stylesheets insert soft-hyphen (U+00AD) character at all places of
> possible break? This characters marks possible places for hyphenation.

Those are two different things. Inserting soft hyphens at certain places
is a ‘manual’ process (in this case automated by the XSLT) that gives
the XSL-FO processor hints about where text can be broken.

The hyphenation-character XSL-FO property simply allows to customise the
character that will be used when a word is broken over two lines. That
character must not and will not be used if the line break occurs between
two words.

AFAIU the DocBook stylesheets do the former. But they do it in a way
that I’m not sure is compatible with the Unicode specification:
A soft hyphen is supposed to be used inside a word, not after

What is needed is a generalisation of the concept of soft hyphen:
a character that appears only if it is at the end of a line. If
I remember well LaTeX provides a \discretionary command that allows to
do that. To my knowledge there is nothing equivalent in XSL-FO.

I keep thinking that this issue is best resolved manually. The output is
likely to look much better as text will be broken at sensible places and
indented appropriately.

>> However, it is to my mind an obvious and
>> important thing to want to do, so I would say that it's an omission from
>> the FO-spec. 
> Of course U+00AD is defined in Unicode and not in XSL-FO.
>> I've meant to post on the fop list asking for an extension
>> feature of some kind to allow for this situation without abusing any
>> features, but haven't gotten around to it.
> It would be nice to ask FOP developers why they think it is abuse. I
> don't see any evidence for this neither in Unicode nor in XSL-FO spec. I
> think that this probably lives in area where exact behaviour is
> implementation dependent. So obvious thing to do is to follow useful
> behavior of market leaders (XEP, XSL Formatter).
> 				Jirka


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]