Subject: Re: [docbook-apps] inclusion of a cr/lf file inside a programlisting results in double spaced lines in my pdf
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 firstname.lastname@example.org ----- Original Message ----- From: "Chris Chiasson" <email@example.com> To: "apps docbook" <firstname.lastname@example.org> Sent: Friday, September 01, 2006 10:03 PM Subject: [docbook-apps] inclusion of a cr/lf file inside a programlisting results in double spaced lines in my pdf >I should think this comes up whenever someone includes a text file > with windows EOL markers, but I wasn't able to find much in the > archives. Then again, Google's inurl: operator is broken right now, > and Yahoo ... > > Right now, in my XHTML and HTML output, either the input was converted > to LF by the browser or by the transformation process, because it > looks correct. Strangely, about an hour ago - I was having the double > space problem in HTML, but in the course of diagnosing the problem it > went away (???). > > I have tried xi:include href="blah.m" and textdata fileref="blah.m" > inside textobject. The xinclude generated the double space lines. The > textobject / textdata nesting actually generated an anchor (a) element > inside the pdf. Needless to say, the fo processor was not pleased. > > Anyway, enough rambling. What do you people do when you want to > include a CR/LF terminated file into a PDF? > > -- > http://chris.chiasson.name/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: email@example.com > For additional commands, e-mail: firstname.lastname@example.org > > >