[metapost] pdftex \pdflastxpos for metapost?
Dan Luecking
luecking at uark.edu
Mon May 9 17:19:18 CEST 2005
At 05:02 PM 5/8/2005, you wrote:
>Hi,
>
>i'm trying to produce a page-size overlay with mpost over a page made by
>pdftex, where the \pdflastxpos and \pdflastypos coordinate pairs from
>certain anchor points are written to some .pos file by pdftex and then
>read in by mpost.
>
>Problem is that \pdflastx/ypos are integers in sp units, too large for
>mpost to handle. Now how to reduce these integers? Is it possible to do
>this already on the pdftex side during/inside the \write{} by some
>division macro? That would be nice. Or maybe by a slow scaling function
>via scantokens on the mpost side? Currently the easiest seems to
>preprocess the .pos file by awk, which is ugly due to the additional
>step. It looks as if it would be easier if there were some
>\pdflastxcoord and \pdflastycoord as dimen registers.
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}
TeX/pdfTeX expands \the <dimen register> to the dimension in
points. For example,
\dimen0=65536 sp "\the\dimen0"
produces
"1.0pt"
Dan
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Be kind. Every person you meet is fighting a hard battle." - Anon.
More information about the metapost
mailing list