Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#295 pgf 3.0.: current page node is disturbed when hoffset is changed

v1.0 (example)
open
nobody
None
5
2014-03-07
2014-03-02
U_Fischer
No

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

Discussion

  • Just for the records:

    I know that I changed something in the drivers for latex/plain tex/context regarding \hoffset.

    However,
    1. that change was post 3.0.0
    2. it appears to be unrelated (I undid the change and I can still reproduce Ulrike's problem).

     
  • U_Fischer
    U_Fischer
    2014-03-07

    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:

    \makeatletter
     \def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}
    \makeatother
    

    In pgf 3.0. the definition looks like this:

    \def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfqpoint{\hoffset}{\voffset}}
    

    Btw: The problem is not that hoffset in my example is changed in the middle of the document. This document doesn't work either:

    \documentclass{scrartcl}
     \usepackage[T1]{fontenc}
      \usepackage{tikz,lipsum}
       %\makeatletter\def\pgf@sys@pdf@mark@pos@pgfpageorigin{\pgfpointorigin}\makeatother
    
       \advance\hoffset by 4cm
    
     \begin{document}
    
     \tikz[overlay,remember picture]\draw[green,<->] (current page.south west) --  (current     page.north east);%
    
     abc
    
     \end{document}
    

    Ulrike Fischer