You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by John Burgess <jo...@riskdecisions.com> on 2004/10/22 11:13:48 UTC

Retrieve-marker problem. Can anyone help with wrapper workaround?

I am trying to use maker and retrieve-marker to put the title of the current chapter into the header of my documents.
I have this working BUT the formatting of the chapter title in the header is the same as where the marker is i.e. Large 
and Bold, appropriately for the title of a chapter bit not for a running header.

I know this is a known problem with fop (I am using 0.20.5 by the way).  However, in the mailing list archive I saw amongst the messages dealing with this problem one from Andreas L. Delmelle saying:

Oh, another detail: there's a nasty bug with markers that renders them with
the same properties as the region/block where they are defined, so to make
it work correctly, you have to add an fo:wrapper around the marker to set
the font-size/-weight etc. to the same values they have in the static
content...

For more info: check the examples for markers that came with FOP
(FOP_HOME/examples/fo/markers)

---

I think I have probably misunderstood what Andreas means.  

What I did was to have

<fo:block use-attribute-set="chapter-heading"> <!-- sets 20 point, bold font -->
<fo:wrapper use-attribute-set="headers-footers"> <!-- sets 8 point light  -->
<fo:marker marker-class-name="chapter">Introduction</fo:marker>
</fo:wrapper>

But while that meant the header was in the correct font etc., the chapter title was then very small.
Is there a workaround for this situation?

Best Wishes
John Burgess
Risk Decisions Limited
T: 01865 718666
F: 01865 718600
john.burgess@riskdecisions.com
http://www.riskdecisions.com/


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.776 / Virus Database: 523 - Release Date: 16/10/04

Re: Retrieve-marker problem. Can anyone help with wrapper workaround?

Posted by John Burgess <jo...@riskdecisions.com>.
Andreas

Thanks very much!  Putting the marker in a wrapper in an otherwise empty
block stopped it appearing, and had it correctly formatted in the footer.

I've looked again at what was happening before and you're quite right - the
Chapter didn't appear.  I'm afraid I had misunderstood fo:marker and assumed
it took a copy of the text inside that would also be shown in the flow and
that was what I saw, rather than what was actually in front of my eyes.

My apologies, and once again thanks very much indeed!

John

----- Original Message -----
From: "Andreas L. Delmelle" <a_...@pandora.be>
To: <fo...@xml.apache.org>
Sent: Friday, October 22, 2004 4:41 PM
Subject: RE: Retrieve-marker problem. Can anyone help with wrapper
workaround?


> > -----Original Message-----
> > From: John Burgess [mailto:john.burgess@riskdecisions.com]
>
>
> Hi John,
>
> I know it sounds like a bit of a pain, but try to use this:
>
> <fo:block>
> <fo:wrapper use-attribute-set="headers-footers"> <!-- sets 8 point
> ight  -->
> <fo:marker marker-class-name="chapter">Introduction</fo:marker>
> </fo:wrapper>
> </fo:block>
>
> <fo:block use-attribute-set="chapter-heading">
> Introduction
> </fo:block>
>
> Notice that the actual title appears in two places (under the
> fo:marker/fo:wrapper, and once again in a block *after* the wrapper)
>
> I don't really see how your problem could arise though... IIC, then the
text
> placed under fo:marker shouldn't be visible anywhere except when there is
a
> corresponding fo:retrieve-marker that retrieves it --at least that's the
way
> it currently works for me, and how it's defined in the spec:
>
> "The fo:marker does not directly produce any area. Its children may be
> retrieved and formatted from within an fo:static-content, using an
> fo:retrieve-marker..."
>
> Currently, FOP maintenance version only has a problem with the '...and
> formatted...' part. The rest seems to be handled quite OK.
>
> Greetz,
>
> Andreas
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: fop-user-help@xml.apache.org
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.776 / Virus Database: 523 - Release Date: 16/10/04



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Retrieve-marker problem. Can anyone help with wrapper workaround?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: John Burgess [mailto:john.burgess@riskdecisions.com]


Hi John,

I know it sounds like a bit of a pain, but try to use this:

<fo:block>
<fo:wrapper use-attribute-set="headers-footers"> <!-- sets 8 point
ight  -->
<fo:marker marker-class-name="chapter">Introduction</fo:marker>
</fo:wrapper>
</fo:block>

<fo:block use-attribute-set="chapter-heading">
Introduction
</fo:block>

Notice that the actual title appears in two places (under the
fo:marker/fo:wrapper, and once again in a block *after* the wrapper)

I don't really see how your problem could arise though... IIC, then the text
placed under fo:marker shouldn't be visible anywhere except when there is a
corresponding fo:retrieve-marker that retrieves it --at least that's the way
it currently works for me, and how it's defined in the spec:

"The fo:marker does not directly produce any area. Its children may be
retrieved and formatted from within an fo:static-content, using an
fo:retrieve-marker..."

Currently, FOP maintenance version only has a problem with the '...and
formatted...' part. The rest seems to be handled quite OK.

Greetz,

Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org