Is it possible to specify the distance between the nodes using the relative positioning (such as below of) so this doesn't happen:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{shapes.multipart}
\usepackage{flowchart}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
\tikzstyle{decision_lb} = [diamond, draw, fill = blue!20,
text badly centered, node distance=3cm, text width = ]
% Operation
\tikzstyle{c_op} = [rectangle, draw, fill = blue!20,
text centered, minimum height=4em, text width=,minimum size=2em]
\begin{tikzpicture}[node distance = 1.5cm, auto]
\node[decision_lb](dec1){veeeery looooooooooooooooonnnnnnnnnnnnnnnnnggggggggggggggg text};
%yes branch
\node[c_op, below of = dec1] (op4) {$formulas$};
\end{tikzpicture}
\end{document}
This is, of course, a overexaggerated example but I have the same problem in a more complicated figure.
I need some command similar to below of but it has to include the outside measures of the previous shape. I'm using no yshift but it is trial and error to find the right value to make it look good. Until now I also wasn't able to find a similar question.
Edit: I want to place op4 in the same distance as in the second example regardless of what is written in dec1.
Second example:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{shapes.multipart}
\usepackage{flowchart}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
\tikzstyle{decision_lb} = [diamond, draw, fill = blue!20,
text badly centered, node distance=3cm, text width = ]
% Operation
\tikzstyle{c_op} = [rectangle, draw, fill = blue!20,
text centered, minimum height=4em, text width=,minimum size=2em]
\begin{tikzpicture}[node distance = 1.5cm, auto]
\node[c_op](dec1){veeeery looooooooooooooooonnnnnnnnnnnnnnnnnggggggggggggggg text};
%yes branch
\node[c_op, below of = dec1] (op4) {$formulas$};
\end{tikzpicture}
\end{document}
Edit2:
I want the same vertical distance between my shapes. My problem is that below of = dec1 just specifies the distances between the node origins. If the text in the shape diamond gets very long the diamond gets also vertically very big, but the distance to the next shape below is not changed (cause the node origins stay the same). So I need a command that specifies the distances to the outside of the other shape.






decision_lbwith the text as\phantom{text}and then use just simple nodesatdec1`` and [below of=dec1]. – koleygr Sep 19 '17 at 18:28