使用 Tikz 绘制此路径

使用 Tikz 绘制此路径

在此处输入图片描述

我想用 Tikz 生成这条路径,但我不知道怎么做。我试过用这个,但没有成功(我想使用编译器 LaTeX,而不是 pdfLaTeX,我用的是 OverLeaf。)有人能帮忙吗?

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning, arrows.meta, decorations.pathreplacing}

\begin{document}

\begin{tikzpicture}[>=Stealth, node distance=2cm and 3cm, thick]
  % Nodes
  \node (crocetin) {Crocetin};
  \node[right=of crocetin] (crocinV) {Crocin V};
  \node[right=of crocinV] (crocinIII) {Crocin III};
  \node[below=of crocinV] (crocinII) {Crocin II};
  \node[left=of crocinII] (crocinIV) {Crocin IV};
  \node[below=of crocinIII] (crocinI) {Crocin I};

  % Arrows with labels above
  \draw[->] (crocetin) -- node[above] {$\alpha$} (crocinV);
  \draw[->] (crocinV) -- node[above] {$\beta$} (crocinIII);
  \draw[->] (crocinIII) |- node[near start, right] {$\gamma$} (crocinI);
  \draw[<-] (crocinI) -- node[above] {$\kappa$} (crocinII);
  \draw[->] (crocinIV) -- node[above] {$\epsilon$} (crocinII);
  \draw[->] (crocetin) -- node[left] {$\xi$} (crocinIV);

  % Curved arrows
  \draw[->] (crocinI.south) to[out=-90,in=-90,looseness=1.5] node[below] {$\theta$} (crocetin.south);

  % Brace
  \draw[decorate, decoration={brace, amplitude=10pt, mirror}] 
  (crocinIV.south west) -- (crocinI.south east) node[midway, below=10pt] {$\sigma$};
\end{tikzpicture}

\end{document}

答案1

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
    \begin{tikzpicture}[thick, >=Triangle,
        block/.style={align=center, text width=5em, minimum height=4ex}]
        \draw[->] (0,0) node[block, anchor=east] (cr0) {Crocetin} -- node[above] {$\alpha$} ++(1.5,0) node[block, anchor=west] (cr5) {Crocin V};
        \draw[->] (cr5.east) -- node[above] {$\beta$} ++(1.5,0) node[block, anchor=west] (cr3) {Crocin III};
        \path (cr0.south) -- ++(0,-1) node[block, below] (cr4) {Crocin IV};
        \draw[->] ([xshift=-8pt]cr0.south) -- node[left] {$\zeta$} ([xshift=-8pt]cr4.north);
        \draw[<-] ([xshift=8pt]cr0.south) -- node[right] {$\xi$} ([xshift=8pt]cr4.north);
        \draw[->] (cr4.east) -- node[above] {$\varepsilon$} ++(1.5,0) node[block, anchor=west] (cr2) {Crocin II};
        \draw[->] (cr2.east) -- node[above] {$\kappa$} ++(1.5,0) node[block, anchor=west] (cr1) {Crocin I};
        \draw[->] (cr3.east) -- ++(2em,0) |- (cr1.east) node[pos=0.25, right] {$\theta$};
        \draw[->] (cr0.north) -- ++(0,2em) -| (cr3.north) node[pos=0.25, above] {$\gamma$};
        \draw[->] (cr4.south) -- ++(0,-2em) -| (cr1.south) node[pos=0.25, below] {$\sigma$};
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

使用tikz.cd(用于简单定位节点并在相邻节点之间绘制箭头)和ext.paths.ortho(用于简单绘制非相邻节点之间的锯齿形箭头)库:

\documentclass[margin=3.141592mm,varwidth]{standalone}
\usepackage{tikz-cd}
\usetikzlibrary{arrows.meta, 
                ext.paths.ortho,    % defined in the tikz-ext package
                }

\begin{document}

    \begin{tikzcd}[
  math mode = false,
arrow style = tikz,
     arrows = {>=Straight Barb, semithick, math mode},
                  ]
Crocetein \rar["\alpha"]      
\dar[shift right=2mm, "\zeta" '] 
\ar[rr, "\gamma", to path={r-ud node[above] {$\gamma$} (\tikztotarget)}]  
    & Crocin V  \rar["\beta"]   
        & Crocin III    \dar[to path={r-rl node[right] {$\theta$} (\tikztotarget)}] \\
Crocin II 
\rar["\varepsilon"]
    \uar[shift right=2mm,"\xi" ']    
    \ar[rr, to path={r-du node[below] {$\delta$} (\tikztotarget)} ]
    & Crocin IV  \rar["\kappa"]  
        & Crocin I;
    \end{tikzcd}
\end{document}

在此处输入图片描述

相关内容