Line break with equations in game tree labels produced with TikZLine break in edge labels in tikz graphTikZ -...

The (Easy) Road to Code

What can I do if someone tampers with my SSH public key?

Can you run a ground wire from stove directly to ground pole in the ground

Forcing Mathematica's Integrate to give more general answers

Learning to quickly identify valid fingering for piano?

Can a Tiny Servant be used as a messenger?

If nine coins are tossed, what is the probability that the number of heads is even?

Should we avoid writing fiction about historical events without extensive research?

Linear Combination of Atomic Orbitals

In the world of The Matrix, what is "popping"?

How to chmod files that have a specific set of permissions

Why can't we use freedom of speech and expression to incite people to rebel against government in India?

Rationale to prefer local variables over instance variables?

What is the meaning of option 'by' in TikZ Intersections

ESPP--any reason not to go all in?

Can a Mexican citizen living in US under DACA drive to Canada?

Naming Characters after Friends/Family

Practical reasons to have both a large police force and bounty hunting network?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

What's the best tool for cutting holes into duct work?

Is "cogitate" an appropriate word for this?

School performs periodic password audits. Is my password compromised?

How can friction do no work in case of pure rolling?

Can a Mimic (container form) actually hold loot?



Line break with equations in game tree labels produced with TikZ


Line break in edge labels in tikz graphTikZ - game tree representation with continuum of movesHow to define the default vertical distance between nodes?tikz tree fork down edge labelsDecision Tree with Labels on Both Sides of Linesagetex with breqn ? break line sagetex equationsLine break in qtree edge labelsdrawing complex tree with tikzDrawing a game tree on TikzEquations using Tree Diagrams













3















I use this manual for help with the drawing of game trees using TikZ (http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf).



However, I have a challenge I cannot seem to overcome. Some of my end-nodes require line breaks in the labels. In the concrete example below, in the end node on the left in the second branch (after "Not Resist"), I would like the equation after the two vertical lines (||) to be placed below the first equation. In other words split the line between the X and the U_S.



I have tried by specifying "align=centre" and using \ but it did not work. Similarly, I tried specifying an equation environment within the label, but it did not work either.



Any help would be most appreciated.



An MWE:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{tikz}
begin{document}

tikzset{
solid node/.style={circle,draw,inner sep=1.5,fill=black},
hollow node/.style={circle,draw,inner sep=1.5}
}

begin{tikzpicture}[scale=1.5,font=footnotesize]
tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
node(0)[solid node,label=above:{textbf{Sender}}]{}
child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
}
child{node(2)[solid node, label=above right:{textbf{Target}}]{}
child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
};
end{tikzpicture}

end{document}


A game tree model










share|improve this question



























    3















    I use this manual for help with the drawing of game trees using TikZ (http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf).



    However, I have a challenge I cannot seem to overcome. Some of my end-nodes require line breaks in the labels. In the concrete example below, in the end node on the left in the second branch (after "Not Resist"), I would like the equation after the two vertical lines (||) to be placed below the first equation. In other words split the line between the X and the U_S.



    I have tried by specifying "align=centre" and using \ but it did not work. Similarly, I tried specifying an equation environment within the label, but it did not work either.



    Any help would be most appreciated.



    An MWE:



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{tikz}
    begin{document}

    tikzset{
    solid node/.style={circle,draw,inner sep=1.5,fill=black},
    hollow node/.style={circle,draw,inner sep=1.5}
    }

    begin{tikzpicture}[scale=1.5,font=footnotesize]
    tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
    tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
    node(0)[solid node,label=above:{textbf{Sender}}]{}
    child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
    edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
    }
    child{node(2)[solid node, label=above right:{textbf{Target}}]{}
    child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
    child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
    edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
    };
    end{tikzpicture}

    end{document}


    A game tree model










    share|improve this question

























      3












      3








      3


      1






      I use this manual for help with the drawing of game trees using TikZ (http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf).



      However, I have a challenge I cannot seem to overcome. Some of my end-nodes require line breaks in the labels. In the concrete example below, in the end node on the left in the second branch (after "Not Resist"), I would like the equation after the two vertical lines (||) to be placed below the first equation. In other words split the line between the X and the U_S.



      I have tried by specifying "align=centre" and using \ but it did not work. Similarly, I tried specifying an equation environment within the label, but it did not work either.



      Any help would be most appreciated.



      An MWE:



      documentclass{article}
      usepackage[utf8]{inputenc}
      usepackage{tikz}
      begin{document}

      tikzset{
      solid node/.style={circle,draw,inner sep=1.5,fill=black},
      hollow node/.style={circle,draw,inner sep=1.5}
      }

      begin{tikzpicture}[scale=1.5,font=footnotesize]
      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
      node(0)[solid node,label=above:{textbf{Sender}}]{}
      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
      }
      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
      child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
      };
      end{tikzpicture}

      end{document}


      A game tree model










      share|improve this question














      I use this manual for help with the drawing of game trees using TikZ (http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf).



      However, I have a challenge I cannot seem to overcome. Some of my end-nodes require line breaks in the labels. In the concrete example below, in the end node on the left in the second branch (after "Not Resist"), I would like the equation after the two vertical lines (||) to be placed below the first equation. In other words split the line between the X and the U_S.



      I have tried by specifying "align=centre" and using \ but it did not work. Similarly, I tried specifying an equation environment within the label, but it did not work either.



      Any help would be most appreciated.



      An MWE:



      documentclass{article}
      usepackage[utf8]{inputenc}
      usepackage{tikz}
      begin{document}

      tikzset{
      solid node/.style={circle,draw,inner sep=1.5,fill=black},
      hollow node/.style={circle,draw,inner sep=1.5}
      }

      begin{tikzpicture}[scale=1.5,font=footnotesize]
      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
      node(0)[solid node,label=above:{textbf{Sender}}]{}
      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
      }
      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
      child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
      };
      end{tikzpicture}

      end{document}


      A game tree model







      tikz-pgf equations line-breaking trees






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 11 '16 at 17:52









      Stanislav StanchevStanislav Stanchev

      253




      253






















          5 Answers
          5






          active

          oldest

          votes


















          3














          You may use makecell:



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage{tikz}
          usepackage{makecell}
          begin{document}

          tikzset{
          solid node/.style={circle,draw,inner sep=1.5,fill=black},
          hollow node/.style={circle,draw,inner sep=1.5}
          }

          begin{tikzpicture}[scale=1.5,font=footnotesize]
          tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
          tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
          node(0)[solid node,label=above:{textbf{Sender}}]{}
          child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
          edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
          }
          child{node(2)[solid node, label=above right:{textbf{Target}}]{}
          child{node[hollow node, label=below:{makecell{$U_S(TS)=X$ \ $||U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
          child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
          edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
          };
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer
























          • Thanks a lot. A simple and straightforward solution. :-)

            – Stanislav Stanchev
            Jul 11 '16 at 18:56



















          0














          Stack it!



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage{stackengine}
          usepackage{tikz}
          begin{document}

          tikzset{
          solid node/.style={circle,draw,inner sep=1.5,fill=black},
          hollow node/.style={circle,draw,inner sep=1.5}
          }

          begin{tikzpicture}[scale=1.5,font=footnotesize]
          tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
          tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
          node(0)[solid node,label=above:{textbf{Sender}}]{}
          child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
          edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
          }
          child{node(2)[solid node, label=above right:{textbf{Target}}]{}
          child{node[hollow node, label=below:{stackunder{$U_S(TS)=X ||$}{%
          $U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
          child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
          edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
          };
          end{tikzpicture}

          end{document}


          enter image description here



          If you want it aligned, tabstack it (note: for some reason, the || needed additional grouping inside the slignstackunder):



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage{tabstackengine}
          stackMath
          usepackage{tikz}
          begin{document}

          tikzset{
          solid node/.style={circle,draw,inner sep=1.5,fill=black},
          hollow node/.style={circle,draw,inner sep=1.5}
          }

          begin{tikzpicture}[scale=1.5,font=footnotesize]
          tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
          tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
          node(0)[solid node,label=above:{textbf{Sender}}]{}
          child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
          edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
          }
          child{node(2)[solid node, label=above right:{textbf{Target}}]{}
          child{node[hollow node, label=below:{alignstackunder{U_S(TS)=&X {||}}{%
          U_T(TS)=&Y}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
          child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
          edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
          };
          end{tikzpicture}

          end{document}


          enter image description here






          share|improve this answer

































            0














            You can use amsmath and gathered; the reason for ! is explained elsewhere in the site.



            documentclass{article}
            usepackage[utf8]{inputenc}
            usepackage{amsmath}
            usepackage{tikz}
            begin{document}

            tikzset{
            solid node/.style={circle,draw,inner sep=1.5,fill=black},
            hollow node/.style={circle,draw,inner sep=1.5}
            }

            begin{tikzpicture}[scale=1.5,font=footnotesize]
            tikzset{
            level 1/.style={level distance=15mm, sibling distance=20mm},
            level 2/.style={level distance=15mm, sibling distance=20mm},
            }
            node(0)[solid node,label=above:{textbf{Sender}}]{}
            child{
            node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
            edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
            }
            child{
            node(2)[solid node, label=above right:{textbf{Target}}]{}
            child{
            node[hollow node, label=below:{
            $!begin{gathered}U_S(TS)=X \ ||U_T(TS)=Yend{gathered}$}]{}
            edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
            child{
            node[hollow node, label=below:{$TF$}]{}
            edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
            edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
            };
            end{tikzpicture}

            end{document}


            Note that tikzstyle is deprecated.



            enter image description here






            share|improve this answer































              0














              you only need add to label style align=center:



              documentclass{article}
              usepackage[utf8]{inputenc}
              usepackage{tikz}

              tikzset{
              solid node/.style={circle,draw,inner sep=1.5,fill=black},
              hollow node/.style={circle,draw,inner sep=1.5},
              every label/.append style={align=center}% <--- added
              }
              begin{document}

              begin{tikzpicture}[scale=1.5,font=footnotesize]
              tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
              tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
              node(0)[solid node,label=above:{textbf{Sender}}]{}
              child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
              edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
              }
              child{node(2)[solid node, label=above right:{textbf{Target}}]{}
              child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
              child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
              edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
              };
              end{tikzpicture}
              end{document}


              enter image description here






              share|improve this answer































                0














                Edit: istgame v2.0 (codes improved for tree parts)



                With the istgame v2.0, you can easily control the input modes and fonts for important labels using a new macro setistmathTF*.



                enter image description here



                documentclass{standalone}

                usepackage{istgame}
                usepackage{makecell}

                begin{document}

                begin{istgame}[scale=1.5,font=footnotesize]
                setistmathTF*001<textbf>
                xtShowEndPoints[oval node]
                setistSolidNodeStyle{4pt}
                xtdistance{15mm}{20mm}
                istroot(0){Sender}
                istb{Not Threaten}[al]{U_S(SQ)}
                istb*{Threaten}[ar]
                endist
                istroot(1)(0-2)<45>{Target}
                istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                istb{Resist}[ar]{TF}
                endist
                end{istgame}

                end{document}


                Original answer (istgame v1.0)



                This is an example that uses the istgame package to draw the game tree and the makecell pacakage for the line break.



                documentclass{standalone}

                usepackage{istgame}
                usepackage{makecell}

                begin{document}

                begin{istgame}[scale=1.5,font=footnotesize]
                xtShowEndPoints[oval node]
                setistSolidNodeStyle{4pt}
                xtdistance{15mm}{20mm}
                istroot(0)
                istb{Not Threaten}[al]{U_S(SQ)}
                istb*{Threaten}[ar]
                endist
                istroot(1)(0-2)
                istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                istb{Resist}[ar]{TF}
                endist
                xtOwner(0){textbf{Sender}}
                xtOwner(1){textbf{Target}}[ar]
                end{istgame}

                end{document}





                share|improve this answer

























                  Your Answer








                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "85"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: false,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: null,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f318953%2fline-break-with-equations-in-game-tree-labels-produced-with-tikz%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  5 Answers
                  5






                  active

                  oldest

                  votes








                  5 Answers
                  5






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  3














                  You may use makecell:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{tikz}
                  usepackage{makecell}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{makecell{$U_S(TS)=X$ \ $||U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here






                  share|improve this answer
























                  • Thanks a lot. A simple and straightforward solution. :-)

                    – Stanislav Stanchev
                    Jul 11 '16 at 18:56
















                  3














                  You may use makecell:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{tikz}
                  usepackage{makecell}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{makecell{$U_S(TS)=X$ \ $||U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here






                  share|improve this answer
























                  • Thanks a lot. A simple and straightforward solution. :-)

                    – Stanislav Stanchev
                    Jul 11 '16 at 18:56














                  3












                  3








                  3







                  You may use makecell:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{tikz}
                  usepackage{makecell}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{makecell{$U_S(TS)=X$ \ $||U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here






                  share|improve this answer













                  You may use makecell:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{tikz}
                  usepackage{makecell}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{makecell{$U_S(TS)=X$ \ $||U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 11 '16 at 18:24









                  CarLaTeXCarLaTeX

                  32.8k551136




                  32.8k551136













                  • Thanks a lot. A simple and straightforward solution. :-)

                    – Stanislav Stanchev
                    Jul 11 '16 at 18:56



















                  • Thanks a lot. A simple and straightforward solution. :-)

                    – Stanislav Stanchev
                    Jul 11 '16 at 18:56

















                  Thanks a lot. A simple and straightforward solution. :-)

                  – Stanislav Stanchev
                  Jul 11 '16 at 18:56





                  Thanks a lot. A simple and straightforward solution. :-)

                  – Stanislav Stanchev
                  Jul 11 '16 at 18:56











                  0














                  Stack it!



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{stackengine}
                  usepackage{tikz}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{stackunder{$U_S(TS)=X ||$}{%
                  $U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here



                  If you want it aligned, tabstack it (note: for some reason, the || needed additional grouping inside the slignstackunder):



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage{tabstackengine}
                  stackMath
                  usepackage{tikz}
                  begin{document}

                  tikzset{
                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                  hollow node/.style={circle,draw,inner sep=1.5}
                  }

                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                  }
                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                  child{node[hollow node, label=below:{alignstackunder{U_S(TS)=&X {||}}{%
                  U_T(TS)=&Y}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                  };
                  end{tikzpicture}

                  end{document}


                  enter image description here






                  share|improve this answer






























                    0














                    Stack it!



                    documentclass{article}
                    usepackage[utf8]{inputenc}
                    usepackage{stackengine}
                    usepackage{tikz}
                    begin{document}

                    tikzset{
                    solid node/.style={circle,draw,inner sep=1.5,fill=black},
                    hollow node/.style={circle,draw,inner sep=1.5}
                    }

                    begin{tikzpicture}[scale=1.5,font=footnotesize]
                    tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                    tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                    node(0)[solid node,label=above:{textbf{Sender}}]{}
                    child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                    edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                    }
                    child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                    child{node[hollow node, label=below:{stackunder{$U_S(TS)=X ||$}{%
                    $U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                    child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                    edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                    };
                    end{tikzpicture}

                    end{document}


                    enter image description here



                    If you want it aligned, tabstack it (note: for some reason, the || needed additional grouping inside the slignstackunder):



                    documentclass{article}
                    usepackage[utf8]{inputenc}
                    usepackage{tabstackengine}
                    stackMath
                    usepackage{tikz}
                    begin{document}

                    tikzset{
                    solid node/.style={circle,draw,inner sep=1.5,fill=black},
                    hollow node/.style={circle,draw,inner sep=1.5}
                    }

                    begin{tikzpicture}[scale=1.5,font=footnotesize]
                    tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                    tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                    node(0)[solid node,label=above:{textbf{Sender}}]{}
                    child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                    edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                    }
                    child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                    child{node[hollow node, label=below:{alignstackunder{U_S(TS)=&X {||}}{%
                    U_T(TS)=&Y}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                    child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                    edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                    };
                    end{tikzpicture}

                    end{document}


                    enter image description here






                    share|improve this answer




























                      0












                      0








                      0







                      Stack it!



                      documentclass{article}
                      usepackage[utf8]{inputenc}
                      usepackage{stackengine}
                      usepackage{tikz}
                      begin{document}

                      tikzset{
                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                      hollow node/.style={circle,draw,inner sep=1.5}
                      }

                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                      }
                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                      child{node[hollow node, label=below:{stackunder{$U_S(TS)=X ||$}{%
                      $U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                      };
                      end{tikzpicture}

                      end{document}


                      enter image description here



                      If you want it aligned, tabstack it (note: for some reason, the || needed additional grouping inside the slignstackunder):



                      documentclass{article}
                      usepackage[utf8]{inputenc}
                      usepackage{tabstackengine}
                      stackMath
                      usepackage{tikz}
                      begin{document}

                      tikzset{
                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                      hollow node/.style={circle,draw,inner sep=1.5}
                      }

                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                      }
                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                      child{node[hollow node, label=below:{alignstackunder{U_S(TS)=&X {||}}{%
                      U_T(TS)=&Y}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                      };
                      end{tikzpicture}

                      end{document}


                      enter image description here






                      share|improve this answer















                      Stack it!



                      documentclass{article}
                      usepackage[utf8]{inputenc}
                      usepackage{stackengine}
                      usepackage{tikz}
                      begin{document}

                      tikzset{
                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                      hollow node/.style={circle,draw,inner sep=1.5}
                      }

                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                      }
                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                      child{node[hollow node, label=below:{stackunder{$U_S(TS)=X ||$}{%
                      $U_T(TS)=Y$}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                      };
                      end{tikzpicture}

                      end{document}


                      enter image description here



                      If you want it aligned, tabstack it (note: for some reason, the || needed additional grouping inside the slignstackunder):



                      documentclass{article}
                      usepackage[utf8]{inputenc}
                      usepackage{tabstackengine}
                      stackMath
                      usepackage{tikz}
                      begin{document}

                      tikzset{
                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                      hollow node/.style={circle,draw,inner sep=1.5}
                      }

                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                      }
                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                      child{node[hollow node, label=below:{alignstackunder{U_S(TS)=&X {||}}{%
                      U_T(TS)=&Y}}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                      };
                      end{tikzpicture}

                      end{document}


                      enter image description here







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jul 11 '16 at 18:25

























                      answered Jul 11 '16 at 18:13









                      Steven B. SegletesSteven B. Segletes

                      157k9203411




                      157k9203411























                          0














                          You can use amsmath and gathered; the reason for ! is explained elsewhere in the site.



                          documentclass{article}
                          usepackage[utf8]{inputenc}
                          usepackage{amsmath}
                          usepackage{tikz}
                          begin{document}

                          tikzset{
                          solid node/.style={circle,draw,inner sep=1.5,fill=black},
                          hollow node/.style={circle,draw,inner sep=1.5}
                          }

                          begin{tikzpicture}[scale=1.5,font=footnotesize]
                          tikzset{
                          level 1/.style={level distance=15mm, sibling distance=20mm},
                          level 2/.style={level distance=15mm, sibling distance=20mm},
                          }
                          node(0)[solid node,label=above:{textbf{Sender}}]{}
                          child{
                          node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                          edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                          }
                          child{
                          node(2)[solid node, label=above right:{textbf{Target}}]{}
                          child{
                          node[hollow node, label=below:{
                          $!begin{gathered}U_S(TS)=X \ ||U_T(TS)=Yend{gathered}$}]{}
                          edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                          child{
                          node[hollow node, label=below:{$TF$}]{}
                          edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                          edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                          };
                          end{tikzpicture}

                          end{document}


                          Note that tikzstyle is deprecated.



                          enter image description here






                          share|improve this answer




























                            0














                            You can use amsmath and gathered; the reason for ! is explained elsewhere in the site.



                            documentclass{article}
                            usepackage[utf8]{inputenc}
                            usepackage{amsmath}
                            usepackage{tikz}
                            begin{document}

                            tikzset{
                            solid node/.style={circle,draw,inner sep=1.5,fill=black},
                            hollow node/.style={circle,draw,inner sep=1.5}
                            }

                            begin{tikzpicture}[scale=1.5,font=footnotesize]
                            tikzset{
                            level 1/.style={level distance=15mm, sibling distance=20mm},
                            level 2/.style={level distance=15mm, sibling distance=20mm},
                            }
                            node(0)[solid node,label=above:{textbf{Sender}}]{}
                            child{
                            node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                            edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                            }
                            child{
                            node(2)[solid node, label=above right:{textbf{Target}}]{}
                            child{
                            node[hollow node, label=below:{
                            $!begin{gathered}U_S(TS)=X \ ||U_T(TS)=Yend{gathered}$}]{}
                            edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                            child{
                            node[hollow node, label=below:{$TF$}]{}
                            edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                            edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                            };
                            end{tikzpicture}

                            end{document}


                            Note that tikzstyle is deprecated.



                            enter image description here






                            share|improve this answer


























                              0












                              0








                              0







                              You can use amsmath and gathered; the reason for ! is explained elsewhere in the site.



                              documentclass{article}
                              usepackage[utf8]{inputenc}
                              usepackage{amsmath}
                              usepackage{tikz}
                              begin{document}

                              tikzset{
                              solid node/.style={circle,draw,inner sep=1.5,fill=black},
                              hollow node/.style={circle,draw,inner sep=1.5}
                              }

                              begin{tikzpicture}[scale=1.5,font=footnotesize]
                              tikzset{
                              level 1/.style={level distance=15mm, sibling distance=20mm},
                              level 2/.style={level distance=15mm, sibling distance=20mm},
                              }
                              node(0)[solid node,label=above:{textbf{Sender}}]{}
                              child{
                              node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                              edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                              }
                              child{
                              node(2)[solid node, label=above right:{textbf{Target}}]{}
                              child{
                              node[hollow node, label=below:{
                              $!begin{gathered}U_S(TS)=X \ ||U_T(TS)=Yend{gathered}$}]{}
                              edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                              child{
                              node[hollow node, label=below:{$TF$}]{}
                              edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                              edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                              };
                              end{tikzpicture}

                              end{document}


                              Note that tikzstyle is deprecated.



                              enter image description here






                              share|improve this answer













                              You can use amsmath and gathered; the reason for ! is explained elsewhere in the site.



                              documentclass{article}
                              usepackage[utf8]{inputenc}
                              usepackage{amsmath}
                              usepackage{tikz}
                              begin{document}

                              tikzset{
                              solid node/.style={circle,draw,inner sep=1.5,fill=black},
                              hollow node/.style={circle,draw,inner sep=1.5}
                              }

                              begin{tikzpicture}[scale=1.5,font=footnotesize]
                              tikzset{
                              level 1/.style={level distance=15mm, sibling distance=20mm},
                              level 2/.style={level distance=15mm, sibling distance=20mm},
                              }
                              node(0)[solid node,label=above:{textbf{Sender}}]{}
                              child{
                              node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                              edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                              }
                              child{
                              node(2)[solid node, label=above right:{textbf{Target}}]{}
                              child{
                              node[hollow node, label=below:{
                              $!begin{gathered}U_S(TS)=X \ ||U_T(TS)=Yend{gathered}$}]{}
                              edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                              child{
                              node[hollow node, label=below:{$TF$}]{}
                              edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                              edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                              };
                              end{tikzpicture}

                              end{document}


                              Note that tikzstyle is deprecated.



                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 11 '16 at 18:28









                              egregegreg

                              724k8819183223




                              724k8819183223























                                  0














                                  you only need add to label style align=center:



                                  documentclass{article}
                                  usepackage[utf8]{inputenc}
                                  usepackage{tikz}

                                  tikzset{
                                  solid node/.style={circle,draw,inner sep=1.5,fill=black},
                                  hollow node/.style={circle,draw,inner sep=1.5},
                                  every label/.append style={align=center}% <--- added
                                  }
                                  begin{document}

                                  begin{tikzpicture}[scale=1.5,font=footnotesize]
                                  tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                                  tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                                  node(0)[solid node,label=above:{textbf{Sender}}]{}
                                  child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                                  edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                                  }
                                  child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                                  child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                                  child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                                  edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                                  };
                                  end{tikzpicture}
                                  end{document}


                                  enter image description here






                                  share|improve this answer




























                                    0














                                    you only need add to label style align=center:



                                    documentclass{article}
                                    usepackage[utf8]{inputenc}
                                    usepackage{tikz}

                                    tikzset{
                                    solid node/.style={circle,draw,inner sep=1.5,fill=black},
                                    hollow node/.style={circle,draw,inner sep=1.5},
                                    every label/.append style={align=center}% <--- added
                                    }
                                    begin{document}

                                    begin{tikzpicture}[scale=1.5,font=footnotesize]
                                    tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                                    tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                                    node(0)[solid node,label=above:{textbf{Sender}}]{}
                                    child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                                    edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                                    }
                                    child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                                    child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                                    child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                                    edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                                    };
                                    end{tikzpicture}
                                    end{document}


                                    enter image description here






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      you only need add to label style align=center:



                                      documentclass{article}
                                      usepackage[utf8]{inputenc}
                                      usepackage{tikz}

                                      tikzset{
                                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                                      hollow node/.style={circle,draw,inner sep=1.5},
                                      every label/.append style={align=center}% <--- added
                                      }
                                      begin{document}

                                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                                      }
                                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                                      child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                                      };
                                      end{tikzpicture}
                                      end{document}


                                      enter image description here






                                      share|improve this answer













                                      you only need add to label style align=center:



                                      documentclass{article}
                                      usepackage[utf8]{inputenc}
                                      usepackage{tikz}

                                      tikzset{
                                      solid node/.style={circle,draw,inner sep=1.5,fill=black},
                                      hollow node/.style={circle,draw,inner sep=1.5},
                                      every label/.append style={align=center}% <--- added
                                      }
                                      begin{document}

                                      begin{tikzpicture}[scale=1.5,font=footnotesize]
                                      tikzstyle{level 1}=[level distance=15mm, sibling distance=20mm]
                                      tikzstyle{level 2}=[level distance=15mm, sibling distance=20mm]
                                      node(0)[solid node,label=above:{textbf{Sender}}]{}
                                      child{node(1)[hollow node, label=below:{$U_S(SQ)$}]{}
                                      edge from parent node[left,xshift=-3,yshift=5]{textit{Not Threaten}}
                                      }
                                      child{node(2)[solid node, label=above right:{textbf{Target}}]{}
                                      child{node[hollow node, label=below:{$U_S(TS)=X$ \ $||U_T(TS)=Y$}]{} edge from parent node[left,xshift=-3,yshift=0]{textit{Not Resist}}}
                                      child{node[hollow node, label=below:{$TF$}]{} edge from parent node[right,xshift=3,yshift=0]{textit{Resist}}}
                                      edge from parent node[right,xshift=3,yshift=5]{textit{Threaten}}
                                      };
                                      end{tikzpicture}
                                      end{document}


                                      enter image description here







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jan 8 '18 at 6:26









                                      ZarkoZarko

                                      126k868165




                                      126k868165























                                          0














                                          Edit: istgame v2.0 (codes improved for tree parts)



                                          With the istgame v2.0, you can easily control the input modes and fonts for important labels using a new macro setistmathTF*.



                                          enter image description here



                                          documentclass{standalone}

                                          usepackage{istgame}
                                          usepackage{makecell}

                                          begin{document}

                                          begin{istgame}[scale=1.5,font=footnotesize]
                                          setistmathTF*001<textbf>
                                          xtShowEndPoints[oval node]
                                          setistSolidNodeStyle{4pt}
                                          xtdistance{15mm}{20mm}
                                          istroot(0){Sender}
                                          istb{Not Threaten}[al]{U_S(SQ)}
                                          istb*{Threaten}[ar]
                                          endist
                                          istroot(1)(0-2)<45>{Target}
                                          istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                          istb{Resist}[ar]{TF}
                                          endist
                                          end{istgame}

                                          end{document}


                                          Original answer (istgame v1.0)



                                          This is an example that uses the istgame package to draw the game tree and the makecell pacakage for the line break.



                                          documentclass{standalone}

                                          usepackage{istgame}
                                          usepackage{makecell}

                                          begin{document}

                                          begin{istgame}[scale=1.5,font=footnotesize]
                                          xtShowEndPoints[oval node]
                                          setistSolidNodeStyle{4pt}
                                          xtdistance{15mm}{20mm}
                                          istroot(0)
                                          istb{Not Threaten}[al]{U_S(SQ)}
                                          istb*{Threaten}[ar]
                                          endist
                                          istroot(1)(0-2)
                                          istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                          istb{Resist}[ar]{TF}
                                          endist
                                          xtOwner(0){textbf{Sender}}
                                          xtOwner(1){textbf{Target}}[ar]
                                          end{istgame}

                                          end{document}





                                          share|improve this answer






























                                            0














                                            Edit: istgame v2.0 (codes improved for tree parts)



                                            With the istgame v2.0, you can easily control the input modes and fonts for important labels using a new macro setistmathTF*.



                                            enter image description here



                                            documentclass{standalone}

                                            usepackage{istgame}
                                            usepackage{makecell}

                                            begin{document}

                                            begin{istgame}[scale=1.5,font=footnotesize]
                                            setistmathTF*001<textbf>
                                            xtShowEndPoints[oval node]
                                            setistSolidNodeStyle{4pt}
                                            xtdistance{15mm}{20mm}
                                            istroot(0){Sender}
                                            istb{Not Threaten}[al]{U_S(SQ)}
                                            istb*{Threaten}[ar]
                                            endist
                                            istroot(1)(0-2)<45>{Target}
                                            istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                            istb{Resist}[ar]{TF}
                                            endist
                                            end{istgame}

                                            end{document}


                                            Original answer (istgame v1.0)



                                            This is an example that uses the istgame package to draw the game tree and the makecell pacakage for the line break.



                                            documentclass{standalone}

                                            usepackage{istgame}
                                            usepackage{makecell}

                                            begin{document}

                                            begin{istgame}[scale=1.5,font=footnotesize]
                                            xtShowEndPoints[oval node]
                                            setistSolidNodeStyle{4pt}
                                            xtdistance{15mm}{20mm}
                                            istroot(0)
                                            istb{Not Threaten}[al]{U_S(SQ)}
                                            istb*{Threaten}[ar]
                                            endist
                                            istroot(1)(0-2)
                                            istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                            istb{Resist}[ar]{TF}
                                            endist
                                            xtOwner(0){textbf{Sender}}
                                            xtOwner(1){textbf{Target}}[ar]
                                            end{istgame}

                                            end{document}





                                            share|improve this answer




























                                              0












                                              0








                                              0







                                              Edit: istgame v2.0 (codes improved for tree parts)



                                              With the istgame v2.0, you can easily control the input modes and fonts for important labels using a new macro setistmathTF*.



                                              enter image description here



                                              documentclass{standalone}

                                              usepackage{istgame}
                                              usepackage{makecell}

                                              begin{document}

                                              begin{istgame}[scale=1.5,font=footnotesize]
                                              setistmathTF*001<textbf>
                                              xtShowEndPoints[oval node]
                                              setistSolidNodeStyle{4pt}
                                              xtdistance{15mm}{20mm}
                                              istroot(0){Sender}
                                              istb{Not Threaten}[al]{U_S(SQ)}
                                              istb*{Threaten}[ar]
                                              endist
                                              istroot(1)(0-2)<45>{Target}
                                              istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                              istb{Resist}[ar]{TF}
                                              endist
                                              end{istgame}

                                              end{document}


                                              Original answer (istgame v1.0)



                                              This is an example that uses the istgame package to draw the game tree and the makecell pacakage for the line break.



                                              documentclass{standalone}

                                              usepackage{istgame}
                                              usepackage{makecell}

                                              begin{document}

                                              begin{istgame}[scale=1.5,font=footnotesize]
                                              xtShowEndPoints[oval node]
                                              setistSolidNodeStyle{4pt}
                                              xtdistance{15mm}{20mm}
                                              istroot(0)
                                              istb{Not Threaten}[al]{U_S(SQ)}
                                              istb*{Threaten}[ar]
                                              endist
                                              istroot(1)(0-2)
                                              istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                              istb{Resist}[ar]{TF}
                                              endist
                                              xtOwner(0){textbf{Sender}}
                                              xtOwner(1){textbf{Target}}[ar]
                                              end{istgame}

                                              end{document}





                                              share|improve this answer















                                              Edit: istgame v2.0 (codes improved for tree parts)



                                              With the istgame v2.0, you can easily control the input modes and fonts for important labels using a new macro setistmathTF*.



                                              enter image description here



                                              documentclass{standalone}

                                              usepackage{istgame}
                                              usepackage{makecell}

                                              begin{document}

                                              begin{istgame}[scale=1.5,font=footnotesize]
                                              setistmathTF*001<textbf>
                                              xtShowEndPoints[oval node]
                                              setistSolidNodeStyle{4pt}
                                              xtdistance{15mm}{20mm}
                                              istroot(0){Sender}
                                              istb{Not Threaten}[al]{U_S(SQ)}
                                              istb*{Threaten}[ar]
                                              endist
                                              istroot(1)(0-2)<45>{Target}
                                              istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                              istb{Resist}[ar]{TF}
                                              endist
                                              end{istgame}

                                              end{document}


                                              Original answer (istgame v1.0)



                                              This is an example that uses the istgame package to draw the game tree and the makecell pacakage for the line break.



                                              documentclass{standalone}

                                              usepackage{istgame}
                                              usepackage{makecell}

                                              begin{document}

                                              begin{istgame}[scale=1.5,font=footnotesize]
                                              xtShowEndPoints[oval node]
                                              setistSolidNodeStyle{4pt}
                                              xtdistance{15mm}{20mm}
                                              istroot(0)
                                              istb{Not Threaten}[al]{U_S(SQ)}
                                              istb*{Threaten}[ar]
                                              endist
                                              istroot(1)(0-2)
                                              istb{Not Resist}[al]{mbox{makecell{$U_S(TS)=X$\$|U_T(TS)=Y$}}}
                                              istb{Resist}[ar]{TF}
                                              endist
                                              xtOwner(0){textbf{Sender}}
                                              xtOwner(1){textbf{Target}}[ar]
                                              end{istgame}

                                              end{document}






                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited 5 hours ago

























                                              answered Nov 20 '17 at 15:45









                                              InSung ChoInSung Cho

                                              86325




                                              86325






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f318953%2fline-break-with-equations-in-game-tree-labels-produced-with-tikz%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

                                                  Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

                                                  Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...