-
Notifications
You must be signed in to change notification settings - Fork 313
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
Compatibility issue with pdfpages #314
Comments
I actually found the solution. The issue was that in dndheader.sty, on line 70, the pagestyle{empty} was defined as:
So, the pagestyle was resetting only the footer, and not the header (who inserts the background image): while adding
solves the issue, because it also resets the header, removing the background from pages with \thispagestyle{empty} |
Apologies for the long delay. Life has been hectic. I think your best option would be to add a new page style for included pdf pages. See section 12 of the You switch to that page style before including the PDFs, and back to fancy when you are done. |
Adding a concrete example of how I handle this: % In pre-amble
\fancypagestyle{cover}{\fancyhf{}}
% Later in the document
\includepdf[pagecommand={\thispagestyle{cover}}]{img/full-page-pdf} As the same implies, I mainly use the style for covers, which I render as follows: \null%
\includepdf[pagecommand={\thispagestyle{cover}}]{cover}%
{\let\newpage\relax\maketitle} |
I have been using your template for a while on Overleaf with pdflatex, and it's great! However, I discovered a weird issue: when adding pages from another PDF document, using the \includepdf command from the pdfpages package, if the option bg in the dndbook class is set to full (as it is by default), the background image (e.g. img/paper.jpg) is rendered ON TOP of the the included PDF images, hiding the content. By setting bg=none or bg=print, the issue disappears.
I looked into the dndheader.sty, and it looks like that the code adding the background figure is on lines 36-44:
% Header is used to include the page background
\fancyhead{
\bool_if:NT \l__dnd_show_background_bool
{
\begin{tikzpicture}[remember
picture,overlay]sep=0pt] at (current~page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{img/paper}};\node[inner
\end{tikzpicture}
}
}
Unfortunately I am not familiar with the packages used: is it possible that there is a mistake somewhere that creates this (I assume incorrect) behavior?
The text was updated successfully, but these errors were encountered: