OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK-APPS: callouts and spacing with fo

Title: Re: DOCBOOK-APPS: callouts and spacing with fo

Actually, I've ruled out tabs as the problem (tested it again after doing an untabify on the whole buffer), as well as my original theory about < vs. &lt;. I've simplified the test further (see below). The result is the same: lineone is correct. In the case of linetwo-linefive, in the .fo output, I get: "linetwo" followed by the number of spaces necessary to put the callout in column 45, followed by a linebreak, followed by about 11 spaces.

I'm using Saxon 6.2.2 (though I get the same result with 5.5.1). I'm using the following customization layer for the fo/docbook.xsl stylesheets (param.xsl has not been modified):

<xsl:import href="./fo/docbook.xsl"/>
<xsl:param name="saxon.extensions" select="'1'"/>
<xsl:param name="callout.graphics" select="'1'"/>  <!-- I've tried 0 too-->
<xsl:param name="callout.graphics.extension" select="'.gif'"/> <!-- I've tried png too-->

I'm using Apache fop 0.17.0. I couldn't tell if they support pngs, but it looks like it supports gifs. In both cases, when I run it, it reports:

Error while creating area : no protocol: ../images/callouts/1.png...
or for gifs:
Error while creating area : no protocol: ../images/callouts/1.gif...

I'm mystified. In some ways, I like the idea of using <co id="foo"/> better in the listing, but I can't get those to work with Saxon or Xalan-c. It's a big help just to hear that programlistingco is supposed to work with fo (they work fine for me with html). I'm just not sure what to try next.


XML source:

          <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"/> 
    <callout arearefs="foo.one">
        Foo one.
    <callout arearefs="foo.two">
        Foo two.
    <callout arearefs="foo.three">
        Foo three.
    <callout arearefs="foo.four">
        Foo four.
    <callout arearefs="foo.five">
        Foo five.

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">lineone                                     <span class="callout">(1)</span>

            <span class="callout">(2)</span>
            <span class="callout">(3)</span>
            <span class="callout">(4)</span>
            <span class="callout">(5)</span>



> / David Cramer <david_cramer@broadjump.com> was heard to say:
> | 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.
> Nope. The problem is that you've used tab characters to indent the lines
> of your program listing and tab characters only "count" as one space but
> they often generate more than one space character's width of stuff in the
> output.
> Avoid tabs.
> | 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.
> What FO processor are you using? Does it support PNGs?
>                                        Be seeing you,
>                                          norm

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC