This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] excessive space before/after screen and programlisting
- From: Bob Stayton <bobs at sco dot com>
- To: "Robert P. J. Day" <rpjday at mindspring dot com>
- Cc: docbook apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 2 Aug 2003 21:51:18 -0700
- Subject: Re: [docbook-apps] excessive space before/after screen and programlisting
- References: <Pine.LNX.4.44.0308021258270.6076-100000@localhost.localdomain>
On Sat, Aug 02, 2003 at 01:05:06PM -0400, Robert P. J. Day wrote:
>
> i'm using xsltproc and FOP to turn docbook into PDF, and i seem
> to be getting excessive space both before and after my verbatim
> environments like <screen> and <programlisting>. here's my
> stylesheet fragment to mess with verbatim elements:
>
> ---------------------------------
> <xsl:param name="shade.verbatim" select="1"/>
>
> <xsl:attribute-set name="verbatim.properties">
> <xsl:attribute name="space-before.minimum">0.0em</xsl:attribute>
> <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
> <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
> <xsl:attribute name="space-after.minimum">0.0em</xsl:attribute>
> <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
> <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
>
> <xsl:attribute name="line-height">160%</xsl:attribute>
> </xsl:attribute-set>
> ---------------------------------
>
> now, the shading works, and adjusting the line height also
> works, but i still seem to get excessive space both before the
> entire <screen> or <programlisting>. i added the shading to
> verify that that space wasn't part of, say, the paragraph above
> or below. so i shaded and, sure enough, at the start and
> end of each verbatim, there's enough space to almost put in
> another entire line of text.
>
> note that i cranked down the space-{before,after} to almost
> nothing, but that doesn't seem to help.
>
> am i not adjusting the correct attributes here?
I tested these settings and they produce a shaded
programlisting with no extra space above.
Your mail doesn't mention if the extra space is inside
the shaded area or outside.
Does your programlisting start like this:
<programlisting>My first line
My second line.
or like this:
<programlisting>
My first line
My second line.
If it is the latter, then the extra line is in
your programlisting, in which every line ending
and white space is respected, including the first.
Change it to look like the former.
If yours looks like the former, then something
else is going on.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org