# Horizontal alignment of tikzpicure in an equation

In this minimal working example,

\documentclass{article}
\usepackage{tikz}
\begin{document}

$$\lambda = \begin{tikzpicture} \draw(1cm,0) -- (2cm,0); \draw(2cm,0) -- (3cm,0); \draw(1cm,0)[fill=white]circle(.06cm); \draw(2cm,0)[fill=white]circle(.06cm); \draw(3cm,0)[fill=white]circle(.06cm); \node[below]at(2cm,0){\scriptsize \alpha_2}; \end{tikzpicture}$$

\end{document}


how can I align horizontally lambda and the lines in the tikzpicure? (equation (1) in the picture.)

If I remove the line

\node[below]at(2cm,0){\scriptsize $\alpha_2$};


or put [above] in place of [below], then everything is aligned as I want (equations (2) and (3) in the picture), but I want to keep the node below. Also, I would not want to put lambda inside the tikzpicture.

Thank you.

• The problem is that in the theory I am writing about, \node[above] has different meaning than \node[below]. – Rafael Mrđen Jul 12 '15 at 14:52

\documentclass{article}
$$\lambda = \begin{tikzpicture}[baseline={(0,{-0.5*height("\alpha_2")*1pt})}] \draw(1,0) -- (3,0) node[below,midway]{\scriptstyle\alpha_2}; \draw[fill=white]foreach\x in{1,2,3}{(\x cm,0)circle(.06cm)}; \end{tikzpicture}$$