xsl-list
[Top] [All Lists]

Re: [xsl] [XSL-FO] marginal notes

2014-06-11 17:08:09
Hey Tony,

Thanks a lot, I got it all to work as I need it

Here is what I did

<xsl:template match="p">
   <fo:block>
<fo:change-bar-begin change-bar-class="CBP-{generate-id()}" change-bar-offset="14mm">
         <fo:float float="outside">
            <fo:block><xsl:value-of select="no"/></fo:block>
         </fo:float>
      </fo:change-bar-begin>
            <fo:block text-align="justify" >
               <xsl:value-of select="al"/>
            </fo:block>
      <fo:change-bar-end change-bar-class="CBP-{generate-id()}"/>
   </fo:block>
</xsl:template>

And I give the margin where I want the no to appear an extra 14mm
(on the right for odd and on the left for even)
Works a charm, thanks

Geert





At 00:06 11/06/2014, you wrote:
On Tue, June 10, 2014 10:21 pm, Geert Bormans 
geert(_at_)gbormans(_dot_)telenet(_dot_)be
wrote:
> 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")
...
> - next issue: the number should be right aligned for the odd pages
> and left aligned for the  even pages

Antenna House, as an extension, allows fo:float within fo:change-bar-begin
[1], so use that with 'change-bar-placement="outside".

You can use 'text-align="outside"' [3] to align the numbers to the outside
of the page.

You may also be able to use Antenna House's float extension [2], but it's
not clear to me whether or not 'sidenote' applies only to CSS.

Regards,


Tony Graham                                         
tgraham(_at_)mentea(_dot_)net
Consultant                                       http://www.mentea.net
Chair, Print and Page Layout Community Group @ W3C    XML Guild member
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
Mentea       XML, XSL-FO and XSLT consulting, training and programming

[1] http://antennahouse.com/xslfo/extension.htm#fo.change-bar-begin
[2] http://antennahouse.com/xslfo/float-extension.htm
[3] http://www.w3.org/TR/xsl/#text-align

--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>