On Tue, 19 Jan 2010, Boris Sch鄟ing wrote:
> Is there any support in the DocBook XSL stylesheets to break long lines in
> XHTML? I know it sounds strange. As ePub files are based on XHTML and there
> is no way to add a horizontal scrollbar (with CSS) to code examples with
> long lines it's unfortunately a requirement. In my ePub files which I
> created so far the long lines are simply cut off. Or does anyone know a
> preprocessor (on Windows) to reformat source code automatically (the source
> code is in separate files which are included)?
>
> Boris
>
Do you have a pretty-printer (source code reformatter) for the
language being used? It might be simpler to run the original
source code files thorugh a pretty-printer before wrapping them
as DocBook <programlisting> elements. It is usually a good
thing to do in any case, to make sure that the layout of the
code is consistent.
If you're using some element type other than <programlisting>,
be sure to set xml:space="preserve".
/s/ Ernest G. Allen