With older version of pgf the green line in the following example was drawn from the lower left to the upper right of A3 page. With pgf 3.0 I have to add the \hoffset (as for the red line) manually. It this change intended or a bug?
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{tikz,lipsum}
\newenvironment{A3}
{\clearpage
\advance\hoffset by \pdfpagewidth
\pdfpagewidth=2\pdfpagewidth
\paperwidth=2\paperwidth
}
{\clearpage}
\begin{document}
\begin{A3}
\tikz[overlay,remember picture]\draw[green,<->] (current page.south west) -- (current page.north east);%
\tikz[overlay,remember picture]\draw[red,<->] ([xshift=-\hoffset] current page.south west) -- ([xshift=-\hoffset]current page.north east);%
\lipsum[1]
\end{A3}
\end{document}
Ulrike Fischer
Just for the records:
I know that I changed something in the drivers for latex/plain tex/context regarding \hoffset.
However,
I search a bit in the sources for "hoffset" and compared the files of 3.0 with the files from an older pgf version. I found out that if add this (from an older pgfsys-pdftex.def) to my document it behaves well again:
In pgf 3.0. the definition looks like this:
Btw: The problem is not that hoffset in my example is changed in the middle of the document. This document doesn't work either:
Ulrike Fischer
Thanks for finding the suggested fix.
However, the modification with \hoffset and \voffset have been introduced intentionally as part of https://sourceforge.net/p/pgf/bugs/85/ . The limitation that \hoffset and \voffset might break is even listed in that ticket...
@ Till can you take care of this bug?
Assigning to Till
Revisiting after some years, a side remark: the new code sets the origin at \hoffset/\voffset (relativ to the lower left corner). This implicitly assumes that the logical page is vertically centered on the physical page. So the code works only if crop is used with the option center. A better calculation for the vertical offset would be
\pdfpageheight-\paperheight-\voffset:(this wouldn't solve my problem, as I want to keep the physical origin/page nodes).