I was trying to place a node relative to another node with the following code:
\documentclass[margin=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{
facility/.style={rectangle,draw=blue!50,fill=blue!20,
minimum width=20mm,align=center,
text width=20mm,font=\footnotesize},
}
\begin{document}
\begin{tikzpicture}
\node[facility] (sup) {Supplier Facility};
\node[facility] (cust) [right of=sup] {Customer Facility};
\end{tikzpicture}
\end{document}
The output is shown below. Unfortunately the two nodes are overlapping, which is not what was desired.

I realized that my mistake was that I needed to replace right of=sup with right=of sup.
\documentclass[margin=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{
facility/.style={rectangle,draw=blue!50,fill=blue!20,
minimum width=20mm,align=center,
text width=20mm,font=\footnotesize},
}
\begin{document}
\begin{tikzpicture}
\node[facility] (sup) {Supplier Facility};
\node[facility] (cust) [right=of sup] {Customer Facility};
\end{tikzpicture}
\end{document}
The code above gives the desired output:

Question
- Why is
right of=supdifferent fromright=of sup? - If
right of=is wrong, why doesn't it give a compile error or warning? - Is it possible to make
right of=give a compile error or warning? This seems like a particularly easy mistake to make.