Tables dropping formatting

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Tables dropping formatting

Post by gregoryrwalker »

I've got a series of tables that appear in different topics throughout my project. They use a table style to set the header, footer and alternating row styles. A table class is then applied to them to set position the tables' left margin.

When you preview the tables in print layout they look just like they're supposed to. However, when you publish the project to a pdf some of the tables drop their formatting.

Now, here's the weird thing. If you open a topic with a table that drops its formatting during publication, copy that table, and paste it into a topic with a table that doesn't loose it's formatting, then both tables will retain their formatting. Similarly, if you copy a table that retains its formatting and paste it into a topic with a table that looses it's formatting, then both tables will loose their formatting when published.

At first I thought it had something to do with the table styles, but I've ensured that both tables are identically styled (on the tag level) with no luck. Seeing how they behave when you move them from one topic to another makes me suspect that it has something to do with a topic's properties, but I can't come up with anything that should be different between the two.

--gw
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Tables dropping formatting

Post by LTinker68 »

Open both a working topic and a non-working topic in the Internal Text Editor and compare the code at the top of the topic and in the table itself. See if there's anything different.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Tables dropping formatting

Post by gregoryrwalker »

I've gathered the code into Dreamweaver, removed all the excess text and index terms to simply things, and discovered only two discrepencies in the header of the topics. the one that doesn't work has two additional functions called out after the MadCap.xsd schema. They are...

MadCap:check_list="Ran Smart Index"
MadCap:conditionTagExpression=""

Perhaps a more code oriented set of eyes will notice something different.

TOPIC WITH TABLE THAT PUBLISHES CORRECTILY

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:madcap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" class="" madcap:lastblockdepth="3" madcap:lastheight="24" madcap:lastwidth="624">
<head>
<title>The Basic Unit</title>
<link href="../../../../Resources/default.css" rel="stylesheet" type="text/css" />
<link href="../../../../Resources/TableStyles/Alternating_Rows.css" rel="stylesheet" madcap:stylesheettype="table" />
</head>
<body>
<h4 madcap:conditions="">
  <MadCap:keyword term="XXX" />
</h4>
<p class="h4"></p>
<h4 madcap:conditions="">
  <MadCap:keyword term="XXX" />
</h4>
<p class="h4"></p>
<table class="h2" cellspacing="0">
  <col style="width: 1.85in;" />
  <col style="width: 3in;" />
  <col style="width: 1in;" />
  <thead>
    <tr>
      <th style="" class="TableStyle_Alternating_Rows_Head_0_0_RowSep_ColSep"
      </th>
      <th style="" class="TableStyle_Alternating_Rows_Head_0_1_RowSep_ColSep"></th>
      <th style="" class="TableStyle_Alternating_Rows_Head_0_0_RowSep_ColEnd"></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_0_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr style="height: 5px;">
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_1_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXXB.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_0_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_1_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColSep" style=""><MadCap:keyword term="XXXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_0_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_1_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_0_1_RowSep_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" /></td>
    </tr>
    <tr>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowEnd_ColSep" style=""><MadCap:keyword term="XXX" /></td>
      <td class="TableStyle_Alternating_Rows_Body_1_1_RowEnd_ColSep" style=""></td>
      <td class="TableStyle_Alternating_Rows_Body_1_0_RowEnd_ColEnd" style=""><img src="../../../../Resources/Images/XXX.png" border="0" style="width: 127px;height: 90px;" /></td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td class="TableStyle_Alternating_Rows_Foot_0_0_RowSep_ColSep" style=""> </td>
      <td class="TableStyle_Alternating_Rows_Foot_0_1_RowSep_ColSep" style=""> </td>
      <td class="TableStyle_Alternating_Rows_Foot_0_0_RowSep_ColEnd" style=""> </td>
    </tr>
  </tfoot>
</table>
<h4 madcap:conditions="">
  <MadCap:keyword term="XXX" />
</h4>
<p class="h4"></p>
<h4 madcap:conditions="">
  <MadCap:keyword term="XXX" />
</h4>
<p class="h4"></p>
</body>
</html>
TOPIC WITH TABLE THAT DROPS FORMATTING ON PUBLICATION

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:check_list="Ran Smart Index" MadCap:lastBlockDepth="3" MadCap:lastHeight="0" MadCap:lastWidth="624" class="" MadCap:conditionTagExpression="">
  <head>
    <title>Meter Testing - Overview</title>
    <link href="../../Resources/default.css" rel="stylesheet" type="text/css" />
    <link href="../../Resources/TableStyles/Alternating_Rows.css" rel="stylesheet" MadCap:stylesheetType="table" />
  </head>
  <body>
    <h2 MadCap:conditions="">
      <MadCap:keyword term="XXX" />
    </h2>
    <p class="h2first">
      <img src="../../Resources/Images/XXX.jpg" style="border: none;border-style: none;border-style: none;max-width: 4in;" border="0" MadCap:mediastyle="@media print { min-width: 4.5in; }" />
    </p>
    <p class="h2"></p>
    <table cellspacing="0" class="h2">
      <col style="width: 1.85in;" />
      <col style="width: 4.55in;" />
      <thead>
        <tr>
          <th style="" class="TableStyle_Alternating_Rows_Head_0_0_RowSep_ColSep"></th>
          <th style="" class="TableStyle_Alternating_Rows_Head_0_1_RowSep_ColEnd"></th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="TableStyle_Alternating_Rows_Body_0_0_RowSep_ColSep" style="">/td>
          <td class="TableStyle_Alternating_Rows_Body_0_1_RowSep_ColEnd" style="">
            <p colspan="2" class="h1table">
              <img src="../../Resources/Images/XXX.jpg" style="border: none;border-style: none;border-style: none;" border="0" />
            </p>
            <p colspan="2" class="h1table">
              <span>
                <span class="Leader">
                  <MadCap:keyword term="XXX" />
            </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
           </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
          </td>
        </tr>
        <tr style="height: 5px;">
          <td class="TableStyle_Alternating_Rows_Body_1_0_RowSep_ColSep" style=""></td>
          <td class="TableStyle_Alternating_Rows_Body_1_1_RowSep_ColEnd" style="">
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
			</p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
          </td>
        </tr>
        <tr style="height: 5px;">
          <td class="TableStyle_Alternating_Rows_Body_0_0_RowEnd_ColSep" style=""></td>
          <td class="TableStyle_Alternating_Rows_Body_0_1_RowEnd_ColEnd" style="">
            <p colspan="2" class="h1table">
              <img src="../../Resources/Images/XXX.gif" style="border: none;border-style: none;border-style: none;" border="0" />
            </p>
            <p class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
            <p colspan="2" class="h1table">
              <span class="Leader">
                <MadCap:keyword term="XXX" />
              </span>
              </p>
          </td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td class="TableStyle_Alternating_Rows_Foot_0_0_RowSep_ColSep" style=""> </td>
          <td class="TableStyle_Alternating_Rows_Foot_0_1_RowSep_ColEnd" style=""> </td>
        </tr>
      </tfoot>
    </table>
  </body>
</html>
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Tables dropping formatting

Post by LTinker68 »

Couple of things I notice are different (don't know if it'll affect the outcome). If you can, test after every change and see if it fixes the problem.

- There are two less hops to the table stylesheet in the troubled topic than there are in the good topic. In the troubled topic, the href is only "../../Resources (and so on)". In the good topic, the reference is "../../../../Resources (and so on)". It could just be that the two sample topics you used are in two different folders, one of which is two levels deeper than the other. But if they're on the same level (e.g., one level down from the root), then remove the table stylesheet reference from the troubled topic, save the topic, then reapply the table stylesheet through the Table Properties screen. See if it changed the path to the table stylesheet. I would think that it would have looked wrong in the XML Editor, but who knows.

- In the good topic, the property in the table stylesheet reference is written as madcap:stylesheettype="table" but in the bad topic it's written as MadCap:stylesheetType="table" (note the difference in capitalization). It doesn't seem like it would matter unless you were running the help on an Apache server, but you said the problem is with PDF output. But who knows. It's a difference, so it's something to check.

- Along the same lines, in the good topic the xmlns declaration begins with madcap, but in the bad one it's beginning with MadCap. However, that's the way it's written in my topics and they output to PDF correctly, so that's probably not the issue. Which means the point above shouldn't be a problem either.

- I'm curious about the madcap:lastheight="0" in the xmlns declaration in the troubled topic, but I don't know what those properties do, so I don't know if a value of 0 turns something off or what.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
gregoryrwalker
Propeller Head
Posts: 28
Joined: Mon Jan 29, 2007 8:52 am
Location: Pearl, Mississippi

Re: Tables dropping formatting

Post by gregoryrwalker »

Okay. I've discovered something new. I think the problem with some tables dropping formatting is coming from my TOC. Let me explain.

Let's say my content explorer looks something like this.

Code: Select all

Content
   >Animals
      Cats 1-A
      Dogs 1-B
   Conclusion   
   >Fruits
      Bananas
      Kumquats
   Introduction
And my TOC looks like this

Code: Select all

Introduction
>Animals
   Dogs
   Cats
>Fruits
   Bananas
   Kumquats
Conclusion
Now, let's say the tables that appear in the Introduction topic publish correctly, but the tables in Dogs, Cats, Bananas and Kumquats do not. So, what I did was...

1. Create a new topic in the Animals folder of the content explorer called Test
2. Copied the content from the Dog topic into the Test topic.3. Added the Test topic to the Animals book of the TOC.
4. Published content. The table in the Test topic dropped formatting. Boo.
5. Moved the Test Topic in the content explorer from the Animals folder into the root folder. Left the Test Topic in the Animals folder in the TOC.
6. Published content. The table in the Test topic dropped formatting. Boo.
7. Moved the Test topic from the Animals book of the TOC into the root book. Left the Test topic in the root folder of the content explorer.
8. Published content. The table in the Test topic retained its formatting. Yay!
9. Move the Test topic from the root folder of the content explorer into the Animals folder. Left the Test topic in the root book of the TOC.
10. Published content. The table in the Test topic retained its formatting. Yay!

Now, of course, in my project there are several more levels of folders than in the example above. You'd think maybe it had something to do with how far away from the root book a topic appears in the TOC as to whether it'll retain it's table formatting. However, I have cases where a topic is five books in and retains its formatting when a topic that is three topics in drops it.

So, what I'm thinking is that sometimes, for whatever reason, topics in certain book of the TOC sort of lose their way back to the tablestyle.css file during publication. I'm going to continue with some further experiments and see what happens.

--gw
Post Reply