You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Luca Furini <lf...@cs.unibo.it> on 2005/05/17 16:48:07 UTC

Footnotes working!

Footnotes should be working now.

At the moment the page breaking algorithm is quite "strict": it tries to
insert every footnote in the same page where their citation is (the last
footnote body could be split, and partially deferred to the next page).

The recommendation seems to suggest that it could defer one or more
*whole* footnotes, if there is not enough space in the page where their
citations are, even if this is not very usual to happen in books; anyway,
this could be fixed later.

Two annotations concerning the footnote separator:

- is it correct to assume that the footnote separator is the same on each
page containing footnotes, or it could have some page-dependant content?
At the moment, its areas are obtained only once, and repeated in each page
where a footnote is inserted.

- I had to add a new StaticContentLM constructor with a Block area
paremeter; maybe someone sees a better way to do this? The problem is that
"normal" StaticContentLM add their areas to a Region, while the SCLM
handling the footnote separator adds them to a block area (this is related
to the previous point); another difference, non depending on the current
implementation, is that the SCLM handling the footnote separator does not
perform any breaking algorithm: it is quite similar to a BlockLM.

Regards
    Luca




Re: Footnotes working!

Posted by Glen Mazza <gm...@apache.org>.
Luca Furini wrote:

>Footnotes should be working now.
>
>  
>

Excellent--Very impressive work!!!

>Two annotations concerning the footnote separator:
>
>- is it correct to assume that the footnote separator is the same on each
>page containing footnotes, or it could have some page-dependant content?
>At the moment, its areas are obtained only once, and repeated in each page
>where a footnote is inserted.
>  
>

It is fo:page-sequence specific.  Within the fo:page-sequence, you may 
define one fo:static-content with a flow-name of 
"xsl-footnote-separator."  All pages with a footnote will share that 
separator.  (See:  
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#flow-name.)

>- I had to add a new StaticContentLM constructor with a Block area
>paremeter; maybe someone sees a better way to do this? The problem is that
>"normal" StaticContentLM add their areas to a Region, while the SCLM
>handling the footnote separator adds them to a block area (this is related
>to the previous point); another difference, non depending on the current
>implementation, is that the SCLM handling the footnote separator does not
>perform any breaking algorithm: it is quite similar to a BlockLM.
>
>  
>

I don't mind the code as it is.  But if you'd like we can go back to a 
two-argument constructor (just the PSLM and SC object), and then provide 
separate methods to set the Region or Block.  BTW, since the only thing 
these two usages appear to have in common is that both they work with 
fo:static-content, would you rather have separate 
SideRegionLayoutManager and a FootnoteSeparatorLayoutManager?  (Possibly 
having FSLM extend BlockLM?)  Another possibility to think about, and 
perhaps for Andreas and others to chime in on.

Thanks,
Glen


RE: Footnotes working!

Posted by AttikDwella <at...@pandora.be>.
> -----Original Message-----
> From: Simon Pepping [mailto:spepping@leverkruid.nl]
>
> On Tue, May 17, 2005 at 04:48:07PM +0200, Luca Furini wrote:
> >
<snip />
> > The recommendation seems to suggest that it could defer one or more
> > *whole* footnotes, if there is not enough space in the page where their
> > citations are, even if this is not very usual to happen in books;
anyway,
> > this could be fixed later.
>
> In linguistic or theological works you may see many and long footnotes.

Yeah, as an example: try reading some Postmodern Philosophy... Many pages
that are filled for 75% with footnotes offering comments/notes on the ideas
that appear on the other 25% (even pages containing nothing *but* footnotes,
continued from a previous page). I guess it's not as much fun to read as it
is to write layout code for handling those situations... :-)


Greetz,

Andreas


Re: Footnotes working!

Posted by Simon Pepping <sp...@leverkruid.nl>.
On Tue, May 17, 2005 at 04:48:07PM +0200, Luca Furini wrote:
> 
> Footnotes should be working now.

Great.
 
> At the moment the page breaking algorithm is quite "strict": it tries to
> insert every footnote in the same page where their citation is (the last
> footnote body could be split, and partially deferred to the next page).
> 
> The recommendation seems to suggest that it could defer one or more
> *whole* footnotes, if there is not enough space in the page where their
> citations are, even if this is not very usual to happen in books; anyway,
> this could be fixed later.

In linguistic or theological works you may see many and long footnotes.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.nl


Re: Footnotes working!

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Luca Furini wrote:
> The recommendation seems to suggest that it could defer one or more
> *whole* footnotes, if there is not enough space in the page where their
> citations are, even if this is not very usual to happen in books;

Actually, this is *very* unusual, and can only happen if there is
only a single line of content and all the footnote space is already
eaten up, either by footnotes deferred from previous pages or because
there are lots and/or very long footnotes in the same line.

The common convention is that only a footnote cited in the last content
line of the bage may be broken across pages, and no further footnote
content will be deferred to the next page. In fact, breaking footnotes
should be avoided if the content line citating the footnote can be put
onto the next page withouth leaving an ugly white area below the
content, either by distributing surplus bpd space to before/after
block spaces or by fiddling with line heigths (or both).

Duh, an example in the Wiki would be in order...

J.Pietschmann

Re: Footnotes working!

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 17.05.2005 22:54:31 Andreas L. Delmelle wrote:
> > -----Original Message-----
> > From: Luca Furini [mailto:lfurini@cs.unibo.it]
> >
> 
> Hi Luca,
> 
> First of all: compliments on yet another Nice Job!

I second that!

> > At the moment the page breaking algorithm is quite "strict": it tries to
> > insert every footnote in the same page where their citation is (the last
> > footnote body could be split, and partially deferred to the next page).
> 
> Well, that fits the largest part of the requirements...

I agree. More can be done later if necessary.

> > The recommendation seems to suggest that it could defer one or more
> > *whole* footnotes, if there is not enough space in the page where their
> > citations are, even if this is not very usual to happen in books; anyway,
> > this could be fixed later.
> 
> Optimistic interpretation:
> I think that is meant to refer to the cases where a footnote citation
> appears in the last block on a page, so it is not necessary to move the
> whole block to the next page just because a few of its footnotes don't fit.
> 
> <snip />
> > - is it correct to assume that the footnote separator is the same on each
> > page containing footnotes, or it could have some page-dependant content?
> > At the moment, its areas are obtained only once, and repeated in each page
> > where a footnote is inserted.
> 
> AFAICT 'xsl-footnote-separator' is meant to be specified as the flow-name
> property on an fo:static-content, so in essence they are meant to be mostly
> the same for an entire fo:flow (~ fo:page-sequence), BUT...
> 
> One thing I wonder about: Is it allowed to have sth like
> 
> <fo:static-content flow-name="xsl-footnote-separator">
>   <fo:retrieve-marker .../>
> </fo:static-content>

AFAICS, this is perfectly legal. The spec says in 6.10.3:

"An fo:footnote is not permitted to have an fo:float, fo:footnote, or
fo:marker as a descendant.
Additionally, an fo:footnote is not permitted to have as a descendant an fo:block-container that generates
an absolutely positioned area."

I've added a mean example (footnotes2.xml) that uses fo:page-number in
the separator. :-) Perfectly legal I think even though far-fetched.

BTW, am I really still the only one working with the testcases I started?
:-O

> In which case the content of the separator *would* be page-specific...?

Yep.



Jeremias Maerki


RE: Footnotes working!

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Luca Furini [mailto:lfurini@cs.unibo.it]
>

Hi Luca,

First of all: compliments on yet another Nice Job!

> At the moment the page breaking algorithm is quite "strict": it tries to
> insert every footnote in the same page where their citation is (the last
> footnote body could be split, and partially deferred to the next page).

Well, that fits the largest part of the requirements...

>
> The recommendation seems to suggest that it could defer one or more
> *whole* footnotes, if there is not enough space in the page where their
> citations are, even if this is not very usual to happen in books; anyway,
> this could be fixed later.

Optimistic interpretation:
I think that is meant to refer to the cases where a footnote citation
appears in the last block on a page, so it is not necessary to move the
whole block to the next page just because a few of its footnotes don't fit.

<snip />
> - is it correct to assume that the footnote separator is the same on each
> page containing footnotes, or it could have some page-dependant content?
> At the moment, its areas are obtained only once, and repeated in each page
> where a footnote is inserted.

AFAICT 'xsl-footnote-separator' is meant to be specified as the flow-name
property on an fo:static-content, so in essence they are meant to be mostly
the same for an entire fo:flow (~ fo:page-sequence), BUT...

One thing I wonder about: Is it allowed to have sth like

<fo:static-content flow-name="xsl-footnote-separator">
  <fo:retrieve-marker .../>
</fo:static-content>

In which case the content of the separator *would* be page-specific...?

<snip />


Cheers,

Andreas