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

Bob Hutchison hutch at recursive.ca
Thu Sep 30 21:53:25 UTC 2004


On Sep 30, 2004, at 5:43 PM, Bob Hutchison wrote:

>
> On Sep 30, 2004, at 5:20 PM, Marc Battyani wrote:
>
>> Bob Hutchison wrote:
>>>>
>>>
>>> I am getting current pass: 1, undefined references: NIL,
>>> changed-references: NIL
>>
>> This is not good.
>> When the ref id is not yet defined, #'find-ref-point-page-number 
>> should push
>> the missing ref id in *undefined-references*.
>> This would start a second pass.
>>
>> Are you looking at the value of *undefined-references* just before 
>> the end
>> of with-document ?
>> (it's cleared at the beginning)
>>
>> Marc
>>
>
> It seems that I was calling the mark-ref-point too soon (i.e. before 
> the footer was built). I've appended the code I am using (it is based 
> on the multi-page example in test.lisp). I added some format 
> statements to some methods in references.lisp and this is what I'm 
> getting. I also changed the initform of pagenumber to -1 from 999 so I 
> could see the difference between the reference point not being defined 
> and the initform. It seems that the page number is not being changed.
>
>
> find-ref-point 'END-OF-DOC' -- ref-point [NIL]/NIL/NIL
> find-ref-point-page-number UNKNOWN ;; this means that there is no 
> ref-point yet
> find-ref-point 'END-OF-DOC' -- ref-point [#<TYPESET::REF-POINT 
> 12D4BD43>]/#<TYPESET::REF-POINT 12D4BD43>/NIL
> find-ref-point-page-number -1 ;; now there is one, but the page number 
> is -1 (the initform)
> current pass: 1, undefined references: (END-OF-DOC), 
> changed-references: NIL
> find-ref-point 'END-OF-DOC' -- ref-point [#<TYPESET::REF-POINT 
> 12D4BD43>]/NIL/#<TYPESET::REF-POINT 12D4BD43>
> find-ref-point-page-number -1
> find-ref-point 'END-OF-DOC' -- ref-point [#<TYPESET::REF-POINT 
> 11DCA83B>]/#<TYPESET::REF-POINT 11DCA83B>/#<TYPESET::REF-POINT 
> 12D4BD43>
> find-ref-point-page-number -1
> current pass: 2, undefined references: NIL, changed-references: NIL
> WRITE THE DOCUMENT NOW
>
>

After a little more mucking about, it seems that the method stroke 
((ref-point ref-point) x y) is not being called. This appears to be 
where the page number is supposed to be set to the correct value (at 
least this is the only place that I could find that sets the page 
number of a ref-point).

Cheers,
Bob





More information about the cl-typesetting-devel mailing list