如何制作指向特定位置的倾斜箭头,如图所示
答案1
实现这一目标的无数方法之一:
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning, fit}
\usetikzlibrary{arrows.meta}
\tikzset{
ttnode/.style={
font=\ttfamily,
inner xsep=0pt,
}
}
\begin{document}
\begin{frame}[fragile]
\begin{tikzpicture}
\node (first) {The general function call is:};
\node[ttnode, below=-2pt of first](second){var=zeroes(};
\node[ttnode, green, right=0pt of second.base east, anchor=base west](toM){M};
\node[ttnode, right=0pt of toM.base east, anchor=base west](comma){,};
\node[ttnode, blue, right=0pt of comma.base east, anchor=base west](toN){N};
\node[ttnode, right=0pt of toN.base east, anchor=base west]{);};
\node[green, below left= of toM](fromM){Number of rows};
\node[blue, below right= of toN](fromN){Number of colunms};
\node[blue, fit=(first)(fromM)(fromN), draw]{};
\draw[-Triangle, green] (fromM) to[out=90, in=-90] (toM.south);
\draw[-Triangle, blue] (fromN) to[out=90, in=-90] (toN.south);
\end{tikzpicture}
\end{frame}
\end{document}