[cl-typesetting-devel] Q: Reference points absolute coordinates?

Marc Battyani marc.battyani at fractalconcept.com
Tue Nov 2 09:21:32 UTC 2004


Dmitri Ivanov wrote:

> Is it possible to find the absolute coordinates of a ref-point on the
page?
> How can I get absolute top or bottom of  a table row, e.g.
>
>  (tt:table (:col-widths (100 200))
>      (tt:row ()
>         (tt:mark-ref-point 'ref-point1)
>         (tt:cell () (tt:p () "test11"))
>         (tt:cell (:v-align :center) (tt:p () "test12")))
>      (tt:row ()
>         (tt:mark-ref-point 'ref-point2)
>         (tt:cell () (tt:p () "test21"))
>         (tt:cell (:v-align :center) (tt:p () "test22"))))
>
> (let ((ref-point1 (tt:find-ref-point 'ref-point1))
>         (ref-point2 (tt:find-ref-point 'ref-point2)))
>   (format t "~%ref-point1 y = ~s,  ref-point2 y = ~s"
>     (tt::y ref-point1) (tt::y ref-point2)))
> ; prints the save value for both

Generally it's not possible as an arbitrary transformation can be there.
If you just want to go up one level, that is getting the top-left
coordinates of the cell in the document referential it should be possible to
modify stroke table to put the stroke of the cell content outside the
pdf:translate thus staying in the document referential.

Marc





More information about the cl-typesetting-devel mailing list