6

I wish to use the overhead brace, bracing over the three items 8, 3, 11 from the bottom of 2.

enter image description here

Here is a template:

    \documentclass[11pt,urlcolor=blue, linkcolor=blue]{article} 

    \usepackage{sseq}
    \usepackage[all,cmtip]{xy}
    \usepackage{tikz-cd}
    \usepackage{tikz}
    \usetikzlibrary{matrix}
    \usetikzlibrary{decorations.markings}


    \begin{document}


 \begin{figure}[!h]
\begin{center}
\begin{tikzpicture}[scale=0.8]
\node at (0,5) {1};
\node at (0,4.5) {2};
\node at (0,4) {3};
\draw[->] (0,3.5) -- (0,2.5);
\node[right] at (0,3) {};
\node at (0,2) {4};
\node at (0,1.5) {};
\node at (0,1) {5};
\node at (0,0.5) {6};

\draw[->] (-0.5,3.5) -- (-3.5,2.5);
\node at (-2,3) {};
\node at (-3.5,2) {7};

\node at (-4,4) {8};
\draw[->] (-4,3.5) -- (-4,2.5);
\node[left] at (-4,3) {};
\node at (-4.5,2) {9};
\node at (-4,1.5) {};
\node at (-4,1) {10};


\node at (4,4) {11};
\draw[->] (4,3.5) -- (4,2.5);
\node[right] at (4,3) {}; 
\node at (4,2) {12};
\node at (4,1.5) {};
\node at (4,1) {13};



\end{tikzpicture}
\end{center}
\end{figure}

    \end{document}

1 Answer 1

6

I have not simplified your code which can be simplified in several different ways. I used the positioning library (page 229 of the manual 3.0.1a) to position nodes 2 and 1 relative to node 3. I named a few nodes by their value. To use the braces, I used the decorations.pathreplacing library. (page 581 of manual 3.0.1a)

capture

  \documentclass[11pt,urlcolor=blue, linkcolor=blue]{article} 
%    \usepackage{sseq}
%    \usepackage[all,cmtip]{xy}
%    \usepackage{tikz-cd}
    \usepackage{tikz}
%    \usetikzlibrary{matrix}
%    \usetikzlibrary{decorations.markings}
\usetikzlibrary{positioning,decorations.pathreplacing}

    \begin{document}
 \begin{figure}[!h]
\begin{center}
\begin{tikzpicture}[scale=0.8]

\node at (0,4)(3) {3};

\node[above =of 3] {1};
\node[above=5mm of 3]{2};
\node at (-4,4)(8) {8};
\node at (4,4)(11) {11};
\draw[decorate, decoration={brace,raise=2pt,amplitude=10pt}](8.north west)--(11.north east);
\draw[->] (0,3.5) -- (0,2.5);
\node[right] at (0,3) {};
\node at (0,2) {4};
\node at (0,1.5) {};
\node at (0,1) {5};
\node at (0,0.5) {6};

\draw[->] (-0.5,3.5) -- (-3.5,2.5);
\node at (-2,3) {};
\node at (-3.5,2) {7};
\draw[->] (-4,3.5) -- (-4,2.5);
\node[left] at (-4,3) {};
\node at (-4.5,2) {9};
\node at (-4,1.5) {};
\node at (-4,1) {10};
\draw[->] (4,3.5) -- (4,2.5);
\node[right] at (4,3) {}; 
\node at (4,2) {12};
\node at (4,1.5) {};
\node at (4,1) {13};
\end{tikzpicture}
\end{center}
\end{figure}

    \end{document}
3
  • that is basically what I wanted! thanks! (other ways you suggest to simplify can be posted as a separate answer. Please dont overwrite what you had!)
    – wonderich
    Dec 17, 2018 at 5:12
  • You can use the graphs library in several different ways to make this graph (see page 257)
    – AndréC
    Dec 17, 2018 at 5:14
  • 2
    @wonderich I suggest marking AndréC's answer as "Accepted" by clicking the tick below the up/down vote buttons, if the answer solves your problem.
    – user156344
    Dec 17, 2018 at 6:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .