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]

PassiveTeX table kluge


Okay, thanks to Bob's helpful correction, I am happy to report that this
fix works (the left border show up in PDF but the extra line does *not*
show up in HTML):

For tables and informaltables, make two copies. Assign the attribute role
="html" to the first table (or informaltable). Assign the attribute role
="pdf" to the second table/informaltable and add an extra column to the
table/informaltable (increment the cols number by one, add an empty entry
to the beginning of each row, and add a colspec with colnum="1" and
colwidth="0"). Add the following to your HTML customization layer:


<xsl:template match="table">
   <xsl:choose>
      <xsl:when test="@role='html'">
         <xsl:apply-imports/>
      </xsl:when>
      <xsl:when test="@role='pdf'" select="0"/>
      <xsl:otherwise>
         <xsl:apply-imports/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>

<xsl:template match="informaltable">
   <xsl:choose>
      <xsl:when test="@role='html'">
         <xsl:apply-imports/>
      </xsl:when>
      <xsl:when test="@role='pdf'" select="0"/>
      <xsl:otherwise>
         <xsl:apply-imports/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>

To your FO customization layer, add:

<xsl:template match="table">
   <xsl:choose>
      <xsl:when test="@role='pdf'">
         <xsl:apply-imports/>
      </xsl:when>
      <xsl:when test="@role='html'" select="0"/>
      <xsl:otherwise>
         <xsl:apply-imports/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>

<xsl:template match="informaltable">
   <xsl:choose>
      <xsl:when test="@role='pdf'">
         <xsl:apply-imports/>
      </xsl:when>
      <xsl:when test="@role='html'" select="0"/>
      <xsl:otherwise>
         <xsl:apply-imports/>
      </xsl:otherwise>
   </xsl:choose>
</xsl:template>

If you're turning these into anything other than PDFs and HTML, you'll need
to make appropriate additions for the other formats.

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]