删除 TikZ 中结束贝塞尔曲线的箭头前不需要的间隙

删除 TikZ 中结束贝塞尔曲线的箭头前不需要的间隙

喂食

\documentclass{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{calc,bending}
\begin{document}
\begin{tikzpicture}
  \node[circle,draw] (N) at (15em,2ex) {};
  \coordinate (C) at (0,0);
  \draw[-latex] (C) .. controls (-2.6em,-1.5em) and ($(N.south west)-(1ex,1ex)$) .. (N.south west);
\end{tikzpicture}
\end{document}

产量pdflatex

输出

如您所见,曲线和箭头尖端之间存在不必要的间隙。我该如何消除它?

如果我们将圆形节点改为具有shapes不同轴的椭圆节点(使用),也会出现同样的问题。

错误报告:http://github.com/pgf-tikz/pgf/issues/1079

答案1

($(N.south west)-(1ex,1ex)$)将的值更改为($(N.south west)-(3ex,1ex)$)

\documentclass{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{calc,bending}
\begin{document}
\begin{tikzpicture}
  \node[circle,draw] (N) at (15em,2ex) {};
  \coordinate (C) at (0,0);
  \draw[-latex] (C) .. controls (-2.6em,-1.5em) and ($(N.south west)-(3ex,1ex)$) .. (N.south west);
\end{tikzpicture}
\end{document}

在此处输入图片描述

编辑插图:

足够距离:(2,1)

\documentclass{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{calc,bending}
\begin{document}
\begin{tikzpicture}

     \node[circle,draw] (a) at (0,0) {1};
     \node[circle,draw] (b) at (1,1) {2};
     \node[circle,draw] (c) at (2,1) {3};
     \node[circle,draw] (d) at (2,0) {4};

    \draw[-latex] (a) .. controls (b) and (c) .. (d.north west);
\end{tikzpicture}

\end{document}

在此处输入图片描述

距离不足:(2,0.1)

\documentclass{article}
\pagestyle{empty}
\usepackage{tikz}
\usetikzlibrary{calc,bending}
\begin{document}
\begin{tikzpicture}

     \node[circle,draw] (a) at (0,0) {1};
     \node[circle,draw] (b) at (1,1) {2};
     \node[circle,draw] (c) at (2,0.1) {3};
     \node[circle,draw] (d) at (2,0) {4};

    \draw[-latex] (a) .. controls (b) and (c) .. (d.north west);
\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容