[ pdftex-Patches-438 ] \pdfsavepos in DVI mode
Patches item #438, was opened at 2005-10-16 23:52 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=438&group_id=106 Category: Positioning
Group: v1.30.0 Status: Open Resolution: Accepted Priority: 5 Submitted By: Heiko Oberdiek (oberdiek) Assigned to: Hartmut Henkel (hhenkel) Summary: \pdfsavepos in DVI mode
Initial Comment:
\pdfsavepos in DVI mode
Hello,
using \pdfsavepos in a package of mine (tabularht)
I was wondering, why \pdfsavepos is not allowed to
work in DVI mode. \pdfsavepos in PDF mode is based
on cur_h and cur_v, both coming from the DVI frontend.
The only difference I found is that the PDF format
and pdfTeX's PDF mode know about page dimensions.
Thus the directions of the axes are the same for
the PDF format and the values of \pdfsavepos
(\pdflastxpos, \pdflastypos).
Origin: lower left corner
horizontal axis: values increasing from left to right
vertical axis: values increasing from bottom to top
unit: sp
The DVI case doesn't know about page dimensions, thus
I suggest using cur_h=0 and cur_v=0 as origin. It is
the left upper corner of the box that is being shipped
out.
Origin: left upper corner of the box
horizontal axis: values increasing from left to right
vertical axis: values increasing from bottom to top
unit: sp
Thus the absolute values differ in both modes and I
don't see that this can be avoided. However, if the
application uses a reference point then the relative
values are exactly the same.
The attachted patch enables and implements \pdfsavepos
for the DVI mode. It also contains the patch for
bug 437 (Two \immediate cancel themselves).
Yours sincerely
Heiko
to give page dimension info for pdftex also in DVI mode, one could implement the standard \special{papersize=x,y} also in pdftex (parallel to \pdfpagewidth/height), so that it would be scanned, and also go into the DVI file. Would this help?
I think, not really:
* Scanning of \specials are done in PDF mode already,
but here it is not really necessary, the current
drivers know about \pdfpage{width,height}.
* In DVI mode, the scanning of \special's contents
must then be added to set \pdfpage{width,height}.
But who needs this actually?
* Relative positioning with \pdfsavepos works
with or without the correct page size
information.
* Absolute positioning is more difficult in use
(If you are somewhere in a box, how do you
want to apply absolute positions?)
* If someone insist on absolute positioning,
he will probably not rely on an accidentally
issued \special{papersize=...}. He will probably
make sure, that the papersize information
is set and then he can also set
\pdfpage{width,height}.
Yours sincerely
Heiko
participants (1)
-
noreply@sarovar.org