Patchwork tables

Fredrik_Lönn
Posts: 24

Patchwork tables

Wed Mar 29, 2017 4:53 pm

I wonder why my tables sometimes look like patchwork?

It seems that table cell borders of joined cells at the bottom of the table are not quite aligned with the outer frame of the table. It makes the table look like I tried to draw it myself, but didn't manage very good. You can see an example here:

https://goo.gl/photos/gY79mJ7pUJSRH4Vm6

I use DITA-OT and the Apache FOP for publishing.
Radu
Posts: 5516

Re: Patchwork tables

Thu Mar 30, 2017 10:57 am

Hi Fredrik,

Do you have a DITA OT PDF customization set up in place? If so, can you test without your customization? Are you using DITA OT 1.8 or 2.x?
I tried to produce some output using a sample table in which I joined two vertical cells (as in your screenshot) using DITA OT 2.x and FOP but I did not reproduce your problem.
Maybe you could also most a small sample DITA table XML structure on which the problem can be reproduced.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 24

Re: Patchwork tables

Sun Apr 02, 2017 7:43 pm

Hi Radu,

You are right. When using the DITA-OT pdf plugin the table looks good. I should be able to pinpoint what I am doing wrong by comparing the tiopic.fo files shouldn't I? Is there a way to edit the topic.fo file and generate a new pdf based on this modified file? It could be an easy way to identify the rotten code.

Best Regards,
Fredrik
Radu
Posts: 5516

Re: Patchwork tables

Mon Apr 03, 2017 8:18 am

Hi Fredrik,

Once you open the "topic.fo" in Oxygen, you can use the toolbar "Configure Transformation Scenarios" and you should find a predefined transformation scenario for FO to PDF which you can use for publishing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Fredrik_Lönn
Posts: 24

Re: Patchwork tables

Sat May 13, 2017 12:43 am

Hi Radu,

I finally had some time to track down what was causing this issue. It turns out that my customized pdf-plugin adds some kind of footer to tables, that is not present in the regular dita-ot plugin. This happens in a template in the tables.xls file. Below is the template and you will see what part I have commented out:

Code: Select all

   <xsl:template match="*[contains(@class, ' topic/tbody ')]" name="topic.tbody">
      <!-- FL170512: This node seems to cause patchworklike cells when joining at the last row.
      <fo:table-footer xsl:use-attribute-sets="tgroup.tfoot">
         <fo:table-row>
            <fo:table-cell number-columns-spanned="{../@cols}" />
         </fo:table-row>
      </fo:table-footer>-->
      <fo:table-body xsl:use-attribute-sets="tgroup.tbody">
         <xsl:call-template name="commonattributes" />
         <xsl:apply-templates />
      </fo:table-body>
   </xsl:template>

This seems to fix it for me. I based my plugin on plugin generated on the excellent site http://dita-generator.elovirta.com/. I don't know if this is a general issue with those plugins.

Best Regards,
Fredrik

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest