Hi, here ist the problem, that the "page" mode of \pdfliteral and \latelua does not by itself guarantee, that the result goes relative to the lower left corner (the PDF origin): \nopagenumbers \pdfcompresslevel=0 X\latelua{ x={};y={}; c=72/72.27/65536; x[1]=pdf.geth()*c; y[1]=pdf.getv()*c } \input tufte X\latelua page{ x[2]=pdf.geth()*c; y[2]=pdf.getv()*c } \hrule \latelua page{ tex.print(x[1], " ", y[1], " m ", x[2], " ", y[2], " l S") } \input tufte \bye The above example works as intended only, if you remove the \hrule. Reason is, that for setting a rule, a transform "cm" is done away from the origin, then the rule is placed, but there is no transforms back to the origin. The next placements are done after a transform relative to the placement point of the rule... Text is always typeset with the transform matrix "cm" set to the origin, and inside the BT...ET group the Td operator does the local transform. There seems to be currently no \pdfliteral (or \latelua) mode that guarantees positioning relative to the PDF origin. But positioning relative to the origin would be nice to have since we now have the pdf.geth/v() lua functions. Else one would have to think what was the state (text or rule?) just before using \pdfliteral page... To solve this ambiguity, i have tried the attached patch, which puts any rule into a qQ group and does "cm" transforms inside this group. So the rules are handled like text, which is also grouped (inside BT...ET). That means, that the global working reference point is (hopefully :) always (?) at the origin. With the rule.ch patch the above example works apparently ok. This also means, that when using \pdfliteral page, one gets stuff placed at the origin, and still without transform (which should be ok). This would spare to invent yet another \pdfliteral mode. No idea how general it is. And wonder, how backward-compatible? We would need to check also \pdfrefximage... Just for discussion... Regards, Hartmut P.S. Let's see how the attachment is handled. Never tried this before.