Wie positioniere ich eine in einem verankerten TikZ-Knoten enthaltene Grafik richtig?

Wie positioniere ich eine in einem verankerten TikZ-Knoten enthaltene Grafik richtig?

In diesem MWE \myfigscheint es horizontal um etwa die Hälfte verschoben zu sein \pgflinewidth:

\documentclass{article}
\usepackage{tikz}
\def\myfig{\includegraphics[height=1cm, width=\linewidth]{example-image-a4-numbered}}
% just fooling around:

\begin{document}

Reference:\\
\myfig

This works:\\
\begin{tikzpicture}
    \draw (0,0) node[inner sep=0] { \myfig };
\end{tikzpicture}

Overfull hbox (about 0.4pt too wide):\\
\begin{tikzpicture}
    \draw (0,0) node[inner sep=0, anchor=south west] { \myfig };
\end{tikzpicture}

Overfull hbox (about 0.2pt too wide):\\
\begin{tikzpicture}
    \draw (0,0) node[inner sep=0, anchor=south west, outer xsep=0] { \myfig };
\end{tikzpicture}

Overfull hbox (about 2pt too wide):\\
\begin{tikzpicture}
    \pgfsetlinewidth{10\pgflinewidth}
    \draw (0,0) node[inner sep=0, anchor=south west, outer xsep=0] { \myfig };
\end{tikzpicture}

Workaround:\\
\begin{tikzpicture}
    \pgfsetlinewidth{100\pgflinewidth}
    \draw (0,0) node[inner sep=0, anchor=south west, outer xsep=-\pgflinewidth/2] { \myfig };
\end{tikzpicture}

\end{document}

Gibt es eine bessere Problemumgehung als die, die ich verwende?

verwandte Informationen