[Tex/LaTex] Brace diagram in TikZ

diagramstikz-pgf

I apologize if this has already been covered in some other posts, but I couldn't find it anywhere and I'm not even sure if "brace diagram" is the correct name in English.

I have found some examples of probability trees, and some others that are close (like this: Draw Curly Braces in TikZ), but while playing with them I couldn't get the correct output (The part of the first "text here" when out of boundaries into the brace).

What I'm trying to do is something like this with TikZ:

enter image description here

I know there are some ways to do this with mathmode, but I'm really interested in learning a little more about TikZ and how it works for diagrams like this.

Best Answer

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,decorations.pathreplacing}

\begin{document}

\begin{tikzpicture}
\node (main) {Text here};
\begin{scope}[node distance=1em]
    \node [right=of main] (t2) {Some text2};
    \node [above=of t2]   (t1) {Some text1};
    \node [below=of t2]   (t3) {Some text3};
\end{scope}
 \draw[decorate,decoration={brace,mirror}] (t1.north west) -- (t3.south west);

\begin{scope}[node distance=.5em]
    \node [right =of t1,yshift= .5em] (st2) {Some text 1.2};
    \node [right =of t1,yshift=-.5em] (st3) {Some text 1.3};
    \node [right =of t1,yshift=  1.5em] (st1) {Some text 1.1};
    \node [right =of t1,yshift= -1.5em] (st4) {Some text 1.4};
\end{scope}
\draw[decorate,decoration={brace,mirror}] (st1.north west) -- (st4.south west);
\end{tikzpicture}

\end{document}

enter image description here

Related Question