I'm trying to recreate this diagram:
Mine already looks pretty good but the connection between the Environment and Sensornode lacks the 2nd right angle and space for the measured by text.
How can I make add the necessary space to the node?
Also, is it possible to load a tikz-diagram from an external file?
This is the code for a MWE (You can play with it here https://www.overleaf.com/3051741jzxtvm#/8435913/)
\documentclass[tikz, border=10pt]{standalone}
\usepackage{verbatim}
\tikzset{
vertex/.style = {
circle,
fill = black,
outer sep = 2pt,
inner sep = 1pt,
}
}
\begin{document}
\begin{tikzpicture}[node distance = 2cm, auto]
[
post/.style={->,shorten >=1pt,semithick}
]
% Nodes
\node[draw] (Sensor) at (2,0) {Sensor};
\node[draw] (Comparator) at (6,0) {Comparator};
\node[draw] (Actuator) at (10,0) {Actuator};
\node[draw] (Feedback) at (13,2) {Feedback};
\node[draw] (Environment) at (6,-2) {Environment};
\node[draw] (Disturbances) at (6,-4) {Disturbances};
\node at (1, 1) {\textbf{ Input}};
\node at (11, 1) {\textbf{ Output}};
\draw[->,draw=red] (Sensor) to node {alerts} (Comparator);
\draw[->,draw=red] (Comparator) to node {drives} (Actuator);
\draw[-, draw=red] (Actuator) -| node[pos=0.25] {affects} (Feedback);
\draw[->, draw=red] (Feedback) |- (Environment);
\draw[->, draw=red] (Environment) -| node {measured by} (Sensor);
\draw[<-,draw=red] (Environment) to node {affect} (Disturbances);
\end{tikzpicture}
\end{document}





tikzpictureinfile.texand use\input{file}. – Torbjørn T. Aug 02 '15 at 11:12