我有以下图片:
我想用箭头画出细胞膜、线粒体和核膜,并在箭头的另一侧画出相应的细胞器/膜。
另一件重要的事情是,文本应该位于图的右侧
我曾尝试这么做,但却陷入困境。
代码:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\node (cellMembrane) {};
\node (mitochondrion) {};
\node (nuclearEnvelope) {};
\node (cell) [left=of cellMembrane] {\includegraphics[width=4cm]{pic.png}};
\node (a) [] at (cell.center) {};
\node (b) [] at (cellMembrane.center) {cell membrane};
\node (c) [] at (mitochondrion.center) {mitochondrion};
\node (d) [] at (nuclearEnvelope.center) {nuclear envelope};
\draw [ultra thick,magenta,<-] (a) to (b);
\draw [ultra thick,magenta,<-] (a) to (c);
\draw [ultra thick,magenta,<-] (a) to (d);
\end{tikzpicture}
\end{frame}
\end{document}
输出
更新
\documentclass{beamer}
\usepackage{tikz}
\usepackage{tikz-imagelabels}
\begin{document}
\begin{frame}
\begin{annotationimage}{width=6cm}{pic.png}
\draw[annotation right = {cell membrane at 0.45}, thick, ->] to (0.75,0.45);
\draw[annotation right = {nuclear envelope at 0.75}, thick, ->] to (0.6,0.64);
\end{annotationimage}
\end{frame}
\end{document}
输出:
问题是,它会在箭头周围添加白色边框或类似的东西。另一个问题是箭头周围出现了一个“白色”圆圈
白色圆圈
答案1
正如评论所说,该tikz-imagelabels
软件包可能会有帮助。
如果您不喜欢箭头周围的光环,您可以像这样禁用它:
\documentclass{beamer}
\usepackage{tikz}
\usepackage{tikz-imagelabels}
\imagelabelset{
annotation arrow/.style =
{
draw,
->,
black,
thick,
shorten >= \borderthickness + \arrowdistance,
},
}
\begin{document}
\begin{frame}
\begin{annotationimage}{width=6cm}{example-image-duck}
\draw[annotation right = {with pizza at 0.45}] to (0.75,0.45);
\draw[annotation right = {Cute duck at 0.75}] to (0.6,0.64);
\end{annotationimage}
\end{frame}
\end{document}