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?


Vincent Hennebert wrote:

> 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.

If the hyphenation point is made automatically by formatter then there
of course shouldn't be visible hyphenation character. But there is
nothing saying that if SHY is used and line break occurs after it, SHY
should be discarded. SHY is discarded only if the line break is not
occurring after it.

I understand to your reasoning which is based on fact that hyphenation
should occur only inside words. But even in XSL-FO hyphenation is not
property of word, but of single character, see:

http://www.w3.org/TR/xsl/#hyphenate

Especially for CJK languages common "Western" concept of word,
hyphenation and word/line breaking is completely wrong.

> 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:
> http://www.unicode.org/reports/tr14/#SoftHyphen
> A soft hyphen is supposed to be used inside a word, not after
> whitespace.

I don't see anything there suggesting that SHY can't be used after any
arbitrary character. This section describes how SHY is supposed to work
inside words and how it is related to hyphenating.

> 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.

Unfortunately there is no \discretionary equivalent in XSL-FO.

Requirements for XSL-FO 2.0 lists "2.2.10 Text before or after a break"
which might solve some use cases of \discretionary

http://www.w3.org/TR/xslfo20-req/#N66479

> 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.

That's true except for cases where you don't have luxury of fixing it
manually. Then it is better to have indication of forced line breaks,
then no such indication or even cropped text.

				Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

OpenPGP digital signature



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