Нужна помощь с LaTex Sketch?

Нужна помощь с LaTex Sketch?

Я использую Tiкz, чтобы нарисовать фигуру, которая ставит под угрозу множество вещей, которые мне, безусловно, понадобятся для дальнейших фигур. Было бы здорово, если бы кто-то помог! Я сейчас застрял, особенно когда дело доходит до позиционирования блока...

тикз эскиз

Вот что у меня есть на данный момент, но мне нужен текст со стрелками:

\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 таких диаграмм. Теперь их стало на одну больше. Чтобы добиться правильного позиционирования, вы можете воспользоваться библиотекой positioning. Есть много других инструментов, таких как , chainsно в данном случае они не окупаются IMHO.

\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(и, конечно positioning, ), если вы просто добавляете tikzpictureв свой документ.

решение2

Небольшая вариация ответа кота @Schrödinger. С использованием 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}

введите описание изображения здесь

Связанный контент