Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgfpages layout "two screens with optional second" with "second top" do not show shading picture correctly #1333

Open
lrtfm opened this issue May 20, 2024 · 1 comment

Comments

@lrtfm
Copy link

lrtfm commented May 20, 2024

Brief outline of the bug

In the following MWE, a shading colour is created firstly, and then used in pgfpicture to show it in the top of the second logical page. When using option "second right" for the layout "two screens with optional second", everything is OK. However, changing "second right" to "second top" the shading colour also disappear. How to make the option "second top" show the shading picture correctly?

The result pdf with option:"second right"

The result pdf with option:"second top"

Minimal working example (MWE)

\documentclass[a5paper, landscape]{article}
\usepackage{pgf}
\usepackage{pgfpages}

% WITH OPTION "second right", everything is OK.
\pgfpagesuselayout{two screens with optional second}[second top]

\pgfdeclareverticalshading{headfade}{\paperwidth}%
{%
  rgb(0cm)=(0.9, 0.9, 0.9);
  rgb(3cm)=(0.8, 0.8, 0.9)%
}

\begin{document}

{\Huge Text for main page.}
\clearpage

\pgfpagescurrentpagewillbelogicalpage{2}
{\Huge Text that goes to second page.}

\pgfrememberpicturepositiononpagetrue
\begin{pgfpicture}
  \pgfusepath{use as bounding box}
  \pgftransformshift{\pgfpointanchor{current page}{north west}}
  \pgftext[top, left]{\pgfuseshading{headfade}}
\end{pgfpicture}

\end{document}
@muzimuzhi
Copy link
Member

Works well with pdflatex and lualatex. Problem only reproduces with xelatex. So may be similar to #960.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants