I have a problem with \includegraphics
within TikZ with XeLaTeX, namely that the images get displaced.
This is similar to the problem described in this question, but the symptoms are different. Moreover, this problem appeared when I switched from Ubuntu’s TeX Live to a manually installed minimalistic TeX Live 2019, which suggests that I may be missing some package or I made some mistake when installing (I haven’t tried a full installation yet). Note that no error or otherwise helpful message is thrown.
Minimal example
It seems that any PDF image will cause the problem, but just so we are on the same page, I compile the following to obtain an image.pdf
to use. (It doesn’t seem to matter whether I compile with pdflatex
or xelatex
.)
\documentclass{standalone}
\begin{document}
\Huge Here is some text.
\end{document}
The main file is:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node{
\includegraphics[scale=1]{image.pdf}
};
\end{tikzpicture}
\end{document}
I compile this file once with xelatex
(left) and once with pdflatex
(right) and everything seems normal:
Now, I change the size of the image to scale=2
:
And finally for scale=3
, the included image has completely sailed off the page:
This problem vanishes when I remove the TikZ wrapper. What could be the reason for this and how can I fix it?