I'm using TikZ to include an image in a header and have found that if an image rolls onto the next page then TikZ includes it in place of the header on the next page (basically, TikZ appears to just grab the wrong image). Are there alternatives to \includegraphics
that I could use in hopes that I don't can hack my way around this?
minimal example:
\documentclass[12pt, letterpaper]{article}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usepackage{atbegshi}
\usetikzlibrary{calc}
\newcommand\HeadAndFoot{
\begin{tikzpicture}[overlay,remember picture]
% logo
\node[anchor=north west, xshift=250, yshift=-20] (logo) at (current page.north west) {\includegraphics[width=100pt]{figA}};
\end{tikzpicture}
}
\pagestyle{empty}
\AtBeginShipout{\HeadAndFoot}
\begin{document}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\includegraphics[width=\textwidth]{figB}
\end{document}
figA.png is 401x146 pixels figB.png is 630x128 pixels
When I do this I get a title page with no logo (expected), a second page with "figB" in the logo splot (surprise) and a third page with "figA" in the logo spot.
\includegraphic
.I'm using tikz to include an image in a header ...
This sounds like a mistake. (Though it is hard to tell without an example.) You might use TikZ in a header, but it sounds as if you might be using it to create the header.