docbook-apps

Re: [docbook-apps] inclusion of a cr/lf file inside a programlisting results in double spaced lines in my pdf

  • 1.  Re: [docbook-apps] inclusion of a cr/lf file inside a programlisting results in double spaced lines in my pdf

    Posted 09-02-2006 08:33
    Hi Chris,
    I'll assume you are using XEP as the XSL-FO processor, since neither fop
    0.20.5 nor Antenna House exhibit the double line spacing.

    When you XInclude a Windows text file using parse="text", each line ends
    with the Unicode sequence " ". When the property
    white-space-treatment="preserve", XEP treats each of these as a line break
    and you get double spacing. I guess FOP and AH are more generous in their
    interpretation and treat the sequence as a single line break, since it is
    the well known signature of a Windows text file.

    But the authors of XSL-FO actually considered this, and provided (in
    section 7.15.8) for white-space-treatment="ignore-if-before-linefeed". When
    that property is set, then any whitespace characters preceding a
    character should be ignore, which should solve that problem.. However,
    when I set this and process with XEP, it doesn't help. I would have
    thought if that value were supported that you would get single line breaks.

    I have to admit I've never pursued it with RenderX. I've always just
    worked around the problem by firing up vim -b (to edit in binary mode) and
    globally deleting the ^M carriage returns.

    Bob Stayton
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net