为什么左弯道不起作用?

为什么左弯道不起作用?

看来我使用方法不bend left正确。

梅威瑟:

\documentclass[10pt,a4paper,twoside]{report}    \usepackage{geometry}   
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
%---------------------------------- tikz ---------------------------------------
\usepackage{tikz}    \usetikzlibrary{positioning,chains,fit,shapes,calc,arrows,patterns,external,shapes.callouts,graphs,decorations.pathreplacing,chains}
\usepackage{fixltx2e} 

\begin{document}

   \begin{tikzpicture}[thick,
      every node/.style={circle,},
      shorten >= 3pt,shorten <= 3pt,
      ]

      \node[draw] at (0,0) (ft) {x};
      \node[draw] at (0,5) (su) {y};

      \draw[red, very thick,bend left] (ft) -- (su);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

to-line 操作符--将忽略选项生成一条直线bend。你可以改用to

\documentclass[10pt,a4paper,twoside]{report}    
\usepackage{geometry}   
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}

\usepackage{tikz}    \usetikzlibrary{positioning,chains,fit,shapes,calc,arrows,patterns,external,shapes.callouts,graphs,decorations.pathreplacing,chains}
\usepackage{fixltx2e} 

\begin{document}

    \begin{tikzpicture}[thick,
      every node/.style={circle,},
      shorten >= 3pt,shorten <= 3pt,
      ]

      \node[draw] at (0,0) (ft) {x};
      \node[draw] at (0,5) (su) {y};

      \draw[red, very thick] (ft) to[bend left] (su);
    \end{tikzpicture}

\end{document}

在此处输入图片描述

请注意,不再需要加载使用最新的 2015 内核/格式fixltx2e

相关内容