I'd like to add two tikz dimensions, like so
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newdimen\heya
\newdimen\xtra
\xtra=0.3cm
\heya=4cm+\xtra
\draw (0,0) -- (\heya, 0);
\end{tikzpicture}
\end{document}
The line \heya=4cm+\xtra causes an error. What's the right way to do this?
Thanks!
=======
UPDATE: See Steven's answer below.
I found it easier to create a macro, à la
\newcommand{\add}[2]{\dimexpr#1+#2\relax}
and then...
\heya=\add{4cm}{\xtra}
...works as desired!
