# Using mathmode in '\graph[layered layout]' environment

I am trying to get into TikZ and pgf to create figures and graphs. In the package there is the \graph command, which provides a simple yet power full interface to draw graphs and trees. However I can't seem to get the math mode working with it.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,graphs,graphdrawing}
\usegdlibrary{layered}
\begin{document}
\tikz\graph[layered layout]{a -- b};
\end{document}


works just as intended, producing

However I want to have it display formulas and Greek letters as labels of nodes or edges, such as \delta or x\cdot (1-x). Changing above to

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,graphs,graphdrawing}
\usegdlibrary{layered}
\begin{document}
\tikz\graph[layered layout]{$a$ -- b};
\end{document}


or using $\delta$ or similar will crash on compilation. In particular above code would crash with

File ended while scanning use of \tikz@cc@parse@factor.


I toyed around with it and tried to make it work, but I can't seem to find the solution. How can I have formulas and Greek letters as names of nodes in my graph?

\documentclass{standalone}
\tikz\graph[layered layout]{"$\delta a$" -- "$x\cdot(1-x)$"};