This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re:programlisting extra line


This is what I was using before, this generates an extra
line on my machine because it uses a table to do the shading.
I think it depends on the browser used to view the webpage
whether or not one sees this extra line.

The correct way to do it is to use CSS as explained by Marko
Peterson. In CSS compliant browsers this works perfectly.

\.-~-./
-.ion.-
/.-~-.\
----- Original Message -----
From: "Dennis Grace" <dgrace@us.ibm.com>
To: <docbook-apps@lists.oasis-open.org>; <vnhu38f93@subdimension.com>
Sent: Monday, November 11, 2002 3:53 PM
Subject: Re:DOCBOOK-APPS: programlisting extra line


>
> ion asked:
>
> >>>>>
>
> Does anyone have a suitable solution to the "extra line" problem
>        illustrated by the XHTML code below:
>
>        <html>
>          <head><title>test</title></head>
>          <body>
>            <table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre
>        class="programlisting">blah blah blah</pre></td></tr></table>
>          </body>
>        </html>
>
>        I encapsulate programlistings and screen sections in tables so
>        that they are shaded, but, I get the extra line that is produced
>        by the code above. Any ideas on how to remove it?
>
> <<<<<
>
> I think I might. I don't get the extra line, and I use the following
> customization (derived from Dan York's examples) in lieu of the
> shade.verbatim param:
>
>  <xsl:template match="programlisting|screen|synopsis">
>    <xsl:param name="suppress-numbers" select="'0'"/>
>    <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
>    <xsl:variable name="id"><xsl:call-template
>   name="object.id"/></xsl:variable>
>
>    <xsl:if test="@id">
>      <a href="{$id}"/>
>    </xsl:if>
>
>    <xsl:choose>
>      <xsl:when test="$suppress-numbers = '0'
>                      and @linenumbering = 'numbered'
>                      and $use.extensions != '0'
>                      and $linenumbering.extension != '0'">
>        <xsl:variable name="rtf">
>          <xsl:apply-templates/>
>        </xsl:variable>
>        <table border="0" bgcolor="#E0E0E0" width="90%">
>        <tr><td>
>        <pre class="{name(.)}">
>          <xsl:call-template name="number.rtf.lines">
>            <xsl:with-param name="rtf" select="$rtf"/>
>          </xsl:call-template>
>        </pre>
>        </td></tr></table>
>      </xsl:when>
>      <xsl:otherwise>
>        <table border="0" bgcolor="#E0E0E0" width="90%">
>        <tr><td>
>        <pre class="{name(.)}">
>          <xsl:apply-templates/>
>        </pre>
>        </td></tr></table>
>      </xsl:otherwise>
>    </xsl:choose>
>  </xsl:template>
>
> Dennis Grace
>
> Information Developer
> IBM Linux Technology Center
> (512) 838-3937  T/L 678-3937  cell: (512)-296-7830
> dgrace@us.ibm.com
>
> There are only 10 kinds of people in the world: those who understand
binary
> and those who don't.
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]