# [pdftex] pdfsavepos

Andre Wobst wobsta at users.sourceforge.net
Tue Apr 15 17:55:43 CEST 2003

Hi,

On 15.04.03, Hans Hagen wrote:
> 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:

I do not even need dvipos, because I scan the dvi output myself and
can read all the specials myself. But this doesn't help in my case.
Let me be a bit more specific.

I create a box which some text inside which I shipout directly. This
looks like:

\newbox\mybox
\setbox\mybox=\hbox{Hello, world!}
\shipout\box\mybox

Fine. But I want to be able to insert some position markers in the
string (here it is "Hello, world!"). I want to be able to print out
the position of that markers. Unfortunately I can't use specials in
the dvi output, because after the shipout the dvi output for that page
isn't available immediately. There seems to be some dvi write caching
in TeX (at least, that's what I observed). On the other hand, by
shipout is performed. As I understood the topic, with builtin TeX
facilities I can't access any information about relative positions
within a box even when the box is completely ready before the shipout
as you can see in my example above.

André

--
by  _ _      _   Andre.Wobst at Physik.Uni-Augsburg.DE
/ \ \    / )  http://www.physik.uni-augsburg.de/~wobsta/
/ _ \ \/\/ /   PyX - High quality PostScript figures with Python & TeX
(_/ \_)_/\_/          visit http://pyx.sourceforge.net/