The attachment should give you an idea. The principle:
<fo:block-container>
<fo:block-container right="-1.2cm" inline-progression-dimension="1cm"
absolute-position="absolute">
<fo:block>123</fo:block>
</fo:block-container>
</fo:block-container>
The first block-container is a normal one. It has zero effective height
and is used to create a new reference area to which the child
block-container can be relatively positioned (although you actually have
to use absolute positioning in FO terminology).
absolute-position="absolute" positions relative to the ancestor
reference area.
HTH
On 03.03.2011 09:30:19 Trevor Nicholls wrote:
> Thank you Jeremias
>
> The marginalia examples I have found typically use a block-container within
> an fo:float. I haven't found an example which avoids the float :-(
> Are you aware of any?
>
> Cheers
> Trevor
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:[email protected]]
> Sent: Thursday, 3 March 2011 8:36 p.m.
> To: [email protected]
> Subject: Re: right-aligned box insertion in text flow
>
> Trevor,
> what you're looking for is fo:float, but as you can see here:
> http://xmlgraphics.apache.org/fop/compliance.html#fo-object-float
> this object is not implemented, yet.
>
> As an alternative, you can investigate using fo:block-containers if you
> are happy enough to have the version numbers placed on the right side of
> the normal text flow.
>
> On 01.03.2011 14:36:27 Trevor Nicholls wrote:
> > I wonder if the following is do-able; perhaps somebody has been there
> before
> > me?
> >
> > I have a document schema which includes paragraphs, tables, code
> fragments,
> > notes, various levels of nested sections, etc. Every "block" element
> carries
> > an optional "version" attribute, and this version needs to be presented in
> > the right margin of the main document flow.
> >
> > When my XML is converted to HTML this is achieved with a CSS float, like
> > so:
> >
> > (XML)
> > <para version="123">Para text...</para>
> >
> >
> > (XSL)
> > <xsl:template match="para">
> > <xsl:call-template name="testversion" />
> > <p><xsl:apply-templates /></p>
> > </xsl:template>
> >
> > <xsl:template name="testversion">
> > <xsl:if test="@version != ''">
> > <div class="version-float">
> > <xsl:value-of select="@version" />
> > </div>
> > </xsl:if>
> > </xsl:template>
> >
> >
> > (CSS)
> > .version-float {
> > float: right;
> > font-size: 10pt;
> > font-weight: normal;
> > color: #666;
> > background-color: #ffd;
> > margin: 0;
> > padding: 0 0.2em;
> > border-top: 1px solid #ccc;
> > border-left: 1px solid #ccc;
> > border-right: 1px solid #888;
> > border-bottom: 1px solid #888;
> > }
> >
> >
> > This appears in the browser like so:
> >
> > Para text para text para text para | 123 |
> > text para text para text para text -------
> > para text para text para text para text para
> > text para text para text para text para text.
> >
> >
> > I would like to achieve a similar effect in the PDF output which is
> > generated by FOP but I am not sure how to achieve it. Can anyone assist
> > please?
> >
> > We are using FOP 0.95.
> >
> > Cheers
> > Trevor
> >
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
Jeremias Maerki
ride-out.fo
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
