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 tables


Hi Guys,

This is a combination of PassiveTeX observations and DocBook XSL/PassiveTeX
questions.

I've been trying to find a workaround for the one remaining
table/informaltable problems I've had with PassiveTeX: the disappearing
left border. I found that I can produce a table that looks correct in the
PDF if I add an empty column to the left-hand side (increment the cols
attribute by one, specify a colspec with a 0pt, and specify the colwidth as
0pt), I get a correct looking output. The attached tar.gz contains files
table.fo and table.pdf, which demonstrate this. Unfortunately, as
table.html demonstrates, the extra column makes for a rather odd looking
html table border.

So, I thought I'd use the role attribute and apply the table templates via
my customization layer. I built two versions of the table in my test
document--one with five columns and one with the sixth, empty column. I
assigned role="pdf" to the six-column table and role="html" to the five
column table. In my html customization layer, I added

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

To my fo customization layer, I added the converse:

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

For the html, this worked. It processed through the five column table. For
the pdf, it worked (in so far as it attached the left border), but created
a new problem. The table caption and the top line got lopped off (see
table2.fo and table2.pdf in the attached tar.gz).

Any idea why this didn't work?

Thanks.

(See attached file: ptextable.tar.gz)

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.

Attachment: ptextable.tar.gz
Description: Binary data


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