[pdftex] pdfsavepos

Hans Hagen pragma at wxs.nl
Tue Apr 15 16:13:20 CEST 2003

At 09:56 15/04/2003 +0200, Andre Wobst wrote:
>lately I became interested in a nice feature of pdfTeX, namely
>\pdfsavepos, \pdflastxpos, and \pdflastypos. Unfortunately, while I
>was quite successfull in the stuff I really wanted to do, I realized
>now, that I can use this nice feature of pdfTeX in pdf-mode only. But,
>blame on me, I'm restricted to a dvi file creation. Now my question
>is, if there is a deeper reason for the restriction of pdfTeX to make
>this feature available in pdf-mode only. I've taken a look into the
>pdftex source already and found that check named "check_pdfoutput"
>preformed when using pdfsavepos. (You can savely access the registers
>pdflastxpos and pdflastypos, but this isn't usefull without
>pdfsavepos). I've tried to just remove that check to see what happens
>then, but I ended up with the TeX message: "! I can't go on meeting
>you like this." (which is not what I want ;-)).
>Right now it would be interesting whether it just would make sense to
>take a deeper look into the pdfTeX source in order to make this
>feature available in dvi-mode as well. Right now I just didn't got
>deeply enough into the source in order to understand how this feature
>is implemented. May be somebody could advice me if it should be
>possible at all to implement this feature in dvi-mode based on the
>pdftex code.

in dvi mode you can use a special, like:

   \special{pos:pxy "tag"}

   \special{pos:papersize ... ...}

then you can use dvipos to generate a file with positions:


This is DVIpos, Version 20030227
by Jin-Hwan Cho <chofchof at ktug.or.kr>

Usage: dvipos infile[.dvi] [outfile]

DVIpos appends output to infile.tuo if no outfile is specified.


                                   Hans Hagen | PRAGMA ADE | pragma at wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf

More information about the pdftex mailing list