Menu

#85 PGF + Crop package

v1.0 (example)
closed-fixed
nobody
None
5
2013-06-21
2009-04-18
No

PGF absolute positioning does not work properly with the crop package.
This is a slight modification of the PGF "current page" definition that correctly deals with the crop package.
Be aware that this moves the current page for all packages that change the \hoffset and \voffset.

Unfortunately, this modification still does not work properly with XeTeX (somehow the \voffset is fine, but the \hoffset is off). It works fine in pdfTeX. I do not know why exactly this is.

\makeatletter
\expandafter\def\csname pgf@sh@ns@current page\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current page\endcsname{%
\def\southwest{\pgfpoint{\hoffset}{\voffset}}%
\def\northeast{\pgfpoint{\paperwidth+\hoffset}{\paperheight+\voffset}}%
}
\expandafter\def\csname pgf@sh@nt@logical page\endcsname{{1}{0}{0}{1}{0pt}{0pt}}
\expandafter\def\csname pgf@sh@pi@logical page\endcsname{pgfpageorigin}
\makeatother

Tested with:
XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)
Package: pgf 2008/01/15 v2.00 (rcs-revision 1.12)
Package: crop 2003/05/20 v1.9 crop marks (mf)

Discussion

  • Till Tantau

    Till Tantau - 2013-06-21
    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     
  • Till Tantau

    Till Tantau - 2013-06-21

    Fixed this in the CVS for pdflatex.

    XeTeX does really strange things with the hoffset and voffset, I have not been able to get anything consistent out of it...

     
MongoDB Logo MongoDB