### Functional Block diagram

###### Thu 28 March 2019

How to make a block diagram with \LaTeX?

Here is an example with tikz resulting in the following figure:

The code:

\documentclass{article}
\usepackage[landscape,margin=1cm]{geometry}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}

\tikzstyle{block}=[draw,fill=red!20,rectangle,minimum height=3em,minimum width=3em]
\tikzstyle{sum}=[draw,fill=red!20,circle,node distance=3em]
\tikzstyle{input}=[coordinate]
\tikzstyle{output}=[coordinate]
\tikzstyle{pinstyle}=[pin edge={to-,thin,black}]

\begin{tikzpicture}[auto,node distance=8em,>=latex']

\node[input,name=input]{};
\node[block,right of=input](first){First block};
\draw[draw,->](input) -- node{}(first);

% increase node distance to avoid overlap
\node[block,right of=first,node distance=15em](second){Block with math and long text: $\int$};
\draw[->](first) -- (second);

% second input
\node[sum,right of=second,node distance=12em](circle0){X};
\node[input,above of=circle0](input0){second input};
\draw[->](second) -- node{$+$}(circle0);
\draw[->](input0) -- node{$++$}(circle0);

% nominal block
\node[block,right of=circle0,name=useless,node distance=14em,pin={[pinstyle]above:Upward entry},pin={[pinstyle]below:Other entry}]{Useless block};
\draw[->](circle0) -- node{something written} (useless);

\node[block,right of=useless](last){Last};
\draw[->,dashed](useless) -- node[name=dashed]{}(last);

% output1
\draw[->](last) -- node{out}(output);

% feedback
\node[block,below of=dashed](feedback){};

%  second circle
\node[sum,left of=feedback,node distance=6em](circle1){$+$};
\draw[->](feedback) -- (circle1);
\draw[->](circle1) -| node{ugly}(circle0);

\node[input,below of=circle1,node distance=2em](input2){};
\draw[->](input2) -- (circle1);

\end{tikzpicture}
\end{document}


Category: LaTeX Tagged: LaTeX how to

### LaTeX paragraph trick

###### Wed 05 August 2015
[caption id="" align="alignright" width="150" class="zemanta-img"] parnoindent (Photo credit: Wikipedia)[/caption]
It may be hard to use \par\noindent to begin a paragraph without indentation just after a \section or \paragraph command. One can think of letting a blank line, but this may not work. A trick is …

Category: LaTeX Tagged: LaTeX Typesetting