我想在环境中嵌入图像tikzpicture
。我尝试了以下方法,
\begin{tikzpicture}[]
\pgftext{\includegraphics[width=150pt]{pic1.png}} at (0pt,0pt);
\pgftext{\includegraphics[width=150pt]{pic2.png}} at (100pt,0);
\end{tikzpicture}
但两张图片都位于图像的左上角,位置相同。我尝试将它们也包含在节点内,但无济于事。
我究竟做错了什么?
答案1
在环境中嵌入外部图片的首选方法是在 内tikzpicture
插入。请参阅下面的代码以获取示例。\includegraphics{...}
\node
\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node[inner sep=0pt] (russell) at (0,0)
{\includegraphics[width=.25\textwidth]{bertrand_russell.jpg}};
\node[inner sep=0pt] (whitehead) at (5,-6)
{\includegraphics[width=.25\textwidth]{alfred_north_whitehead.jpg}};
\draw[<->,thick] (russell.south east) -- (whitehead.north west)
node[midway,fill=white] {Principia Mathematica};
\end{tikzpicture}
\end{document}
原图链接: