Multiple Scaleboxes Inside TikZ Graph












3














I created the following graph with vector symbol on edges:
enter image description here



I want to make the vectors larger without enlarging the text, so I devised a command:



newcommand{vecb}[1]{reflectbox{reflectbox{scalebox{2}[1.5]{ensuremath{vec{scalebox{0.5}[0.66]{ensuremath{#1}}}}}}}}


Which makes the arrow larger:



enter image description here



But if I use it in TikZ, it errors:




Use of XKV@resa doesn't match its definition.




Graph code:



begin{tikzpicture}
GraphInit[vstyle=Normal]
SetGraphUnit{1.5}
tikzset{VertexStyle/.append style={rectangle}}

Vertex[x=0,y=0]{John}
Vertex[x=4.5,y=0]{London}
Vertex[x=9,y=0]{England}
Edge[style={->,>=triangle 45},label=$vec{residence}$](John)(London)
Edge[style={->,>=triangle 45},label=$vec{capital}$](London)(England)
end{tikzpicture}


Why doesn't this work? How can this be fixed?










share|improve this question



























    3














    I created the following graph with vector symbol on edges:
    enter image description here



    I want to make the vectors larger without enlarging the text, so I devised a command:



    newcommand{vecb}[1]{reflectbox{reflectbox{scalebox{2}[1.5]{ensuremath{vec{scalebox{0.5}[0.66]{ensuremath{#1}}}}}}}}


    Which makes the arrow larger:



    enter image description here



    But if I use it in TikZ, it errors:




    Use of XKV@resa doesn't match its definition.




    Graph code:



    begin{tikzpicture}
    GraphInit[vstyle=Normal]
    SetGraphUnit{1.5}
    tikzset{VertexStyle/.append style={rectangle}}

    Vertex[x=0,y=0]{John}
    Vertex[x=4.5,y=0]{London}
    Vertex[x=9,y=0]{England}
    Edge[style={->,>=triangle 45},label=$vec{residence}$](John)(London)
    Edge[style={->,>=triangle 45},label=$vec{capital}$](London)(England)
    end{tikzpicture}


    Why doesn't this work? How can this be fixed?










    share|improve this question

























      3












      3








      3







      I created the following graph with vector symbol on edges:
      enter image description here



      I want to make the vectors larger without enlarging the text, so I devised a command:



      newcommand{vecb}[1]{reflectbox{reflectbox{scalebox{2}[1.5]{ensuremath{vec{scalebox{0.5}[0.66]{ensuremath{#1}}}}}}}}


      Which makes the arrow larger:



      enter image description here



      But if I use it in TikZ, it errors:




      Use of XKV@resa doesn't match its definition.




      Graph code:



      begin{tikzpicture}
      GraphInit[vstyle=Normal]
      SetGraphUnit{1.5}
      tikzset{VertexStyle/.append style={rectangle}}

      Vertex[x=0,y=0]{John}
      Vertex[x=4.5,y=0]{London}
      Vertex[x=9,y=0]{England}
      Edge[style={->,>=triangle 45},label=$vec{residence}$](John)(London)
      Edge[style={->,>=triangle 45},label=$vec{capital}$](London)(England)
      end{tikzpicture}


      Why doesn't this work? How can this be fixed?










      share|improve this question













      I created the following graph with vector symbol on edges:
      enter image description here



      I want to make the vectors larger without enlarging the text, so I devised a command:



      newcommand{vecb}[1]{reflectbox{reflectbox{scalebox{2}[1.5]{ensuremath{vec{scalebox{0.5}[0.66]{ensuremath{#1}}}}}}}}


      Which makes the arrow larger:



      enter image description here



      But if I use it in TikZ, it errors:




      Use of XKV@resa doesn't match its definition.




      Graph code:



      begin{tikzpicture}
      GraphInit[vstyle=Normal]
      SetGraphUnit{1.5}
      tikzset{VertexStyle/.append style={rectangle}}

      Vertex[x=0,y=0]{John}
      Vertex[x=4.5,y=0]{London}
      Vertex[x=9,y=0]{England}
      Edge[style={->,>=triangle 45},label=$vec{residence}$](John)(London)
      Edge[style={->,>=triangle 45},label=$vec{capital}$](London)(England)
      end{tikzpicture}


      Why doesn't this work? How can this be fixed?







      tikz-pgf tikz-arrows






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 10 at 20:40









      Amit

      1183




      1183






















          4 Answers
          4






          active

          oldest

          votes


















          3














          Using normal tikz with the positioning library, this can be simpler. I used a small trick to get the arrow using $overrightarrow{..}$. This arrows extends over the entire content, so I included only three letters inside the braces like this, $caoverrightarrow{pit}al$ such that the arrow becomes only three characters long.



          documentclass[tikz,border=5pt]{standalone}
          usetikzlibrary{positioning,arrows}
          begin{document}

          begin{tikzpicture}[blk/.style={draw, minimum height=2em}, >=triangle 45,thick]
          node(j) [blk]{John};
          node(l) [blk,right=10em of j]{London};
          node(e) [blk,right=10em of l]{England};

          draw [->] (j) -- node[fill=white]{$resoverrightarrow{ide}nce$} (l);
          draw [->] (l) -- node[fill=white]{$caoverrightarrow{pit}al$} (e);
          end{tikzpicture}

          end{document}



          enter image description here







          share|improve this answer































            4














            Welcome to TeX.SE! So you are using TikZ and are afraid that you cannot add an arrow on top of some node text? No, I don't think there is an issue. ;-)



            documentclass[tikz,border=3.14mm]{standalone}
            usepackage{tkz-graph}
            begin{document}
            begin{tikzpicture}[vec/.style={inner ysep=3pt,path picture={
            draw[-latex,line width=0.4pt] ([yshift=-1.5pt,xshift=3pt]path picture bounding box.north west)
            --([yshift=-1.5pt,xshift=-3pt]path picture bounding box.north east);}}]
            GraphInit[vstyle=Normal]
            SetGraphUnit{1.5}
            tikzset{VertexStyle/.append style={rectangle}}

            Vertex[x=0,y=0]{John}
            Vertex[x=4.5,y=0]{London}
            Vertex[x=9,y=0]{England}
            Edge[style={->,>=triangle 45},label=$residence$,labelstyle=vec](John)(London)
            Edge[style={->,>=triangle 45},label=$capital$,labelstyle=vec](London)(England)
            end{tikzpicture}
            end{document}


            enter image description here



            I personally would not use math font for residence/capital.






            share|improve this answer





















            • This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
              – Amit
              Dec 10 at 22:12



















            3














            pure tikz solution, vectors' arrows are drawn with tikz:



            documentclass[tikz, border=3.141592mm]{standalone}
            usetikzlibrary{arrows.meta, chains, positioning}

            begin{document}
            begin{tikzpicture}[
            node distance = 33mm,
            start chain = A going right,
            arr/.style = {very thick, -Triangle},
            lbl/.style = {rectangle, fill=white, name=lbl, inner ysep=3mm,
            path picture={
            draw[thick, -{Straight Barb[length=0.8mm,width=1.2mm]}]
            ([shift={(-.2,-.15)}]lbl.north) -- ([shift={(.2,-.15)}]lbl.north);}
            },
            box/.style = {rectangle, draw, on chain=A, join=by arr}
            ]
            node[box] {John};
            node[box] {London};
            node[box] {England};
            path (A-1) -- node[lbl] {textit{residence}} (A-2)
            (A-2) -- node[lbl] {textit{capital}} (A-3);
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer





























              2














              This might be another solution using tikz-cd. For an small arrow you can use (for example) the suggestion of @AboAmmar.



              enter image description here



              documentclass[a4paper,12pt]{article}

              usepackage{amsmath}
              usepackage{tikz-cd}
              begin{document}
              begin{tikzcd}
              boxed{text{John}} arrow[rr, "overrightarrow{mathit{residence}}" description] & & boxed{text{London}} arrow[rr, "overrightarrow{mathit{capital}}" description] & & boxed{text{England}}
              end{tikzcd}
              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%2f464204%2fmultiple-scaleboxes-inside-tikz-graph%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3














                Using normal tikz with the positioning library, this can be simpler. I used a small trick to get the arrow using $overrightarrow{..}$. This arrows extends over the entire content, so I included only three letters inside the braces like this, $caoverrightarrow{pit}al$ such that the arrow becomes only three characters long.



                documentclass[tikz,border=5pt]{standalone}
                usetikzlibrary{positioning,arrows}
                begin{document}

                begin{tikzpicture}[blk/.style={draw, minimum height=2em}, >=triangle 45,thick]
                node(j) [blk]{John};
                node(l) [blk,right=10em of j]{London};
                node(e) [blk,right=10em of l]{England};

                draw [->] (j) -- node[fill=white]{$resoverrightarrow{ide}nce$} (l);
                draw [->] (l) -- node[fill=white]{$caoverrightarrow{pit}al$} (e);
                end{tikzpicture}

                end{document}



                enter image description here







                share|improve this answer




























                  3














                  Using normal tikz with the positioning library, this can be simpler. I used a small trick to get the arrow using $overrightarrow{..}$. This arrows extends over the entire content, so I included only three letters inside the braces like this, $caoverrightarrow{pit}al$ such that the arrow becomes only three characters long.



                  documentclass[tikz,border=5pt]{standalone}
                  usetikzlibrary{positioning,arrows}
                  begin{document}

                  begin{tikzpicture}[blk/.style={draw, minimum height=2em}, >=triangle 45,thick]
                  node(j) [blk]{John};
                  node(l) [blk,right=10em of j]{London};
                  node(e) [blk,right=10em of l]{England};

                  draw [->] (j) -- node[fill=white]{$resoverrightarrow{ide}nce$} (l);
                  draw [->] (l) -- node[fill=white]{$caoverrightarrow{pit}al$} (e);
                  end{tikzpicture}

                  end{document}



                  enter image description here







                  share|improve this answer


























                    3












                    3








                    3






                    Using normal tikz with the positioning library, this can be simpler. I used a small trick to get the arrow using $overrightarrow{..}$. This arrows extends over the entire content, so I included only three letters inside the braces like this, $caoverrightarrow{pit}al$ such that the arrow becomes only three characters long.



                    documentclass[tikz,border=5pt]{standalone}
                    usetikzlibrary{positioning,arrows}
                    begin{document}

                    begin{tikzpicture}[blk/.style={draw, minimum height=2em}, >=triangle 45,thick]
                    node(j) [blk]{John};
                    node(l) [blk,right=10em of j]{London};
                    node(e) [blk,right=10em of l]{England};

                    draw [->] (j) -- node[fill=white]{$resoverrightarrow{ide}nce$} (l);
                    draw [->] (l) -- node[fill=white]{$caoverrightarrow{pit}al$} (e);
                    end{tikzpicture}

                    end{document}



                    enter image description here







                    share|improve this answer














                    Using normal tikz with the positioning library, this can be simpler. I used a small trick to get the arrow using $overrightarrow{..}$. This arrows extends over the entire content, so I included only three letters inside the braces like this, $caoverrightarrow{pit}al$ such that the arrow becomes only three characters long.



                    documentclass[tikz,border=5pt]{standalone}
                    usetikzlibrary{positioning,arrows}
                    begin{document}

                    begin{tikzpicture}[blk/.style={draw, minimum height=2em}, >=triangle 45,thick]
                    node(j) [blk]{John};
                    node(l) [blk,right=10em of j]{London};
                    node(e) [blk,right=10em of l]{England};

                    draw [->] (j) -- node[fill=white]{$resoverrightarrow{ide}nce$} (l);
                    draw [->] (l) -- node[fill=white]{$caoverrightarrow{pit}al$} (e);
                    end{tikzpicture}

                    end{document}



                    enter image description here








                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 10 at 23:45

























                    answered Dec 10 at 23:39









                    AboAmmar

                    33k22882




                    33k22882























                        4














                        Welcome to TeX.SE! So you are using TikZ and are afraid that you cannot add an arrow on top of some node text? No, I don't think there is an issue. ;-)



                        documentclass[tikz,border=3.14mm]{standalone}
                        usepackage{tkz-graph}
                        begin{document}
                        begin{tikzpicture}[vec/.style={inner ysep=3pt,path picture={
                        draw[-latex,line width=0.4pt] ([yshift=-1.5pt,xshift=3pt]path picture bounding box.north west)
                        --([yshift=-1.5pt,xshift=-3pt]path picture bounding box.north east);}}]
                        GraphInit[vstyle=Normal]
                        SetGraphUnit{1.5}
                        tikzset{VertexStyle/.append style={rectangle}}

                        Vertex[x=0,y=0]{John}
                        Vertex[x=4.5,y=0]{London}
                        Vertex[x=9,y=0]{England}
                        Edge[style={->,>=triangle 45},label=$residence$,labelstyle=vec](John)(London)
                        Edge[style={->,>=triangle 45},label=$capital$,labelstyle=vec](London)(England)
                        end{tikzpicture}
                        end{document}


                        enter image description here



                        I personally would not use math font for residence/capital.






                        share|improve this answer





















                        • This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                          – Amit
                          Dec 10 at 22:12
















                        4














                        Welcome to TeX.SE! So you are using TikZ and are afraid that you cannot add an arrow on top of some node text? No, I don't think there is an issue. ;-)



                        documentclass[tikz,border=3.14mm]{standalone}
                        usepackage{tkz-graph}
                        begin{document}
                        begin{tikzpicture}[vec/.style={inner ysep=3pt,path picture={
                        draw[-latex,line width=0.4pt] ([yshift=-1.5pt,xshift=3pt]path picture bounding box.north west)
                        --([yshift=-1.5pt,xshift=-3pt]path picture bounding box.north east);}}]
                        GraphInit[vstyle=Normal]
                        SetGraphUnit{1.5}
                        tikzset{VertexStyle/.append style={rectangle}}

                        Vertex[x=0,y=0]{John}
                        Vertex[x=4.5,y=0]{London}
                        Vertex[x=9,y=0]{England}
                        Edge[style={->,>=triangle 45},label=$residence$,labelstyle=vec](John)(London)
                        Edge[style={->,>=triangle 45},label=$capital$,labelstyle=vec](London)(England)
                        end{tikzpicture}
                        end{document}


                        enter image description here



                        I personally would not use math font for residence/capital.






                        share|improve this answer





















                        • This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                          – Amit
                          Dec 10 at 22:12














                        4












                        4








                        4






                        Welcome to TeX.SE! So you are using TikZ and are afraid that you cannot add an arrow on top of some node text? No, I don't think there is an issue. ;-)



                        documentclass[tikz,border=3.14mm]{standalone}
                        usepackage{tkz-graph}
                        begin{document}
                        begin{tikzpicture}[vec/.style={inner ysep=3pt,path picture={
                        draw[-latex,line width=0.4pt] ([yshift=-1.5pt,xshift=3pt]path picture bounding box.north west)
                        --([yshift=-1.5pt,xshift=-3pt]path picture bounding box.north east);}}]
                        GraphInit[vstyle=Normal]
                        SetGraphUnit{1.5}
                        tikzset{VertexStyle/.append style={rectangle}}

                        Vertex[x=0,y=0]{John}
                        Vertex[x=4.5,y=0]{London}
                        Vertex[x=9,y=0]{England}
                        Edge[style={->,>=triangle 45},label=$residence$,labelstyle=vec](John)(London)
                        Edge[style={->,>=triangle 45},label=$capital$,labelstyle=vec](London)(England)
                        end{tikzpicture}
                        end{document}


                        enter image description here



                        I personally would not use math font for residence/capital.






                        share|improve this answer












                        Welcome to TeX.SE! So you are using TikZ and are afraid that you cannot add an arrow on top of some node text? No, I don't think there is an issue. ;-)



                        documentclass[tikz,border=3.14mm]{standalone}
                        usepackage{tkz-graph}
                        begin{document}
                        begin{tikzpicture}[vec/.style={inner ysep=3pt,path picture={
                        draw[-latex,line width=0.4pt] ([yshift=-1.5pt,xshift=3pt]path picture bounding box.north west)
                        --([yshift=-1.5pt,xshift=-3pt]path picture bounding box.north east);}}]
                        GraphInit[vstyle=Normal]
                        SetGraphUnit{1.5}
                        tikzset{VertexStyle/.append style={rectangle}}

                        Vertex[x=0,y=0]{John}
                        Vertex[x=4.5,y=0]{London}
                        Vertex[x=9,y=0]{England}
                        Edge[style={->,>=triangle 45},label=$residence$,labelstyle=vec](John)(London)
                        Edge[style={->,>=triangle 45},label=$capital$,labelstyle=vec](London)(England)
                        end{tikzpicture}
                        end{document}


                        enter image description here



                        I personally would not use math font for residence/capital.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Dec 10 at 22:09









                        marmot

                        87.1k4100187




                        87.1k4100187












                        • This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                          – Amit
                          Dec 10 at 22:12


















                        • This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                          – Amit
                          Dec 10 at 22:12
















                        This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                        – Amit
                        Dec 10 at 22:12




                        This is not the type I arrow I want, besides, it looks tiny in the way I show the figure. Using protect solves the issue of using the arrow I want, I just don't know why.
                        – Amit
                        Dec 10 at 22:12











                        3














                        pure tikz solution, vectors' arrows are drawn with tikz:



                        documentclass[tikz, border=3.141592mm]{standalone}
                        usetikzlibrary{arrows.meta, chains, positioning}

                        begin{document}
                        begin{tikzpicture}[
                        node distance = 33mm,
                        start chain = A going right,
                        arr/.style = {very thick, -Triangle},
                        lbl/.style = {rectangle, fill=white, name=lbl, inner ysep=3mm,
                        path picture={
                        draw[thick, -{Straight Barb[length=0.8mm,width=1.2mm]}]
                        ([shift={(-.2,-.15)}]lbl.north) -- ([shift={(.2,-.15)}]lbl.north);}
                        },
                        box/.style = {rectangle, draw, on chain=A, join=by arr}
                        ]
                        node[box] {John};
                        node[box] {London};
                        node[box] {England};
                        path (A-1) -- node[lbl] {textit{residence}} (A-2)
                        (A-2) -- node[lbl] {textit{capital}} (A-3);
                        end{tikzpicture}
                        end{document}


                        enter image description here






                        share|improve this answer


























                          3














                          pure tikz solution, vectors' arrows are drawn with tikz:



                          documentclass[tikz, border=3.141592mm]{standalone}
                          usetikzlibrary{arrows.meta, chains, positioning}

                          begin{document}
                          begin{tikzpicture}[
                          node distance = 33mm,
                          start chain = A going right,
                          arr/.style = {very thick, -Triangle},
                          lbl/.style = {rectangle, fill=white, name=lbl, inner ysep=3mm,
                          path picture={
                          draw[thick, -{Straight Barb[length=0.8mm,width=1.2mm]}]
                          ([shift={(-.2,-.15)}]lbl.north) -- ([shift={(.2,-.15)}]lbl.north);}
                          },
                          box/.style = {rectangle, draw, on chain=A, join=by arr}
                          ]
                          node[box] {John};
                          node[box] {London};
                          node[box] {England};
                          path (A-1) -- node[lbl] {textit{residence}} (A-2)
                          (A-2) -- node[lbl] {textit{capital}} (A-3);
                          end{tikzpicture}
                          end{document}


                          enter image description here






                          share|improve this answer
























                            3












                            3








                            3






                            pure tikz solution, vectors' arrows are drawn with tikz:



                            documentclass[tikz, border=3.141592mm]{standalone}
                            usetikzlibrary{arrows.meta, chains, positioning}

                            begin{document}
                            begin{tikzpicture}[
                            node distance = 33mm,
                            start chain = A going right,
                            arr/.style = {very thick, -Triangle},
                            lbl/.style = {rectangle, fill=white, name=lbl, inner ysep=3mm,
                            path picture={
                            draw[thick, -{Straight Barb[length=0.8mm,width=1.2mm]}]
                            ([shift={(-.2,-.15)}]lbl.north) -- ([shift={(.2,-.15)}]lbl.north);}
                            },
                            box/.style = {rectangle, draw, on chain=A, join=by arr}
                            ]
                            node[box] {John};
                            node[box] {London};
                            node[box] {England};
                            path (A-1) -- node[lbl] {textit{residence}} (A-2)
                            (A-2) -- node[lbl] {textit{capital}} (A-3);
                            end{tikzpicture}
                            end{document}


                            enter image description here






                            share|improve this answer












                            pure tikz solution, vectors' arrows are drawn with tikz:



                            documentclass[tikz, border=3.141592mm]{standalone}
                            usetikzlibrary{arrows.meta, chains, positioning}

                            begin{document}
                            begin{tikzpicture}[
                            node distance = 33mm,
                            start chain = A going right,
                            arr/.style = {very thick, -Triangle},
                            lbl/.style = {rectangle, fill=white, name=lbl, inner ysep=3mm,
                            path picture={
                            draw[thick, -{Straight Barb[length=0.8mm,width=1.2mm]}]
                            ([shift={(-.2,-.15)}]lbl.north) -- ([shift={(.2,-.15)}]lbl.north);}
                            },
                            box/.style = {rectangle, draw, on chain=A, join=by arr}
                            ]
                            node[box] {John};
                            node[box] {London};
                            node[box] {England};
                            path (A-1) -- node[lbl] {textit{residence}} (A-2)
                            (A-2) -- node[lbl] {textit{capital}} (A-3);
                            end{tikzpicture}
                            end{document}


                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 10 at 23:50









                            Zarko

                            121k865156




                            121k865156























                                2














                                This might be another solution using tikz-cd. For an small arrow you can use (for example) the suggestion of @AboAmmar.



                                enter image description here



                                documentclass[a4paper,12pt]{article}

                                usepackage{amsmath}
                                usepackage{tikz-cd}
                                begin{document}
                                begin{tikzcd}
                                boxed{text{John}} arrow[rr, "overrightarrow{mathit{residence}}" description] & & boxed{text{London}} arrow[rr, "overrightarrow{mathit{capital}}" description] & & boxed{text{England}}
                                end{tikzcd}
                                end{document}





                                share|improve this answer




























                                  2














                                  This might be another solution using tikz-cd. For an small arrow you can use (for example) the suggestion of @AboAmmar.



                                  enter image description here



                                  documentclass[a4paper,12pt]{article}

                                  usepackage{amsmath}
                                  usepackage{tikz-cd}
                                  begin{document}
                                  begin{tikzcd}
                                  boxed{text{John}} arrow[rr, "overrightarrow{mathit{residence}}" description] & & boxed{text{London}} arrow[rr, "overrightarrow{mathit{capital}}" description] & & boxed{text{England}}
                                  end{tikzcd}
                                  end{document}





                                  share|improve this answer


























                                    2












                                    2








                                    2






                                    This might be another solution using tikz-cd. For an small arrow you can use (for example) the suggestion of @AboAmmar.



                                    enter image description here



                                    documentclass[a4paper,12pt]{article}

                                    usepackage{amsmath}
                                    usepackage{tikz-cd}
                                    begin{document}
                                    begin{tikzcd}
                                    boxed{text{John}} arrow[rr, "overrightarrow{mathit{residence}}" description] & & boxed{text{London}} arrow[rr, "overrightarrow{mathit{capital}}" description] & & boxed{text{England}}
                                    end{tikzcd}
                                    end{document}





                                    share|improve this answer














                                    This might be another solution using tikz-cd. For an small arrow you can use (for example) the suggestion of @AboAmmar.



                                    enter image description here



                                    documentclass[a4paper,12pt]{article}

                                    usepackage{amsmath}
                                    usepackage{tikz-cd}
                                    begin{document}
                                    begin{tikzcd}
                                    boxed{text{John}} arrow[rr, "overrightarrow{mathit{residence}}" description] & & boxed{text{London}} arrow[rr, "overrightarrow{mathit{capital}}" description] & & boxed{text{England}}
                                    end{tikzcd}
                                    end{document}






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Dec 11 at 16:03

























                                    answered Dec 11 at 8:01









                                    Sebastiano

                                    8,88041756




                                    8,88041756






























                                        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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2f464204%2fmultiple-scaleboxes-inside-tikz-graph%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

                                        Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                                        ComboBox Display Member on multiple fields

                                        Is it possible to collect Nectar points via Trainline?