On Thu, Oct 05, 2006 at 03:00:34AM -0700, woolly wrote:
> 
> Hi all,
> 
> I'm desperately trying to fix the page-number-citation justify alignment bug
> as we came across it late in development of our product and the release date
> is end of October! I'm new to Fop development and am kind of lost at the
> moment. Has anyone worked on this problem and have any pointers? Am I
> mailing the correct list (or is there a bugzilla type thing where people can
> discuss this problem in particular)?
> 
> My understanding so far:
> 
> Fop reads in the fo source and creates an area tree from it.
> Whilst the area tree is being created,
> PageNumberCitationLayoutManager.getPageNumberCitationInlineArea(LayoutManager
> parentLM) is used to generate InlineAreas. In this method, if the page
> number is known, a TextArea is returned with the proper number, otherwise an
> UnresolvedPageNumber containing the string "MMM" is returned
> (UnresolvedPageNumber is a TextArea subclass).
> More processing happens, all layout adjustments are made (I think this
> happens in AbstractBreaker.doLayout())
> Towards the end of creating the area tree, page-number-citations are
> resolved through AreaTreeHandler.tryIDResolution()
> 
> Hence, the page numbers were "MMM" when all the layout was being done, but
> are later changed to the correct number without any further layout change.
> 
> The problem seems to be that as the area tree is being created, a page is
> laid out after each one is created, when really, the layout should come at
> the end after all pages (and hence page-number-citation references) are
> known.

That is almost not possible. Two suggestions have been made to correct
the problem:

1. Relayout the paragraph with the page number citation, when the
   citation has been resolved.

2. Write the resolved references to an auxiliary file, which on the
   next run could be loaded as hints for the values to be expected.

Neither is a small fix. But if you are willing to work on it,
especially 1), that would be cool.

Regards, Simon

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

Reply via email to