[NTG-pdftex] pdfcurpageref -- does it make sense?
The Thanh Han
hanthethanh at myrealbox.com
Fri Jan 28 10:02:12 CET 2005
Hi,
using the 2nd pass processing then would solve this problem without the
need to introduce a new primitive. One can record the page numbers in
1st run, and use those numbers in 2nd run as argument to \pdfpageref.
Or am I missing some point?
Thanh
On Mon, Jan 17, 2005 at 10:11:31AM +0100, Hans Hagen wrote:
> The Thanh Han wrote:
>
> >I wonder how Hans and other would solve this problem. tex doesn't have a
> >concept of `current page' while processing the input token list. The
> >page number can be detected reliably only using 2nd pass processing, as
> >the page where some material ends up is known only at shipping phase.
>
> I use two pass solutions for that.
>
> I can imagine a primitive \pdfpageobjnum that expands at shipout time, i.e.
>
> \pdfobj{.... \pdfpageobjnum\space 0 R}
>
> in this case \pdfpageobjnum is like pdfsavepos, during shipout, those
> placeholders in the shipped out box are resolved; outside the otr/shipout
> routine it's zero, so
>
> \count15=\pdfpageobjnum
>
> leads to \count15 being 0
>
> I guess that the reason for this request is that in media objects one needs
> to refer to the page where the object (or its visualization) ends up, a kin
> dof circular reference between definition and usage; since these page
> references remain in the object (and are not used elsewhere) the delayed
> resolution during shipout is ok;
>
> >It is possible to provide a primitive which returns the *next* page object
> >number, but IMHO it doesn't make any sense.
>
> indeed, things can end up many pages later (think of intermediate float
> flushing)
>
> Hans
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
> | www.pragma-pod.nl
> -----------------------------------------------------------------
>
>
More information about the ntg-pdftex
mailing list