Re: Plass, Michael Frederick: Optimal Pagination Techniques for Automatic Typesetting Systems

2005-03-03 Thread Vincent Hennebert
Hi Fop Team,
Simon Pepping a écrit :
On Thu, Mar 03, 2005 at 08:19:24AM -0700, Victor Mote wrote:
Jeremias Maerki wrote:
While looking for material on page breaking I found several 
references to this document:
Does anyone know if it's worth ordering and waiting for it? 

By looking for this reference, I found the following article:
It's entitled 'On the Pagination of Complex Documents' (actually it's also 
referencing Plass). I've read parts of this article and it seems interesting. 
It's well written, quite easy to understand and provides a better algorithm than 
TeX's one. And it's also more recent. It doesn't agree with Plass about the 
NP-hard problem of page layout. Indeed that depends on the formula we are using 
to estimate the badness of a layout. It proposes another formula which seems 
more reasonable and better corresponds to a reader's expectations.
Perhaps it could provide a good basis? I don't have Knuth's 'Digital Typography' 
(I'm considering purchasing it). It may be worthwhile to compare this article 
with what is in the book.

The TeX program is described in 'TeX The Program'. That text is weaved
into the program code according to Knuth's literate programming
system. It can be freely extracted from the program code.

I've already done it, and AFAICT it's not easy to find the way in all the TeX 
stuff (actually nothing is easy with TeX ;-)). I can send you the pdf file if 
you want, feel free to ask me.
Be warned, though: it's a 535 pages (!) document that entirely describes the TeX 
program. I've started looking into it, and, well, it's rather cryptic. It's very 
close to the implementation, it seems to be difficult to get a general idea of 
what it's doing. But I'll investigate a bit more.
And, as Simon wrote, TeX is excellent in line-breaking but not as good in 
page-breaking. It was implemented in the early 80's when memory was expensive.
However, it was written with typographic quality in mind, and that's why it may 
be a good idea to try getting some hints from it.


Re: border-before-width length-conditional

2005-02-21 Thread Vincent Hennebert
Jeremias Maerki a écrit :
Am I right that for a table-cell in collapsing border model the
conditional part of a length-conditional (ex. in border-before-width)
has no effect (i.e. is ignored)?
I would answer no, actually not exactly.
If I understand the spec correctly, the conditional part has an effect only if 
the generated area begins an ancestor reference area.
Let's take the example of border-before. If there is a cell before the current 
cell we don't care about the conditionality: we just have to chose between this 
border, the border-after of the preceding cell, and the border-after and 
border-before of the containing table-rows.
Now if the table has to be broken at the end of a page and the current cell 
begins a new page (and no border is specified for the table-row), in this case 
the conditionality has to be taken in consideration. Because the cell would be a 
leading edge in the normal-flow-reference-area of the page, as defined at the 
end of section 4.2.5, Stacking Constraints.

Does it answer your question? I may have missed something, I have not carefully 
studied this aspect of the spec nor the border-collapsing model.

Hope this helps,

Re: representative example needed [was in fop-user]

2005-02-14 Thread Vincent Hennebert
Glen Mazza a écrit :
So I think we should wait on this until the W3C makes
up its own stylesheet without extensions, and makes
the same stylesheet publicly available for any XSL
processor to run.
OK. I personally don't feel capable of writing a stylesheet from scratch: I'm 
not familiar enough with XSLT. I would leave this task to someone other (Jay 
Bryant for example said on fop-user he could write a stylesheet).
I'd prefer to contribute to Fop in some other way.

What may be more cool--and a much better selling
point for FOP anyway--is for the Docbook XSL/PDF
stylesheets to work well with 1.0 (0.20.5 already does
a pretty good job with Docbook PDF generation.)  I
think that's a nicer target than the RenderX
stylesheet, much more practical for our user base, and
avoids the copyright headaches.  But it is indeed a
lot more work.
Well, I could do some work here. I'm already using Docbook to write some 
documents and I have played a bit with the fo stylesheet. For any improvement of 
that stylesheet I should perhaps rather refer to the Docbook developers.

However, IMHO it wouldn't be very useful to hack Docbook's stylesheets in order 
to work around Fop's currents flaws. The development of the HEAD branch is 
evolving quite quickly and any stylesheet improvement would be rather temporary.
Bug reports on Docbook files would perhaps be more useful.
Again, I would rather contribute to Fop by providing patches.

But if you all maintain that it would be really, really useful I can do it ;-)
We don't care much for making changes to 0.20.5
anymore.  We focus on 1.0.
I know. That was just because Jeremias and Clay spoke about a comparison between 
Fop 0.20.5 and Fop 1.0dev.

Fop 1.0dev (freshly checked out) crashes with a
Now *that* is of interest for us.  

I can provide details if needed (in form of a
Bugzilla entry?).
Sure for 1.0, please.
I'll try to isolate the problem and reduce the fo file as much as possible. Then 
I'll file a bug report, and, well, if I can, provide a patch...

No--because again we don't want it anywhere on our
site--please don't send it to us--it is RenderX's
stylesheet, not ours.  It is better not to even look
at it, lest our ideas for a similar stylesheet end up
coming from their work.
OK, I forget it.
You would be most welcome here.
I really would be glad to help. Sadly I don't have much time to devote to Fop. 
I've begun to read the XSL spec and dive into Fop code. I'll still need some 
time before being able to provide patches. Hope you'll hear about me soon...

(BTW, checked your ENSEEIHT website -- looks like a
wonderful place for a person to grow.)
Well, at least it's a good place to learn computer science (perhaps not as good 
to learn english, though ;-( ).


Re: representative example needed [was in fop-user]

2005-02-13 Thread Vincent Hennebert
[Web Maestro Clay]
It would be *great* if some enterprising and generous developer could spend 
the time to generate FOP-based XSL-FO documents from the XML, XSLT and XPath
 specs. In fact, that would be a useful tool for comparing how fop-0.20.5 
compares to fop-1.0-dev (the FOP re-design/TRUNK branch). Unfortunately, that
 hasn't been a priority up to this point. Perhaps it could become a priority
 in the future.
Oh, it would be so cool if we could have our own PDF of the XSL 1.0 
specification [1]. The official PDF was created by RenderX. I thought about 
doing a stylesheet for that myself but I'm currently so busy coding on FOP 
1.0dev that I'd be more than happy if someone from the user community could 
do that. It would also be interesting to compare FOP 0.20.5 and FOP 1.0dev 
which is under development.
Hi Fop team,
would there be anything wrong with using RenderX' XSLT stylesheet to produce a
pdf whith Fop? As I read this thread on fop-user a week ago, I wondered whether 
RenderX released the stylesheet they used to produce the official pdf of the XSL 
recommendation. Indeed they provided an xmlspec2fo stylesheet on their website 
[1], but now it seems to have disappeared (the site seems to have been refactored).

Anyway, I have it on my disk and tried to run Fop over it. Well, bad news so 
far ;-(
Fop 0.20.5 stops at p.16 whith an error message (Flow 'xsl-region-body' does not
map to the region-body in page-master 'blank-page'). This is the page where
there is just This page is intentionally left blank.
Fop 1.0dev (freshly checked out) crashes with a NoSuchMethodError.
As it was just a quick test, I didn't remove Xep extensions; this may be the
cause of the crash.
I can provide details if needed (in form of a Bugzilla entry?).
I could adapt the stylesheet to introduce Fop extensions (at least for the
0.20.5 version, I don't think they are available in 1.0dev?), and perhaps to
circumvent Fop's current flaws. If it may be useful to the Fop team I would be
glad to help.
However, I wonder whether we can use RenderX' stylesheet as a basis. I'm not 
very familiar with legal issues. So far the stylesheet was available on their
website; there is just a copyright statement (© RenderX , 1999-2001) at the
beginning of the file.

What is your opinion?