banner



How To Create Flowchart In Latex

Quick and dirty hack for the arrow: \draw[arrow] ([xshift=-0.5cm]Modify AC coefficients.south) -| ([xshift=3cm]Watermarked Image.north);

Please

  • note that you should not use \tikzstyle, this is obsolete.
  • also check that latin1 is really the appropriate encoding for your document. The vast majority of editors use utf8 by default.
  • don't misuse x for \times

          \documentclass{article}  \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows}  %%%< \usepackage{verbatim} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt}% %%%>   \begin{document} \pagestyle{empty}  \tikzset {     arrow/.style={        ->,>=stealth} } % Define block styles \tikzstyle{decision} = [diamond, draw,       text width=4.5em, text badly centered, inner sep=0pt] \tikzstyle{block} = [rectangle, draw,       text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{block1} = [rectangle, draw,       text width=6em, text centered, rounded corners, minimum height=4em]     \tikzstyle{block2} = [rectangle, draw,       text width=15em, text centered, rounded corners, minimum height=4em]      \tikzstyle{block3} = [rectangle, draw,       text width=20em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex']   \begin{tikzpicture}[node distance = 2.5cm, auto]     % Place nodes     \node [block3] (Watermarked Image) {Watermarked Image};    \node[decision, above of =Watermarked Image,node distance=4cm ] (Difference between selected coefficients) {Difference between selected coefficients };    \node [block, left of=Difference between selected coefficients, node distance=3.5cm] (Inverse DCT for each block)     {Inverse DCT for each block};    \node [block, right of=Difference between selected coefficients, node distance=3.5cm] (Modify AC coefficients)     {Modify AC coefficients and perform Inverse DCT for each block};    \node [block2, above of=Difference between selected coefficients] (Genetic Algorithm)     {Genetic Algorithm search DCT coefficients to find best option for insert watermark};    \node [block, above of=Genetic Algorithm] (DCT for each block)     {DCT for each block};    \node [block, left of=DCT for each block] (Watermark Message)     {Watermark Message};     \node [block, above of=DCT for each block] (8x8 Image Blocking)     {8x8 Image Blocking};     \node [block, above of=Watermark Message] (Host Image)     {Host Image};     % Draw edges   \path [line] (Host Image) -- (8x8 Image Blocking);   \path [line] (8x8 Image Blocking) -- (DCT for each block);       \path [line] (DCT for each block) -- (Genetic Algorithm);       %\path [line] (Watermark Message) -- (Genetic Algorithm);      %\path [line] (Modify AC coefficients) -- (Inverse DCT for each block);      %\path [line] (Inverse DCT for each block) -- (Watermarked Image);      \path [line] (Genetic Algorithm) -- (Difference between selected coefficients);      \path [line] (Difference between selected coefficients) -- node {yes} (Inverse DCT for each block);     \path [line] (Difference between selected coefficients) -- node {no}(Modify AC coefficients);         \coordinate (n2nl) at ([xshift=-2cm]Genetic Algorithm.north);     \coordinate (n2nr) at ([xshift=-3cm]Watermarked Image.north);     \coordinate (n2ns) at ([xshift=3cm]Watermarked Image.east);      \draw[arrow] (Watermark Message.south -| n2nl) -- (n2nl);      \draw[arrow] (Inverse DCT for each block.south -| n2nr) -- (n2nr); %    \draw[arrow] (Modify AC coefficients.south -| n2ns) -- (n2ns);      \draw[arrow] ([xshift=-0.5cm]Modify AC coefficients.south) -| ([xshift=3cm]Watermarked Image.north);  \end{tikzpicture}   \end{document}                  

enter image description here

How To Create Flowchart In Latex

Source: https://stackoverflow.com/questions/61323937/trying-to-connect-two-boxes-in-flowchart-latex

Posted by: butlerbegroway.blogspot.com

0 Response to "How To Create Flowchart In Latex"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel