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]

callouts and spacing with fo


Title: callouts and spacing with fo

Give test.xml below, and running com.icl.saxon.StyleSheet with Norm Walsh's /fo/docbook.xsl stylesheet with saxon extensions on, I get the fo output listed at the end of this message. As you can see, this won't come out like I'd want in the pdf. The first callout number in the program listing is in the right place, but numbers 4-5 are off by one line plus some spaces. This must have something to do with the fact that the < and > signs are changed to &lt; and &gt; in the fo output, but that there is only one tag on line one of the listing, and two tags (and so two pairs of <>) on lines 3-5 of the listing.

My question is this--how do I compensate for this effect? The distortion isn't what I expect. I'd expect callout two through five to be six characters to the left of the first callout, or something like that. Instead, the callouts on the lines with two tags are bumped to the next line, with some space added. You can't tell from the pasted listing, but the line each callout should be on is followed by the number of spaces that should be there if the number were on that line.

A second question: The references to the graphics show up in the .fo file (<img src=""../images/callouts/4.png"" alt="(4)"/> and they are in ../images/callouts/ relative to the fo document, but they don't ever appear in the .pdf.

Thanks for any help,
David

 
<!-- filename: test.xml -->
...
      <programlistingco>
        <areaspec>
          <area units="linecolumn" coords="1 45" id="foo.one"/>
          <area units="linecolumn" coords="2 45" id="foo.two"/>
          <area units="linecolumn" coords="3 45" id="foo.three"/>
          <area units="linecolumn" coords="4 45" id="foo.four"/>
          <area units="linecolumn" coords="5 45" id="foo.five"/> 
        </areaspec>
<programlisting><![CDATA[<foo attribute="wooga"/>
        <snafu>content</snafu>
        <three>more content</three>
        <four>even more content</four>
        <five>look at all this content</five>]]>
  </programlisting>
        <calloutlist>
        <callout arearefs="foo.one">
          <para>
                Foo one.
          </para>
    </callout>
    <callout arearefs="foo.two">
          <para>
                Foo two.
          </para>
    </callout>
    <callout arearefs="foo.three">
          <para>
                Foo three.
          </para>
    </callout>
    <callout arearefs="foo.four">
      <para>
                Foo four.
      </para>
    </callout>
    <callout arearefs="foo.five">
      <para>
                Foo five.
      </para>
        </callout>
  </calloutlist>
</programlistingco>



Programlising and callouts in fo output:

         <fo:block wrap-option="no-wrap" text-align="start" white-space-collapse="false" linefeed-treatment="preserve" font-family="Courier" space-before.minimum="0.8em" space-before.optimum="1em" space-before.maximum="1.2em">&lt;foo attribute="wooga"/&gt;                    <span class="callout">

               <img src=""../images/callouts/1.png"" alt="(1)"/>
            </span>
        &lt;snafu&gt;content&lt;/snafu&gt;                    
            <span class="callout">
               <img src=""../images/callouts/2.png"" alt="(2)"/>
            </span>
        &lt;three&gt;more content&lt;/three&gt;               
            <span class="callout">
               <img src=""../images/callouts/3.png"" alt="(3)"/>
            </span>
        &lt;four&gt;even more content&lt;/four&gt;            
            <span class="callout">
               <img src=""../images/callouts/4.png"" alt="(4)"/>
            </span>
        &lt;five&gt;look at all this content&lt;/five&gt;     
            <span class="callout">
               <img src=""../images/callouts/5.png"" alt="(5)"/>
            </span>
 
         </fo:block>     


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