1

I am writing my thesis by LaTex, I have searched in many forums, but can not find, how to draw block scheme like on the picture. Could you please give me hints or commands, which i can use in this case? Thank you very much in advance. enter image description here

    \documentclass{article}

\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{90pt}%
\begin{document}
\pagestyle{empty}


% Define block styles

\tikzstyle{block} = [rectangle, draw, fill=blue!10, 
    text width=40em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']


\begin{tikzpicture}[node distance = 2cm, auto]
    % Place nodes
    \node [block] (step 1) {1. We start the CUEs service loop by computing the priority index for each CUE m and for each sub-channel n according to (3.7).};

    \node [block, below of=step 1] (step 2) {2. We serve CUE m with sub-channel n fulfilling condition (3.8).};
    \node [block, below of=step 2] (step 3) {3. We remove sub-channel n and CUE m from the service list of TTI t, since we have to serve other CUEs with different (non-allocated) sub-channels.};
    % Draw edges
    \path [line] (step 1) -- (step 2);
    \path [line] (step 2) -- (step 3);
\end{tikzpicture}


\end{document}
  • Hello, everyone. I can dot it. Thanks a lot – user3727281 Sep 30 '17 at 20:14
2

like this?

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, chains, positioning, shadows}

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{3mm}%

\begin{document}
    \begin{tikzpicture}[
    node distance = 5mm,
      start chain = going below,
        LA/.style = {semithick, -{Triangle[length=3mm,width=3mm,fill=white]},
                     shorten >=0.5mm, shorten <=1.5mm},
every node/.style = {rectangle, rounded corners, draw, fill=white,
                     text width=30em, align=justify, font=\sffamily,
                     drop shadow,
                     on chain, join=by LA}%, join=by Dart}
                     ]
% Place nodes
\node {\textbf{1.} We start the CUEs service loop by computing the priority index for each CUE m and for each sub-channel $n$ according to (3.7).};
\node {\textbf{2.} We serve CUE $m$ with sub-channel n fulfilling condition (3.8).};
\node {\textbf{3.} We remove sub-channel $n$ and CUE m from the service list of TTI $t$, since we have to serve other CUEs with different (non-allocated) sub-channels.};
    \end{tikzpicture}
\end{document}

this flowchart is very simple. nodes are in the chain and connected with triangles. therefore the main effort was to define:

  • nodes style (i reduce width from 60em to 30em, add drop shadow and option on chain for nodes positioning, and join for connection between nodes)
  • connection lines (used arrows.meta library and with "dirty hack" line degenerate to do arrow head.

addendum:

  • in case, that this figure is used in two column article, than you only need that the image is not to wide. its width you can limited with use \linewidth for width of image:

\documentclass[twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, chains, positioning, shadows}

\usepackage{lipsum}% for dummy text for demonstrate article text

\begin{document}
\lipsum[11]
    \begin{table}[htb]
    \centering
\begin{tikzpicture}[
    node distance = 5mm,
      start chain = going below,
        LA/.style = {semithick, -{Triangle[length=3mm,width=3mm,fill=white]},
                     shorten >=0.5mm, shorten <=1.5mm},
every node/.style = {rectangle, rounded corners, draw, fill=white,
                     text width=\linewidth-2*\pgfkeysvalueof{/pgf/inner xsep}, % changed
                     align=justify, font=\sffamily,
                     drop shadow,
                     on chain, join=by LA}%, join=by Dart}
                     ]
% Place nodes
\node {\textbf{1.} We start the CUEs service loop by computing the priority index for each CUE m and for each sub-channel $n$ according to (3.7).};
\node {\textbf{2.} We serve CUE $m$ with sub-channel n fulfilling condition (3.8).};
\node {\textbf{3.} We remove sub-channel $n$ and CUE m from the service list of TTI $t$, since we have to serve other CUEs with different (non-allocated) sub-channels.};
    \end{tikzpicture}
\caption{my flowchart}
\label{fig:flowchart-1}
    \end{table}
\lipsum
\end{document}

enter image description here

  • @user3727281, i add short explanation to my answer and slightly correct code (in copying was lost `\end{document}, also i remove unnecessary libraries and packages. – Zarko Sep 30 '17 at 20:38
  • Do you know how can I put into the page with two columns? Thanks. – user3727281 Sep 30 '17 at 20:39
  • you only need to cary about of image width. so far is used 30em, but you can use \linewidth for width of nodes. I will add this option to answer asap. – Zarko Sep 30 '17 at 20:41
  • @user3727281, see addendum to answer. now, when you receive so complete service ... you can also vote for answer (by clicking on up-pen) :-) – Zarko Sep 30 '17 at 20:56
  • Great, well done. I have voted for your answer. Thanks a lot again. – user3727281 Sep 30 '17 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.