In my document which is defined as A4, I want to place our logo in the upper left corner of the first page. The code I'm using for this is:
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=1cm] at (current page.north west){\includegraphics[width=3cm]{Logo}};
\end{tikzpicture}
If I compile my document with xelatex document.tex
no logo can be seen. When opening the PDF file in a graphic program, I find out that the logo has been included in the file, but positioned outside of the visible area of the page (way above the page and on the right side).
However if I compile my document with latexmk -xelatex document.tex
, the logo appears exactly where I expect it to be. Just this method gives me the following warning:
The following rules & subrules became out-of-date: 'xelatex'.
For now this compilation method still works, but I would assume that the rule will stop working sometime in the future, so I'd like to find out why the other way of compiling breaks my document.
I'd be glad for any explanation, idea or tip on how to fix this.
Here a complete example document which demonstrates the same behaviour:
\documentclass[12pt]{article}
\usepackage[left=2cm,top=1cm,right=2cm,bottom=2cm,nohead]{geometry}
\geometry{a4paper}
\usepackage{tikz}
\begin{document}
\graphicspath{{images/}}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=1cm] at (current page.north west){\includegraphics[width=3cm]{UniLogo}};
\end{tikzpicture}
\center
\vspace{2cm}
\large Lorem ipsum dolor sit amet
\pagebreak[4]
\end{document}
P.S.: Just to be clear, the logo file does exist in the indicated path, and it is also correctly read and included, just the position is off.
LaTeX
andXeLaTeX
. I also tried zsh compile withxelatex
- (This is XeTeX, Version 3.141592653-2.6-0.999994
)without any problem. Is you system up to date?remember picture, overlay
compile at least twice.