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?


Hi Vincent,

On 04/14/2011 10:12 AM, Vincent Hennebert wrote:
> 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.

Yes, but there are cases where that's impossible. For example, we have
code samples stored in external files. These files are part of the build
and test suites, so the same sample code that appears in the doc was
used in the product, test cases, etc. It's difficult in this case to add
strange characters or other markup in the code samples.

> 
>>> >> 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 was thinking here at a higher level. As a stylesheet developer, I need
some way to solve the problem of specifying that in verbatim
environments, the lines be automatically broken (at a configurable set
of characters) when they exceed the available space and a special
character be added to indicate to the user that the line was broken for
typographical reasons. The hyphenation approach does indeed feel like a
hack. I think it would be better if I just told the fo renderer what I
want (break-long-lines="yes" break-at="/*();. "
break-character="⇦") and have it decide how to deal with the problem.

Another problem that arises with FOP and the hyphenation approach is
that font-select-strategy isn't supported, so you are limited in the
characters you can use as you hyphen character. You typically use a
monospace font for your code listings but want to use some kind of fancy
arrow character to indicate the line was broken. The monospace fonts
don't have any suitable characters so you're stuck.

Thanks,
David


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