
我正在使用这个 Ti钾Z 代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings, positioning}
\tikzset{
mdot/.style={
shorten >=#1,
decoration={
markings,
mark={
at position 1
with {
\node [circle, thin, draw=blue, fill=white, inner sep=#1,radius=#1] at (0,0) {};
}
}
},
postaction={decorate}
},
mdot/.default=1pt
}
\begin{document}
\begin{tikzpicture}
\node [draw] (n1) {configuration files};
\node [draw,right=1cm of n1] (n2) {binaries};
\draw [draw=gray!50,mdot] (n1) to (n2);
\end{tikzpicture}
\end{document}
这项工作符合预期,在从 n1 到 n2 的线的末尾有一个小圆圈。
但如果我添加“out”和“in”属性,就像这样
\draw [draw=gray!50,mdot,out=0,in=90] (n1) to (n2);
不知道为什么圆圈消失了?
答案1
正如我在评论中提到的,对于线尾带有箭头的箭头,使用decorations.markings
“过度”解决方案。例如,可以通过以下方法轻松实现\draw [gray,-{Circle[open,blue]}] (n1) to (n2);
:
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
positioning}
\begin{document}
\begin{tikzpicture}
\node [draw] (n1) {configuration files};
\node [draw,right=of n1] (n2) {binaries};
\draw [gray,-{Circle[open,blue]}] (n1) to (n2);
\draw [gray!50,-{Circle[open,blue]}] (n1) to[out=0,in=90] (n2);
\end{tikzpicture}
\end{document}