LaTex Sketch ヘルプが必要ですか?

LaTex Sketch ヘルプが必要ですか?

私はTiを使用していますz 今後のフィギュアに必ず必要となる多くの要素を妥協したフィギュアを描きます。 誰か手伝ってくれると嬉しいです! 現在、特にブロックの配置に関して行き詰まっています...

tikzスケッチ

これまでのところ、次のようになっていますが、矢印のテキストが必要です。

\begin{tikzpicture}
        [block/.style={draw,minimum width=#1,minimum height=2em},
        block/.default=10em,high/.style={minimum height=3em},node distance=2em]
        \node (n0){Start};
        \node[block=28em,high,below=of n0] (n1){Identification Goal Definition + Prior Knowledge Accumulation};
        \node[block,below=of n1.south west,xshift=2em,anchor=north west] (n2){System Excitation};
        \node[block,below=of n2] (n3){Model Architecture Selection};
        \node[block,below=of n3] (n4){Order and Parameter Estimation};
        \node[block,below=of n4] (n5){Model Validation};
        \node[block=25em,high,below=of n5.south west,anchor=north west] (n6){Successful System Identification};

        \draw[-stealth] (n0) edge (n1)
        foreach \X in {1,...,5} {(n\X.south-|n2) edge (n\the\numexpr\X+1\relax.north-|n2)}
        (n5.east) -- ++(5em,0) coordinate (aux) |- (n2);
        \draw[-stealth] (aux|-n4) edge (n4) (n5.east) --++ (2em,0);
        \draw[-stealth] (aux|-n3) edge (n3) (n5.east) --++ (2em,0);

    \end{tikzpicture}

ここに画像の説明を入力してください

答え1

ようこそ!このサイトには、このような図が 100 個ほどあります。現在、もう 1 つあります。適切な配置を実現するには、ライブラリを使用することをお勧めしますpositioning。 などのツールは他にも多数ありますchainsが、この場合、私の意見では、それらは役に立ちません。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[block/.style={draw,minimum width=#1,minimum height=2em},
 block/.default=10em,high/.style={minimum height=3em},node distance=2em]
 \node (n0){Start};
 \node[block=28em,high,below=of n0] (n1){};
 \node[block,below=of n1.south west,xshift=2em,anchor=north west] (n2){};
 \node[block,below=of n2] (n3){};
 \node[block,below=of n3] (n4){};
 \node[block=25em,high,below=of n4.south west,anchor=north west] (n5){};
 \draw[-stealth] (n0) edge (n1)
 foreach \X in {1,...,4} {(n\X.south-|n2) edge (n\the\numexpr\X+1\relax.north-|n2)}
 (n4.east) -- ++(5em,0) coordinate (aux) |- (n2);
 \draw[-stealth] (aux|-n3) edge (n3) (n4.east) --++ (2em,0);
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

矢印を追加するには、 を使用しますquotes

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,quotes}
\begin{document}
\begin{tikzpicture}[block/.style={draw,minimum width=#1,minimum height=2em},
 block/.default=10em,high/.style={minimum height=3em},node distance=2em,auto]
 \node (n0){Start};
 \node[block=28em,high,below=of n0] (n1){};
 \node[block,below=of n1.south west,xshift=2em,anchor=north west] (n2){};
 \node[block,below=of n2] (n3){};
 \node[block,below=of n3] (n4){};
 \node[block=25em,high,below=of n4.south west,anchor=north west] (n5){};
 \draw[-stealth] (n0) edge["a"] (n1)
 foreach \X in {1,...,4} {(n\X.south-|n2) edge["b"] (n\the\numexpr\X+1\relax.north-|n2)}
 (n4.east) -- ++(5em,0) coordinate (aux) |- node[pos=0.75]{c}(n2);
 \draw[-stealth] (aux|-n3) edge["d"] (n3) (n4.east) --node{e}++  (2em,0);
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

これは矢印テキストを含む更新された質問のコードです。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,quotes}
\begin{document}
\begin{tikzpicture}
        [block/.style={draw,minimum width=#1,minimum height=2em},
        block/.default=10em,high/.style={minimum height=3em},
        node distance=2em,auto]
        \node (n0){Start};
        \node[block=28em,high,below=of n0] (n1){Identification Goal Definition + Prior Knowledge Accumulation};
        \node[block,below=of n1.south west,xshift=2em,anchor=north west] (n2){System Excitation};
        \node[block,below=of n2] (n3){Model Architecture Selection};
        \node[block,below=of n3] (n4){Order and Parameter Estimation};
        \node[block,below=of n4] (n5){Model Validation};
        \node[block=25em,high,below=of n5.south west,anchor=north west] (n6){Successful System Identification};

        \draw[-stealth] (n0) edge["a"] (n1)
        foreach \Y [count=\X] in {bla,blub,pft,ghh,trf} 
        {(n\X.south-|n2) edge["\Y"] (n\the\numexpr\X+1\relax.north-|n2)}
        (n5.east) --  ++(5em,0) coordinate (aux) |- node[pos=0.75] {d} (n2) ;
        \draw[-stealth] (aux|-n3) edge["c"] (n3)
         (aux|-n4) edge["b"] (n4) (n5.east) -- node[pos=0.5]
        {prt} ++ (2em,0);
    \end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

テキストは一意であるため、任意のものに置き換えることができます。をドキュメントに追加するだけの場合は、quotesライブラリ (およびもちろん) を必ずロードしてください。positioningtikzpicture

答え2

@Schrödinger の cat の回答の小さなバリエーション。chainsライブラリとマクロ `join を使用します。

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

\begin{document}
    \begin{tikzpicture}[
    node distance = 8mm and 0mm,
      start chain = going above,
       box/.style = {draw, minimum width=#1, minimum height=12mm, on chain},
     box/.default = 44mm,
every join/.style = {<-},
                > = {Stealth[length=3mm]}
                        ]
\node (n1) [box=88mm]{};
\node (n2) [box, above right=of n1.north west] {};
\node (n3) [box,join] {};
\node (n4) [box,join] {};
\node (n5) [box=96mm, above right=8mm and -8mm of n4.north west] {};
\draw[<-]  (n5.north) -- ++ (0,0.8) node[above] {Start};
%
    \begin{scope}[every path/.style={->}]
\draw  (n5.south -| n4) -- (n4);
\draw  (n2.east) -- ++ (1,0);
\draw  (n2.east) ++ (1,0) -- ++ (1,0) |- (n3);
\draw  (n3.east) ++ (2,0) |- (n4);
\draw  (n2) -- (n2 |- n1.north);
    \end{scope}
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

関連情報