3

This question already has an answer here:

I am working with this figure (can be found at How to adjust arrows in this tikzpicture?)

enter image description here

Now I want to add brackets and some accompanying text as shown below. How can I do this?

enter image description here

The complete code for Fig.1 is:

\documentclass{beamer}
    \usetheme{default}
    \usecolortheme{default}
\usepackage[english]{babel}
\usepackage[style=verbose,backend=bibtex]{biblatex}
\usepackage{mathtools,mathdots,bm,fixltx2e}
\usepackage{tikz}
\usetikzlibrary{arrows,  calc, chains, positioning, quotes}
\newcommand\ppbb{path picture bounding box}
\tikzset{shorten <>/.style = {shorten >=#1, shorten <=#1},
dot/.style = {circle, fill=black,
            inner sep=0mm, outer sep=0mm, minimum size=0.1mm,
            node contents={}},
sum/.style = {circle, draw=black, fill=white, minimum size=6mm,
           path picture={\draw[very thick,shorten <>=1mm,-]
           (\ppbb.north) edge (\ppbb.south)
           (\ppbb.west)  edge  (\ppbb.east);
            },% end of node contents
            node contents={}},
            }
\begin{document}

\begin{frame}
\frametitle{OutPut}
    \begin{center}
\begin{tikzpicture}[
    node distance = 16 mm and 9 mm,
      start chain = going right,
      base/.style = {rectangle, draw=black, fill=white, 
                     inner sep=1mm, outer sep=0mm, minimum width=1cm,
                     font=\small},
    cblock/.style = {base, minimum height=8mm, on chain},
    sblock/.style = {base, minimum height=8mm},
    lblock/.style = {base,minimum height=18mm},
         X/.style = {font=\scriptsize},
every edge/.style = {draw,X}
                    ]
% first row (from left to right)                     
\coordinate[on chain] (in) at (0,0);
\node (c3)  [cblock]    {$\mathcal{C}_{3}$};
\node (pi2) [cblock]    {$\pi_2$};
\node (c2)  [cblock]    {$\mathcal{C}_2$};
\node (pi1) [cblock]    {$\pi_1$};
\node (c1)  [cblock]    {$\mathcal{C}_1$};% is there \matcal{M}?
% second row (from right to left)
\node (c1i)     [lblock, below = of c1]         {$\mathcal{C}_1^{-1}$};
\node (pi1i)    [sblock, below = of pi1]        {$\pi_1^{-1}$};
\node (pi12)    [sblock, below = 2mm of pi1i]   {$\pi_1$};
\node (c2i)     [lblock, below = of c2]         {$\mathcal{C}_2^{-1}$};
\node (pi2i)    [sblock, below = of pi2]        {$\pi_2^{-1}$};
\node (pi22)    [sblock, below = 2mm of pi2i]   {$\pi_2$};
\node (c3i)     [lblock, below = of c3]         {$\mathcal{C}_{3}^{-1}$};
\coordinate[left=of c3i] (out);
% summation
\node (s1)  [sum, right=of $(c1.south)!0.5!(c1i.north)$];
% lines in the first row 
\draw[-stealth] (in)    edge["$\bm{x_3}$"]  (c3) 
                (c3)    edge["$\bm{y_3}$"]  (pi2)
                (pi2)   edge["$\bm{x_2}$"]  (c2) 
                (c2)    edge["$\bm{y_2}$"]  (pi1)
                (pi1)   to  [X,"$\bm{x_1}$"]   (c1);
% lines at sum
\draw [-stealth] (c1)    -| node[X,above,pos=0.25] {$\bm{s}$} (s1);
\draw [-stealth] (c1 |- s1) -- node[X,above] {$\bm{w}$} (s1);
\draw [-stealth] (s1)    |- node[X,above,pos=0.75] {$\bm{r}$} (c1i);
% lines in the second row (from right to left, above)
\draw[-stealth] (c1i.west |- pi1i)  edge["$E{(\bm{x_1})}$" ']  (pi1i) 
                (pi1i)              edge["$A{(\bm{y_2})}$" ']  (c2i.east |- pi1i) 
                (c2i.west |- pi2i)  edge["$E{(\bm{x_2})}$" ']  (pi2i) 
                (pi2i)              edge["$A{(\bm{y_3})}$" ']  (c3i.east |- pi2i)
                (c3i)                to [X,"$E{(\bm{x_3})}$" ']  (out);
% lines in the second row (from left to right, below)
\draw[-latex]   (c3i.east |- pi22)  edge["$E(\bm{y_2})$"]   (pi22)
                (pi22)              edge["$A(\bm{x_2})$"]  (pi22 -| c2i.west)
                (c2i.east |- pi12)  edge["$A(\bm{y_2})$"]  (pi12)
                (pi12)              to [X,"$E(\bm{x_3})$"]  (pi12 -| c1i.west);
\end{tikzpicture}
    \end{center}
\end{frame}
\end{document}

marked as duplicate by user36296, user13907, Zarko tikz-pgf Aug 17 '16 at 21:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.