# Error inserting image for layer in tikz-network (manual example)

Following the third example on page 35 of https://github.com/hackl/tikz-network/blob/master/manual.pdf I have been getting the following error below. Did I write something wrong in the code or omit something?

Error:

! Package calc Error: c' invalid at this point.

See the calc package documentation for explanation.
Type  H <return>  for immediate help.
...

l.6 \Plane[x=-.5,y=-.5,width=3,image=data/plane.png]

?


My MWE (72.tex):

\documentclass{article}
\usepackage{tikz-network}
\thispagestyle{empty}
\begin{document}
\begin{tikzpicture}[multilayer=3d]
\Plane[x=-.5,y=-.5,width=3,image=data/plane.png]
\end{tikzpicture}
\end{document}


My file tree:

MAIN_FOLDER
|- 72.tex
|- data (folder)
|- plane.png

• This command requires also the height to be specified, i.e. e.g. \Plane[x=-.5,y=-.5,width=3,height=2.5,image=plane.png] works. (I had a very quick look at the package and IMHO it is a somewhat wild mix of different strategies to set keys and so on. It may just be me but naively I expect it to produce conflicts if used in a document that does not only draw such networks. IMHO there should also be default value for the height rather that cryptic error message that refers to a package that would not even be needed to draw such diagrams.) – user121799 Jul 31 '19 at 0:06
• Of course your directory structure also works if you add the height: \documentclass{article} \usepackage{tikz-network} \thispagestyle{empty} \begin{document} \begin{tikzpicture}[multilayer=3d] \Plane[x=-.5,y=-.5,width=3,height=2.5,image=data/plane.png] \end{tikzpicture} \end{document}. – user121799 Jul 31 '19 at 0:14
• I do not think you made a mistake. Rather, IMHO there should be some default value for the key in place if you do not set it. IMHO there is some room for improvement in the package. – user121799 Jul 31 '19 at 0:36
• No, I do not think this is your fault. I think that the author was not careful enough when writing the package. They did not realize that the example does not work when compiled alone. The manual works by accident, simply because coordinates are global and the relevant vertices were defined in a previous tikzpicture. IMHO you have found a bug. – user121799 Jul 31 '19 at 0:42
• You may ask him politely whether it is really necessary to use two different ways of enabling keys. TikZ already has pgf keys built in, IMHO everything could (or perhaps even should) be done with those. Then the package is less vulnerable. – user121799 Jul 31 '19 at 0:49

You need also to specify the height. That is, this works:

\documentclass{article}
\usepackage{tikz-network}
\thispagestyle{empty}
\begin{document}
\begin{tikzpicture}[multilayer=3d]
\Plane[x=-.5,y=-.5,width=3,height=2.5,image=data/plane.png]
\end{tikzpicture}
\end{document}
`

I leave it to others to decide whether this is an issue. (But IMHO the package needs to be rewritten from scratch. This is only an opinion.)