= Block diagrams in TikZ format = {{{#!wiki caution '''Under Construction''' This warning will be removed once all [[computerBlockDiagram|Anton's eps block diagrams]] have been ported to [[http://www.ctan.org/pkg/pgf|TikZ]]. }}} == Background == [[https://www.control.lth.se/Staff/AntonCervin.html|Anton]] created a [[computerBlockDiagram|set of block diagrams]] in ps format, where text elements can be changed using {{{\psfrag}}} in latex. This page provides ports of these block diagrams to TikZ. The reason for creating these ports were: * The traditional latex compilation, using dvi and ps as middle formats, is widely being replaced with pdflatex and there is no equivalent to psfrag in pdflatex. * TikZ allows for changes not only of text, but also of the graphics, directly in the .tex document. * [[Matlab2tikz|Matlab graphics can be exported to TikZ]]. The format can therefore cater for all graphics needs. == Practical == TikZ is a programming language and a TikZ picture is a set of code. The below minimal example shows a .tex document, demonstrating the inclusion of a TikZ block diagram: {{{ \documentclass{pm} \usepackage{tikz} \begin{document} Figure~\ref{fig:block} shows an example block diagram. \begin{figure} \centering \begin{tikzpicture} \end{tikzpicture} \caption{This is a block diagram.\label{fig:block}} \end{figure} \end{document} }}} If you think the TikZ code clutters the .tex file, it can be placed in a separate file, e,g. {{{mypicture.tikz}}}, and inserted in the .tex file using the the command {{{\input{mypicture.tikz}}}}, which simply places the content of {{{mypicture.tikz}}} at the location of the commend. Note: The arrow style {{{-narrow}}} is local to the department. If you do not have access to it on your computer, you may use {{{-latex}}} instead, or download the file defining the style. == Block diagrams ==