Almost the same test file as I used for testing 'dvipos' produces a
wandering positional graphic, in dvi or pdf mode. Here's the test file.
The problem is that the positional graphic (a tilted line) (that should
be) connecting the '6' and the '8' is several inches too low on the
page. I've attached a zip file with all the test files and results of
running everything -- see the README in it (or just run 'make view').
I'm using Ubuntu/i386 with:
CtxTools | context version: 2007.01.23 13:32
pdfTeX 3.141592-1.40.0-2.2 (Web2C 7.5.6) + patch for the mem corruption
MetaPost, Version 0.993 (Web2C 7.5.5)
metafun 2007-1-23 17:46 (format remade with latest apt-get)
The example is as minimal as I could make it. Remove the
\setuppapersize[bookpage][A4] and the graphics come out in the right
place. Remove the \completecontent or the \section{Fake} and it also
comes out okay.
=================== begin: to-pdf.tex ==================
\definepapersize[bookpage][width=6.875in,height=9in]
\setuppapersize[bookpage][A4]
\defineoverlay [foregraphics] [\positionoverlay{foregraphics}]
\setupbackgrounds
[page]
[background={foreground,foregraphics}]
\starttext
\section{Fake}
\completecontent
\hpos{r13}{6}
\hpos{r23}{7} \quad \hpos{r24}{8}
\startMPpositiongraphic{mypos:line}
mpprocset := 0; % context doesn't yet handle the new mpprocsets
path pa, pb, pab ; numeric na, nb ;
initialize_box(\MPpos{\MPvar{from}}) ;
na := nxy ; pa := llxy..lrxy..urxy..ulxy..cycle ;
initialize_box(\MPpos{\MPvar{to}}) ;
nb := nxy ; pb := llxy..lrxy..urxy..ulxy..cycle ;
if na=nb :
pab := center pa -- center pb ;
pab := pab cutbefore (pab intersectionpoint pa) ;
pab := pab cutafter (pab intersectionpoint pb) ;
pickup pencircle;
draw pab;
anchor_box(\MPanchor{\MPvar{from}}) ;
fi ;
\stopMPpositiongraphic
\startpositionoverlay{foregraphics}
\setMPpositiongraphic{r13}{mypos:line}{to=r24}
\setMPpositiongraphic{r23}{mypos:line}{to=r24}
\stoppositionoverlay
\stoptext
=================== end: to-pdf.tex ==================
-Sanjoy
`A nation of slaves is always prepared to applaud the clemency of their
master who, in the abuse of absolute power, does not proceed to the
last extremes of injustice and oppression.' (Gibbon)