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)
Since the graphic is placed correctly when the printing and typesetting papersizes are the same, I added a \showframe and measured a few offets. The vertical distance between the correct and incorrect position is the same as the distance between the bottom of the layout frame and the bottom edge of the paper. Hence the problem did not appear without a special papersize. Consistent with that data, the graphic was placed correctly when the bookpage was given the height of A4 paper: \definepapersize[bookpage][width=6.875in,height=11.7in] So the problem is that the graphic is placed relative to the the print paper's origin, rather than to the typesetting paper's origin. It could be a bug in the ConTeXt macros or in my MetaPost positioning code -- which I borrowed from the MetaFun manual without, I admit, fully understanding it :-) -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
Any ideas on the wandering positional graphic? I'm happy to make more tests, but so far my theory is that they are being positioned relative to the printing page edges (rather than to the typesetting page edges). -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
I'll rummage in the code and see what I can find. -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
participants (2)
-
Sanjoy Mahajan
-
Taco Hoekwater