The documentation of TikZ seems to indicate that shape aspect
is available for all node shapes. However, the command is only available if shapes.geometric
is loaded and for some shapes (e.g. diamond). I tried to apply it to a rectangle, but without success:
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\newcommand\ww{4cm}
\node[draw, minimum width=\ww,shape aspect=5] {};
% works
\node[draw, diamond, minimum width=\ww,shape aspect=5, yshift=-1cm] {};
\end{tikzpicture}
\end{document}
Did I miss something? How can I construct rectangles with minimum width
and a ratio? Do I have to use the painful \pgfmathresult
macros to calculate it manually (I dislike them).