[cl-typesetting-devel] Page n of m?

Bob Hutchison hutch at recursive.ca
Thu Sep 30 22:48:06 UTC 2004


On Sep 30, 2004, at 5:56 PM, Peter Seibel wrote:
>>
>
> Okay, more diggging around and I got it to work. The problem was my
> call to mark-ref-point was clobbering the old ref. So I changed my
> call:
>
>   (typeset:mark-ref-point :the-end)
>
> to:
>
>   (unless (typeset::find-ref-point :the-end)
>     (typeset:mark-ref-point :the-end))

This is the order of things...

1) tt::mark-ref-point is called
2) tt::find-ref-point-page-number is called (for each footer before the 
last page)
3) tt:stroke on the ref-point is called (when the last page is drawn)
4) tt:find-ref-point-page-number is called (for the last page)
5) done

As soon as the mark-ref-point is called we are on the final pass (there 
are no more undefined references). So there is no way to correct the 
footers generated in step 2.

It looks as though the technique Peter has come up with simply defers 
the call to mark-ref-point until the second pass, which seems to be 
equivalent to the first pass where it is known the ref-point will be 
needed. This will guarantee two passes even when all reference are 
backward.

Cheers,
Bob





More information about the cl-typesetting-devel mailing list