How to create a rectangle tikzstyle with arrows as edges/borders?











up vote
4
down vote

favorite
1












is it possible to create a new rectangle tikzstyle with arrows arround it? Like this...



enter image description here



Thank you










share|improve this question







New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – Stefan Pinnow
    16 hours ago















up vote
4
down vote

favorite
1












is it possible to create a new rectangle tikzstyle with arrows arround it? Like this...



enter image description here



Thank you










share|improve this question







New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – Stefan Pinnow
    16 hours ago













up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





is it possible to create a new rectangle tikzstyle with arrows arround it? Like this...



enter image description here



Thank you










share|improve this question







New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











is it possible to create a new rectangle tikzstyle with arrows arround it? Like this...



enter image description here



Thank you







tikz-styles






share|improve this question







New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 17 hours ago









Pereira

232




232




New contributor




Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Pereira is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – Stefan Pinnow
    16 hours ago


















  • Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – Stefan Pinnow
    16 hours ago
















Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
– Stefan Pinnow
16 hours ago




Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
– Stefan Pinnow
16 hours ago










3 Answers
3






active

oldest

votes

















up vote
5
down vote



accepted










with append after command you can define "new" box shape with arrow:



    documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{arrows.meta}

begin{document}
begin{tikzpicture}[
arrowsbox/.style = {text width=#1, align=center, inner sep=2mm,
append after command={pgfextra{letLNtikzlastnode
draw[thick, -Triangle, shorten >=2mm, shorten <=1mm]
(LN.north west) edge (LN.north east)
(LN.north east) edge (LN.south east)
(LN.south east) edge (LN.south west)
(LN.south west) to (LN.north west);}
}
}% end of arrowsbox style
]
node[arrowsbox=44mm] {some text\some text\[1ex] some test\some text};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer























  • On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
    – marmot
    17 hours ago










  • Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
    – Zarko
    13 hours ago












  • Isn't this here an example of this sort?
    – marmot
    8 hours ago










  • @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
    – Zarko
    8 hours ago










  • It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
    – marmot
    8 hours ago




















up vote
4
down vote













One way is to use arrows to draw around a rectangular node.



enter image description here



documentclass[border=3mm]{standalone}
usepackage{tikz}
usetikzlibrary{arrows}
tikzset{arw/.style={-triangle 60,line width=1pt,shorten <= 4pt}}
begin{document}
begin{tikzpicture}
node[text width=3cm,align=center,name=rect] at (0,0) {textbf{For each design} \ this.. \ $alpha=beta$};
draw[arw] (rect.south west) -- (rect.north west);
draw[arw] (rect.north west) -- (rect.north east);
draw[arw] (rect.north east) -- (rect.south east);
draw[arw] (rect.south east) -- (rect.south west);
end{tikzpicture}
end{document}





share|improve this answer

















  • 2




    Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
    – CarLaTeX
    17 hours ago


















up vote
3
down vote













A node style arrowed which uses path picture to draw the arrows.



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[arrowed/.style={inner sep=6pt,path picture={
draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
-- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
draw[-latex,#1] ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east)
-- ([xshift=-2pt,yshift=2pt]path picture bounding box.south east);
draw[-latex,#1] ([xshift=-2pt,yshift=2pt]path picture bounding box.south east)
-- ([xshift=2pt,yshift=2pt]path picture bounding box.south west);
draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
-- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
draw[-latex,#1] ([xshift=2pt,yshift=2pt]path picture bounding box.south west)
-- ([xshift=2pt,yshift=-2pt]path picture bounding box.north west);
}}]
node[arrowed] at (0,0) {some text};
node[arrowed={thick,-stealth}] at (3,0) {some more text};
node[arrowed={thick,stealth-,shorten >=1pt}] at (6,0) {even more text};
node[anchor=north,arrowed={thick,-stealth,shorten >=1pt},inner sep=10pt,
align=center] at (3,-1)
{textbf{emph{For each design choice:}}\[2mm]
1 -- do something\ really cool and\ smart\[1mm]
2 -- make sure that\ hibernation time\ is over
};
end{tikzpicture}
end{document}


enter image description here



Just for fun: a version of Zarko's answer but without pgfextra. Why do I care about pgfextra? Because on p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." It is really easy to get rid of the pgfextra. It is certainly not needed for append after command.



documentclass[tikz,border=3.14mm]{standalone}
begin{document}
begin{tikzpicture}[my arrow/.style={thick, -latex, shorten >=2mm,
shorten <=1mm},
arrowsbox/.style = { align=center, inner sep=2mm,
append after command={[every edge/.append style={my arrow,#1}]
(tikzlastnode.north west) edge (tikzlastnode.north east)
(tikzlastnode.north east) edge (tikzlastnode.south east)
(tikzlastnode.south east) edge (tikzlastnode.south west)
(tikzlastnode.south west) edge (tikzlastnode.north west)
}
}
]
node[arrowsbox={red},inner sep=10pt,blue] {textbf{emph{For each design choice:}}\[2mm]
1 -- do something\ really cool and\ smart\[1mm]
2 -- make sure that\ hibernation time\ is over};
end{tikzpicture}
end{document}


enter image description here






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',
    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
    });


    }
    });






    Pereira is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f463935%2fhow-to-create-a-rectangle-tikzstyle-with-arrows-as-edges-borders%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote



    accepted










    with append after command you can define "new" box shape with arrow:



        documentclass[tikz, margin=3mm]{standalone}
    usetikzlibrary{arrows.meta}

    begin{document}
    begin{tikzpicture}[
    arrowsbox/.style = {text width=#1, align=center, inner sep=2mm,
    append after command={pgfextra{letLNtikzlastnode
    draw[thick, -Triangle, shorten >=2mm, shorten <=1mm]
    (LN.north west) edge (LN.north east)
    (LN.north east) edge (LN.south east)
    (LN.south east) edge (LN.south west)
    (LN.south west) to (LN.north west);}
    }
    }% end of arrowsbox style
    ]
    node[arrowsbox=44mm] {some text\some text\[1ex] some test\some text};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer























    • On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
      – marmot
      17 hours ago










    • Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
      – Zarko
      13 hours ago












    • Isn't this here an example of this sort?
      – marmot
      8 hours ago










    • @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
      – Zarko
      8 hours ago










    • It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
      – marmot
      8 hours ago

















    up vote
    5
    down vote



    accepted










    with append after command you can define "new" box shape with arrow:



        documentclass[tikz, margin=3mm]{standalone}
    usetikzlibrary{arrows.meta}

    begin{document}
    begin{tikzpicture}[
    arrowsbox/.style = {text width=#1, align=center, inner sep=2mm,
    append after command={pgfextra{letLNtikzlastnode
    draw[thick, -Triangle, shorten >=2mm, shorten <=1mm]
    (LN.north west) edge (LN.north east)
    (LN.north east) edge (LN.south east)
    (LN.south east) edge (LN.south west)
    (LN.south west) to (LN.north west);}
    }
    }% end of arrowsbox style
    ]
    node[arrowsbox=44mm] {some text\some text\[1ex] some test\some text};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer























    • On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
      – marmot
      17 hours ago










    • Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
      – Zarko
      13 hours ago












    • Isn't this here an example of this sort?
      – marmot
      8 hours ago










    • @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
      – Zarko
      8 hours ago










    • It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
      – marmot
      8 hours ago















    up vote
    5
    down vote



    accepted







    up vote
    5
    down vote



    accepted






    with append after command you can define "new" box shape with arrow:



        documentclass[tikz, margin=3mm]{standalone}
    usetikzlibrary{arrows.meta}

    begin{document}
    begin{tikzpicture}[
    arrowsbox/.style = {text width=#1, align=center, inner sep=2mm,
    append after command={pgfextra{letLNtikzlastnode
    draw[thick, -Triangle, shorten >=2mm, shorten <=1mm]
    (LN.north west) edge (LN.north east)
    (LN.north east) edge (LN.south east)
    (LN.south east) edge (LN.south west)
    (LN.south west) to (LN.north west);}
    }
    }% end of arrowsbox style
    ]
    node[arrowsbox=44mm] {some text\some text\[1ex] some test\some text};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer














    with append after command you can define "new" box shape with arrow:



        documentclass[tikz, margin=3mm]{standalone}
    usetikzlibrary{arrows.meta}

    begin{document}
    begin{tikzpicture}[
    arrowsbox/.style = {text width=#1, align=center, inner sep=2mm,
    append after command={pgfextra{letLNtikzlastnode
    draw[thick, -Triangle, shorten >=2mm, shorten <=1mm]
    (LN.north west) edge (LN.north east)
    (LN.north east) edge (LN.south east)
    (LN.south east) edge (LN.south west)
    (LN.south west) to (LN.north west);}
    }
    }% end of arrowsbox style
    ]
    node[arrowsbox=44mm] {some text\some text\[1ex] some test\some text};
    end{tikzpicture}
    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 11 hours ago

























    answered 17 hours ago









    Zarko

    118k865155




    118k865155












    • On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
      – marmot
      17 hours ago










    • Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
      – Zarko
      13 hours ago












    • Isn't this here an example of this sort?
      – marmot
      8 hours ago










    • @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
      – Zarko
      8 hours ago










    • It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
      – marmot
      8 hours ago




















    • On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
      – marmot
      17 hours ago










    • Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
      – Zarko
      13 hours ago












    • Isn't this here an example of this sort?
      – marmot
      8 hours ago










    • @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
      – Zarko
      8 hours ago










    • It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
      – marmot
      8 hours ago


















    On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
    – marmot
    17 hours ago




    On p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." Indeed, I have seen it gone wrong. So please try to write a solution that does not make use of it.
    – marmot
    17 hours ago












    Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
    – Zarko
    13 hours ago






    Dear @marmot, thank you very much for warning. So far i haven't any bad experiences with similar solutions. So i will be very glad if you show me (maybe in chat room), when in where i will be in trouble with my solution. this is good to know. btw, i know for warning in manual which you cite :-)
    – Zarko
    13 hours ago














    Isn't this here an example of this sort?
    – marmot
    8 hours ago




    Isn't this here an example of this sort?
    – marmot
    8 hours ago












    @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
    – Zarko
    8 hours ago




    @marmot, thank you very much. but in this particular case there is no rotating (around of center of node). hopefully ...
    – Zarko
    8 hours ago












    It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
    – marmot
    8 hours ago






    It really is not tied to rotations. Rather, it is a problem with pgfkeys. As you know, they are local and inherited by the full path. However, with your construction you precisely undermine the whole structure. To see what I mean, try e.g. node[arrowsbox=44mm,red] .... If that was an "ordinary" style, the arrows would turn red. With your style they don't. Yes, you can fix this by passing an argument to the arrows. However, this would make this style very different in behavior than any of the standard styles.
    – marmot
    8 hours ago












    up vote
    4
    down vote













    One way is to use arrows to draw around a rectangular node.



    enter image description here



    documentclass[border=3mm]{standalone}
    usepackage{tikz}
    usetikzlibrary{arrows}
    tikzset{arw/.style={-triangle 60,line width=1pt,shorten <= 4pt}}
    begin{document}
    begin{tikzpicture}
    node[text width=3cm,align=center,name=rect] at (0,0) {textbf{For each design} \ this.. \ $alpha=beta$};
    draw[arw] (rect.south west) -- (rect.north west);
    draw[arw] (rect.north west) -- (rect.north east);
    draw[arw] (rect.north east) -- (rect.south east);
    draw[arw] (rect.south east) -- (rect.south west);
    end{tikzpicture}
    end{document}





    share|improve this answer

















    • 2




      Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
      – CarLaTeX
      17 hours ago















    up vote
    4
    down vote













    One way is to use arrows to draw around a rectangular node.



    enter image description here



    documentclass[border=3mm]{standalone}
    usepackage{tikz}
    usetikzlibrary{arrows}
    tikzset{arw/.style={-triangle 60,line width=1pt,shorten <= 4pt}}
    begin{document}
    begin{tikzpicture}
    node[text width=3cm,align=center,name=rect] at (0,0) {textbf{For each design} \ this.. \ $alpha=beta$};
    draw[arw] (rect.south west) -- (rect.north west);
    draw[arw] (rect.north west) -- (rect.north east);
    draw[arw] (rect.north east) -- (rect.south east);
    draw[arw] (rect.south east) -- (rect.south west);
    end{tikzpicture}
    end{document}





    share|improve this answer

















    • 2




      Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
      – CarLaTeX
      17 hours ago













    up vote
    4
    down vote










    up vote
    4
    down vote









    One way is to use arrows to draw around a rectangular node.



    enter image description here



    documentclass[border=3mm]{standalone}
    usepackage{tikz}
    usetikzlibrary{arrows}
    tikzset{arw/.style={-triangle 60,line width=1pt,shorten <= 4pt}}
    begin{document}
    begin{tikzpicture}
    node[text width=3cm,align=center,name=rect] at (0,0) {textbf{For each design} \ this.. \ $alpha=beta$};
    draw[arw] (rect.south west) -- (rect.north west);
    draw[arw] (rect.north west) -- (rect.north east);
    draw[arw] (rect.north east) -- (rect.south east);
    draw[arw] (rect.south east) -- (rect.south west);
    end{tikzpicture}
    end{document}





    share|improve this answer












    One way is to use arrows to draw around a rectangular node.



    enter image description here



    documentclass[border=3mm]{standalone}
    usepackage{tikz}
    usetikzlibrary{arrows}
    tikzset{arw/.style={-triangle 60,line width=1pt,shorten <= 4pt}}
    begin{document}
    begin{tikzpicture}
    node[text width=3cm,align=center,name=rect] at (0,0) {textbf{For each design} \ this.. \ $alpha=beta$};
    draw[arw] (rect.south west) -- (rect.north west);
    draw[arw] (rect.north west) -- (rect.north east);
    draw[arw] (rect.north east) -- (rect.south east);
    draw[arw] (rect.south east) -- (rect.south west);
    end{tikzpicture}
    end{document}






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 17 hours ago









    nidhin

    2,669926




    2,669926








    • 2




      Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
      – CarLaTeX
      17 hours ago














    • 2




      Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
      – CarLaTeX
      17 hours ago








    2




    2




    Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
    – CarLaTeX
    17 hours ago




    Your answer is OK, but I would create a pic with your arrowed rectangle, in order not to have to re-write all the draws every time.
    – CarLaTeX
    17 hours ago










    up vote
    3
    down vote













    A node style arrowed which uses path picture to draw the arrows.



    documentclass[tikz,border=3.14mm]{standalone}
    begin{document}
    begin{tikzpicture}[arrowed/.style={inner sep=6pt,path picture={
    draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
    -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
    draw[-latex,#1] ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east)
    -- ([xshift=-2pt,yshift=2pt]path picture bounding box.south east);
    draw[-latex,#1] ([xshift=-2pt,yshift=2pt]path picture bounding box.south east)
    -- ([xshift=2pt,yshift=2pt]path picture bounding box.south west);
    draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
    -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
    draw[-latex,#1] ([xshift=2pt,yshift=2pt]path picture bounding box.south west)
    -- ([xshift=2pt,yshift=-2pt]path picture bounding box.north west);
    }}]
    node[arrowed] at (0,0) {some text};
    node[arrowed={thick,-stealth}] at (3,0) {some more text};
    node[arrowed={thick,stealth-,shorten >=1pt}] at (6,0) {even more text};
    node[anchor=north,arrowed={thick,-stealth,shorten >=1pt},inner sep=10pt,
    align=center] at (3,-1)
    {textbf{emph{For each design choice:}}\[2mm]
    1 -- do something\ really cool and\ smart\[1mm]
    2 -- make sure that\ hibernation time\ is over
    };
    end{tikzpicture}
    end{document}


    enter image description here



    Just for fun: a version of Zarko's answer but without pgfextra. Why do I care about pgfextra? Because on p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." It is really easy to get rid of the pgfextra. It is certainly not needed for append after command.



    documentclass[tikz,border=3.14mm]{standalone}
    begin{document}
    begin{tikzpicture}[my arrow/.style={thick, -latex, shorten >=2mm,
    shorten <=1mm},
    arrowsbox/.style = { align=center, inner sep=2mm,
    append after command={[every edge/.append style={my arrow,#1}]
    (tikzlastnode.north west) edge (tikzlastnode.north east)
    (tikzlastnode.north east) edge (tikzlastnode.south east)
    (tikzlastnode.south east) edge (tikzlastnode.south west)
    (tikzlastnode.south west) edge (tikzlastnode.north west)
    }
    }
    ]
    node[arrowsbox={red},inner sep=10pt,blue] {textbf{emph{For each design choice:}}\[2mm]
    1 -- do something\ really cool and\ smart\[1mm]
    2 -- make sure that\ hibernation time\ is over};
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer



























      up vote
      3
      down vote













      A node style arrowed which uses path picture to draw the arrows.



      documentclass[tikz,border=3.14mm]{standalone}
      begin{document}
      begin{tikzpicture}[arrowed/.style={inner sep=6pt,path picture={
      draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
      -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
      draw[-latex,#1] ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east)
      -- ([xshift=-2pt,yshift=2pt]path picture bounding box.south east);
      draw[-latex,#1] ([xshift=-2pt,yshift=2pt]path picture bounding box.south east)
      -- ([xshift=2pt,yshift=2pt]path picture bounding box.south west);
      draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
      -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
      draw[-latex,#1] ([xshift=2pt,yshift=2pt]path picture bounding box.south west)
      -- ([xshift=2pt,yshift=-2pt]path picture bounding box.north west);
      }}]
      node[arrowed] at (0,0) {some text};
      node[arrowed={thick,-stealth}] at (3,0) {some more text};
      node[arrowed={thick,stealth-,shorten >=1pt}] at (6,0) {even more text};
      node[anchor=north,arrowed={thick,-stealth,shorten >=1pt},inner sep=10pt,
      align=center] at (3,-1)
      {textbf{emph{For each design choice:}}\[2mm]
      1 -- do something\ really cool and\ smart\[1mm]
      2 -- make sure that\ hibernation time\ is over
      };
      end{tikzpicture}
      end{document}


      enter image description here



      Just for fun: a version of Zarko's answer but without pgfextra. Why do I care about pgfextra? Because on p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." It is really easy to get rid of the pgfextra. It is certainly not needed for append after command.



      documentclass[tikz,border=3.14mm]{standalone}
      begin{document}
      begin{tikzpicture}[my arrow/.style={thick, -latex, shorten >=2mm,
      shorten <=1mm},
      arrowsbox/.style = { align=center, inner sep=2mm,
      append after command={[every edge/.append style={my arrow,#1}]
      (tikzlastnode.north west) edge (tikzlastnode.north east)
      (tikzlastnode.north east) edge (tikzlastnode.south east)
      (tikzlastnode.south east) edge (tikzlastnode.south west)
      (tikzlastnode.south west) edge (tikzlastnode.north west)
      }
      }
      ]
      node[arrowsbox={red},inner sep=10pt,blue] {textbf{emph{For each design choice:}}\[2mm]
      1 -- do something\ really cool and\ smart\[1mm]
      2 -- make sure that\ hibernation time\ is over};
      end{tikzpicture}
      end{document}


      enter image description here






      share|improve this answer

























        up vote
        3
        down vote










        up vote
        3
        down vote









        A node style arrowed which uses path picture to draw the arrows.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[arrowed/.style={inner sep=6pt,path picture={
        draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
        -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
        draw[-latex,#1] ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east)
        -- ([xshift=-2pt,yshift=2pt]path picture bounding box.south east);
        draw[-latex,#1] ([xshift=-2pt,yshift=2pt]path picture bounding box.south east)
        -- ([xshift=2pt,yshift=2pt]path picture bounding box.south west);
        draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
        -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
        draw[-latex,#1] ([xshift=2pt,yshift=2pt]path picture bounding box.south west)
        -- ([xshift=2pt,yshift=-2pt]path picture bounding box.north west);
        }}]
        node[arrowed] at (0,0) {some text};
        node[arrowed={thick,-stealth}] at (3,0) {some more text};
        node[arrowed={thick,stealth-,shorten >=1pt}] at (6,0) {even more text};
        node[anchor=north,arrowed={thick,-stealth,shorten >=1pt},inner sep=10pt,
        align=center] at (3,-1)
        {textbf{emph{For each design choice:}}\[2mm]
        1 -- do something\ really cool and\ smart\[1mm]
        2 -- make sure that\ hibernation time\ is over
        };
        end{tikzpicture}
        end{document}


        enter image description here



        Just for fun: a version of Zarko's answer but without pgfextra. Why do I care about pgfextra? Because on p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." It is really easy to get rid of the pgfextra. It is certainly not needed for append after command.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[my arrow/.style={thick, -latex, shorten >=2mm,
        shorten <=1mm},
        arrowsbox/.style = { align=center, inner sep=2mm,
        append after command={[every edge/.append style={my arrow,#1}]
        (tikzlastnode.north west) edge (tikzlastnode.north east)
        (tikzlastnode.north east) edge (tikzlastnode.south east)
        (tikzlastnode.south east) edge (tikzlastnode.south west)
        (tikzlastnode.south west) edge (tikzlastnode.north west)
        }
        }
        ]
        node[arrowsbox={red},inner sep=10pt,blue] {textbf{emph{For each design choice:}}\[2mm]
        1 -- do something\ really cool and\ smart\[1mm]
        2 -- make sure that\ hibernation time\ is over};
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer














        A node style arrowed which uses path picture to draw the arrows.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[arrowed/.style={inner sep=6pt,path picture={
        draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
        -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
        draw[-latex,#1] ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east)
        -- ([xshift=-2pt,yshift=2pt]path picture bounding box.south east);
        draw[-latex,#1] ([xshift=-2pt,yshift=2pt]path picture bounding box.south east)
        -- ([xshift=2pt,yshift=2pt]path picture bounding box.south west);
        draw[-latex,#1] ([xshift=2pt,yshift=-2pt]path picture bounding box.north west)
        -- ([xshift=-2pt,yshift=-2pt]path picture bounding box.north east);
        draw[-latex,#1] ([xshift=2pt,yshift=2pt]path picture bounding box.south west)
        -- ([xshift=2pt,yshift=-2pt]path picture bounding box.north west);
        }}]
        node[arrowed] at (0,0) {some text};
        node[arrowed={thick,-stealth}] at (3,0) {some more text};
        node[arrowed={thick,stealth-,shorten >=1pt}] at (6,0) {even more text};
        node[anchor=north,arrowed={thick,-stealth,shorten >=1pt},inner sep=10pt,
        align=center] at (3,-1)
        {textbf{emph{For each design choice:}}\[2mm]
        1 -- do something\ really cool and\ smart\[1mm]
        2 -- make sure that\ hibernation time\ is over
        };
        end{tikzpicture}
        end{document}


        enter image description here



        Just for fun: a version of Zarko's answer but without pgfextra. Why do I care about pgfextra? Because on p. 162 the pgfmanual says about pgfextra: "Note that this operation should only be used by real experts and should only be used deep inside clever macros, not on normal paths." It is really easy to get rid of the pgfextra. It is certainly not needed for append after command.



        documentclass[tikz,border=3.14mm]{standalone}
        begin{document}
        begin{tikzpicture}[my arrow/.style={thick, -latex, shorten >=2mm,
        shorten <=1mm},
        arrowsbox/.style = { align=center, inner sep=2mm,
        append after command={[every edge/.append style={my arrow,#1}]
        (tikzlastnode.north west) edge (tikzlastnode.north east)
        (tikzlastnode.north east) edge (tikzlastnode.south east)
        (tikzlastnode.south east) edge (tikzlastnode.south west)
        (tikzlastnode.south west) edge (tikzlastnode.north west)
        }
        }
        ]
        node[arrowsbox={red},inner sep=10pt,blue] {textbf{emph{For each design choice:}}\[2mm]
        1 -- do something\ really cool and\ smart\[1mm]
        2 -- make sure that\ hibernation time\ is over};
        end{tikzpicture}
        end{document}


        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 7 hours ago

























        answered 17 hours ago









        marmot

        81.8k491174




        81.8k491174






















            Pereira is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Pereira is a new contributor. Be nice, and check out our Code of Conduct.













            Pereira is a new contributor. Be nice, and check out our Code of Conduct.












            Pereira is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f463935%2fhow-to-create-a-rectangle-tikzstyle-with-arrows-as-edges-borders%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei