[metapost] pdftex \pdflastxpos for metapost?

Hartmut Henkel hartmut_henkel at gmx.de
Mon May 9 20:07:10 CEST 2005

Thanks, Taco and Dan!

On Mon, 9 May 2005, Dan Luecking wrote:

> You could assign the value to a temporary dimension register (in
> pdftex) and write that out. Example:
> \dimen0=\number\pdflastxpos sp %\dimen0=1\pdflastxpos should also work.
> \write\myfile{\the\dimen0}

yes, but problem is that the \pdfsavepos happens very late, only at
shipout (else it won't know the absolute position), so you get a
\pdflastxpos value only after a \pdfsavepos...\vfill\eject, or when
using \write. Taco's version works if there is only one \pdfsavepos per
page. If there are several, it seems one needs the \write. So what i'm
looking for is conceptually something like:

\def\foo#1\relax{% here goes the trick of scaling #1

where \foo would make the division/scaling (no clue, how).

Regards, Hartmut

P.S. Now it appears that metapost wasn't the appropriate list, sorry.

More information about the metapost mailing list