Tikz 问题-创建此路径

Tikz 问题-创建此路径

我是 Tikz 的新手,我正在尝试在 overleaf 中开发以下内容: 在此处输入图片描述

我已经尝试使用这个起始代码但是在尝试复制图片时遇到了很多问题。

\begin{tikzpicture}
\draw (1,1) node[anchor=north east,circle,
draw]{A} -- (2,2) node[anchor=south west,
circle,draw]{B};
\end{tikzpicture}

您有什么想法或提示吗?提前谢谢!

答案1

请尝试以下操作:

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                calc, chains,
                positioning,
                shapes}
\makeatletter
\tikzset{suspend join/.code={\def\tikz@after@path{}}}
\makeatother

\begin{document}
    \begin{tikzpicture}[
node distance = 8mm and 12mm,
  start chain = going below,
     V/.style = {ellipse, draw=red, semithick, 
                 minimum width=3.4em, inner xsep=0pt, font=\small,
                 on chain},
     X/.style = {V, font=\large},
every label/.append style = {label distance=0pt, inner sep=1pt, font=\large},
 every path/.append style = {draw=cyan,-{Triangle[scale=0.8]},semithick, }
                        ]
\node (v1)  [V, label=$\nu_1$] {$\cos \nu$};                     
\node (v2)  [V, label=$\nu_2$] {$\ln \nu$};
\node (v3)  [V, label=$\nu_3$] {$\nu_{-1}\nu_0$};
\node (v4)  [V, label=$\nu_4$] {$\nu^3_0$};
%
\node(x1)   [X, label=$\nu_{-1}$, 
             left=of v2] {$x_1$};
\node(x0)   [X, label=$\nu_0$, 
             left=of $(v3.west)!0.5!(v4.west)$] {$x_1$};
%
\node(v6)   [suspend join,  V, 
             label=$\nu_6$,
             right=of v3] {$\nu_4+\nu_2$};
%
\node(v5)   [V, label=$\nu_5$,
             right=of v1 -| v6] {$\nu_1+\nu_3$};
\node(v7)   [V, label=$\nu_4$,
             right=of x0 -| v6] {$\nu_1+\nu_3$};
%
    \foreach \i in {1,2,3}
\path  (x1) -- (v\i);
    \foreach \i in {3,4,7}
\path  (x0) -- (v\i);
%
\path  (v1) -- (v5);
\path  (v2) -- (v6);
\path  (v4) -- (v6);
\path  (v6) -- (v7);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容