[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] [XSL-FO] marginal notes


Subject: [xsl] [XSL-FO] marginal notes
From: "Geert Bormans geert@xxxxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2014 21:20:52 -0000

Dear all,

I am facing the challenge of adding marginal notes to a PDF document using FO.
I am using Antenna House for this task (though switching to RenderX for this would be an option)


The actual note is a number (element "no") inside a paragraph (element "p")

I managed to get something out of this using the following simplified example and float="outside"
as supported in Antenna House and RenderX as far as I understand.
I need the notes in the outer margin, different odd versus even


<xsl:template match="p">
   <fo:block intrusion-displace="block">
      <fo:float float="outside">
        <fo:block text-align="right" margin-right="14mm">
           <xsl:value-of select="no"/>
        </fo:block>
      </fo:float>
      <fo:block text-align="justify" >
         <xsl:value-of select="al"/>
      </fo:block>
   </fo:block>
</xsl:template>

I am facing some issues with this

- most important issue is that if a "p" overflows a page it intrudes the margin on the next page
eg. page one has a marginal note in the right margin for a paragraph near the end of the page
the part of this paragraph that goes onto page 2 comes as far to the left as where the marginal notes of the next paragraphs should be. It looks ugly and I don't know how to get rid of that


- next issue: the number should be right aligned for the odd pages and left aligned for the even pages

Any suggestions?

Thanks

Geert


Current Thread