# Tikz figure inside equation with braces that are too large

I'm currently trying to include a tree, visualized using Tikz-qtree and Tikz into an equation. The problem I'm having is that the curly braces are way too large.

The code I'm using at the moment is:

\documentclass{article}

\usepackage{tikz}
\usepackage{tikz-qtree}

\begin{document}

$$Q = \left\lbrace \tikz{ \Tree[.E \alpha [.E [.E [.E [.E E \beta ] \gamma_3 ] \gamma_2 ] \gamma_1 ] ] } \right\rbrace$$

\end{document}


Probably there is some argument that needs to be added to the \tikz command, but I've not found the solution in the Tikz documentation. How can I reduce the size of the curly braces to match the size of the tikz figure?

-

You can use

baseline=(current bounding box.center)


so the center ot the picture is put on the baseline of the surrounding text.

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-qtree}

\begin{document}

$$Q = \left\lbrace \tikz[baseline=(current bounding box.center)]{ \Tree[.E \alpha [.E [.E [.E [.E E \beta ] \gamma_3 ] \gamma_2 ] \gamma_1 ] ] } \right\rbrace$$

\end{document}


-
Thank you! That is exactly what I was looking for :-) – eider Mar 1 '14 at 18:29

\documentclass{article}

\usepackage{tikz}
\usepackage{tikz-qtree}

\begin{document}

$$Q = \left\lbrace \raisebox{-.5\height}[.5\height]{% \tikz{ \Tree[.E \alpha [.E [.E [.E [.E E \beta ] \gamma_3 ] \gamma_2 ] \gamma_1 ] ] } } \right\rbrace$$

\end{document}

-