use tikz shapes.arrows as path











up vote
1
down vote

favorite












I am trying to reproduce this picture using tikz:enter image description here



My mwe is (Only the CPU box):



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{amsmath, tikz}
usetikzlibrary{positioning,arrows}
usetikzlibrary{decorations.pathmorphing}
usetikzlibrary{decorations.markings}
usetikzlibrary{shadows.blur, shapes.arrows}
synctex=1
% usepackage{listings}%, fancyvrb}
usepackage[T1]{fontenc}

begin{document}
tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
tikzstyle{block} = [rectangle, draw, fill=Apricot!70,
text width=10em, text centered, rounded corners, minimum height=0em]
tikzstyle{line} = [draw, -latex']
tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, rounded corners= 0ex, draw= none]at (-1.3,0) (cpu1)
{PC};
node[block, text width=3cm, rounded corners= 0ex, draw= none] at (0,
-2)(cpu2){BUS Interface};
node[block, text width=1cm, rounded corners= 0ex, draw = none, text
height=1.5cm]at (.3,0) (cpu3) {Register file};
node[block, text width=1cm, rounded corners= 0ex, draw= none,
text height=2cm] at (3, 0) (cpu3){ALU};

node[double arrow, fill=Black, rotate=90] at
(0,-2){phantom{aa}};
node[single arrow, fill=Black] at
(1.5,-.2){phantom{aa}};
node[single arrow, fill=Black, rotate=180] at
(1.5,.72){phantom{aaa}};
end{tikzpicture}
end{frame}
end{document}


The problem is I am placing the arrows as node, and that is not working. The output of the mwe is:



here



How can I place the arrows in proper way? e.g. can I use the arrow as path?



Kindly help.










share|improve this question






















  • Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
    – marmot
    Dec 4 at 15:31















up vote
1
down vote

favorite












I am trying to reproduce this picture using tikz:enter image description here



My mwe is (Only the CPU box):



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{amsmath, tikz}
usetikzlibrary{positioning,arrows}
usetikzlibrary{decorations.pathmorphing}
usetikzlibrary{decorations.markings}
usetikzlibrary{shadows.blur, shapes.arrows}
synctex=1
% usepackage{listings}%, fancyvrb}
usepackage[T1]{fontenc}

begin{document}
tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
tikzstyle{block} = [rectangle, draw, fill=Apricot!70,
text width=10em, text centered, rounded corners, minimum height=0em]
tikzstyle{line} = [draw, -latex']
tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, rounded corners= 0ex, draw= none]at (-1.3,0) (cpu1)
{PC};
node[block, text width=3cm, rounded corners= 0ex, draw= none] at (0,
-2)(cpu2){BUS Interface};
node[block, text width=1cm, rounded corners= 0ex, draw = none, text
height=1.5cm]at (.3,0) (cpu3) {Register file};
node[block, text width=1cm, rounded corners= 0ex, draw= none,
text height=2cm] at (3, 0) (cpu3){ALU};

node[double arrow, fill=Black, rotate=90] at
(0,-2){phantom{aa}};
node[single arrow, fill=Black] at
(1.5,-.2){phantom{aa}};
node[single arrow, fill=Black, rotate=180] at
(1.5,.72){phantom{aaa}};
end{tikzpicture}
end{frame}
end{document}


The problem is I am placing the arrows as node, and that is not working. The output of the mwe is:



here



How can I place the arrows in proper way? e.g. can I use the arrow as path?



Kindly help.










share|improve this question






















  • Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
    – marmot
    Dec 4 at 15:31













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to reproduce this picture using tikz:enter image description here



My mwe is (Only the CPU box):



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{amsmath, tikz}
usetikzlibrary{positioning,arrows}
usetikzlibrary{decorations.pathmorphing}
usetikzlibrary{decorations.markings}
usetikzlibrary{shadows.blur, shapes.arrows}
synctex=1
% usepackage{listings}%, fancyvrb}
usepackage[T1]{fontenc}

begin{document}
tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
tikzstyle{block} = [rectangle, draw, fill=Apricot!70,
text width=10em, text centered, rounded corners, minimum height=0em]
tikzstyle{line} = [draw, -latex']
tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, rounded corners= 0ex, draw= none]at (-1.3,0) (cpu1)
{PC};
node[block, text width=3cm, rounded corners= 0ex, draw= none] at (0,
-2)(cpu2){BUS Interface};
node[block, text width=1cm, rounded corners= 0ex, draw = none, text
height=1.5cm]at (.3,0) (cpu3) {Register file};
node[block, text width=1cm, rounded corners= 0ex, draw= none,
text height=2cm] at (3, 0) (cpu3){ALU};

node[double arrow, fill=Black, rotate=90] at
(0,-2){phantom{aa}};
node[single arrow, fill=Black] at
(1.5,-.2){phantom{aa}};
node[single arrow, fill=Black, rotate=180] at
(1.5,.72){phantom{aaa}};
end{tikzpicture}
end{frame}
end{document}


The problem is I am placing the arrows as node, and that is not working. The output of the mwe is:



here



How can I place the arrows in proper way? e.g. can I use the arrow as path?



Kindly help.










share|improve this question













I am trying to reproduce this picture using tikz:enter image description here



My mwe is (Only the CPU box):



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{amsmath, tikz}
usetikzlibrary{positioning,arrows}
usetikzlibrary{decorations.pathmorphing}
usetikzlibrary{decorations.markings}
usetikzlibrary{shadows.blur, shapes.arrows}
synctex=1
% usepackage{listings}%, fancyvrb}
usepackage[T1]{fontenc}

begin{document}
tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
tikzstyle{block} = [rectangle, draw, fill=Apricot!70,
text width=10em, text centered, rounded corners, minimum height=0em]
tikzstyle{line} = [draw, -latex']
tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, rounded corners= 0ex, draw= none]at (-1.3,0) (cpu1)
{PC};
node[block, text width=3cm, rounded corners= 0ex, draw= none] at (0,
-2)(cpu2){BUS Interface};
node[block, text width=1cm, rounded corners= 0ex, draw = none, text
height=1.5cm]at (.3,0) (cpu3) {Register file};
node[block, text width=1cm, rounded corners= 0ex, draw= none,
text height=2cm] at (3, 0) (cpu3){ALU};

node[double arrow, fill=Black, rotate=90] at
(0,-2){phantom{aa}};
node[single arrow, fill=Black] at
(1.5,-.2){phantom{aa}};
node[single arrow, fill=Black, rotate=180] at
(1.5,.72){phantom{aaa}};
end{tikzpicture}
end{frame}
end{document}


The problem is I am placing the arrows as node, and that is not working. The output of the mwe is:



here



How can I place the arrows in proper way? e.g. can I use the arrow as path?



Kindly help.







tikz-arrows






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 4 at 11:13









BaRud

81821321




81821321












  • Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
    – marmot
    Dec 4 at 15:31


















  • Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
    – marmot
    Dec 4 at 15:31
















Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
– marmot
Dec 4 at 15:31




Are you aware of this answer? (If you have a second, you could also have a quick look at the partner answer. ;-)
– marmot
Dec 4 at 15:31










2 Answers
2






active

oldest

votes

















up vote
1
down vote













You can use arrows as paths.



MWE



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{tikz}
usetikzlibrary{positioning,arrows,arrows.meta}
begin{document}
tikzset{block/.style={rectangle, draw, fill=Apricot!70,
text width=10em, text centered, rounded corners=0pt, minimum height=0em}}
tikzset{arw/.style={>={Triangle[length=3mm,width=5mm]},line width=2mm,draw=gray}}
begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, draw= none]at (-1.3,0) (cpu1){PC};
node[block, text width=1cm, minimum height=2cm, draw = none, right=0.5cm of cpu1] (cpu3) {Register file};
node[block, text width=3cm, draw= none, below=0.7cm of cpu3] (cpu2){BUS Interface};
node[block, text width=1cm, minimum height=2cm, draw= none,right=1cm of cpu3] (cpu4){ALU};
draw[arw,<->] (cpu3.south|-cpu2.north) -- (cpu3);
draw[arw,->] (cpu3.340) -- (cpu4.200);
draw[arw,<-] (cpu3.20) -- (cpu4.160);
end{tikzpicture}
end{frame}
end{document}


enter image description here






share|improve this answer



















  • 1




    @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
    – nidhin
    Dec 4 at 17:54


















up vote
0
down vote













To use the nodes and their shape as if they were figures drawn on the path, you can use the relative placement of the nodes relative to each other. To do this, simply use the syntax of the positioning library you have already loaded.



Thus, instead of anchoring each node to a specific coordinate point, it is sufficient to use the key right = below = below left=, etc.



See page 229 of manual 3.0.1a.



I slightly cleaned up the code of the superfluous:
for example, you specify draw=none for each block call. Just delete the draw key in the style of the node. But I'm far from having written everything correctly, for example, the tikzstyle syntax is obsolete.



tikzstyle{block} = [rectangle, draw, fill=Apricot!70, 
text width=10em, text centered, rounded corners, minimum height=0em]


Etc.



This is only a first sketch that you need to rework to your liking. I changed some colors to make it easier for you to read this new code.



Sketch and code:



sketch



documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
usepackage{amsmath, tikz}
usetikzlibrary{positioning,arrows}
usetikzlibrary{decorations.pathmorphing}
usetikzlibrary{decorations.markings}
usetikzlibrary{shadows.blur, shapes.arrows}
synctex=1
% usepackage{listings}%, fancyvrb}
usepackage[T1]{fontenc}

begin{document}
tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
tikzstyle{block} = [rectangle, fill=Apricot!70, text centered]
tikzstyle{line} = [draw, -latex']
tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]

begin{frame}[fragile]
begin{tikzpicture}[scale=.85]
node[block, text width=1cm, ]at (-1.3,0) (cpu1)
{PC};
node[block, text width=1.2cm, text height=1.5cm,right=5mm of cpu1](cpu2) {Register file};
node[block, text width=1cm, ,text height=2cm,right=1.5 of cpu2] (cpu3){ALU};

node[double arrow, fill=Black, rotate=90,below = 6mm of cpu2] (double-arrow)
{phantom{aa}};
node[single arrow, fill=blue,above right=-20mm and 5mm of cpu2] (single-arrow){phantom{aa}};
node[single arrow, fill=red, rotate=180,above right=-5mm and 10mm of cpu2] {phantom{aaa}};

node[block, text width=3cm, below=1cm of cpu2,below left= 4mm and -3mm of double-arrow] (cpu4){BUS Interface};

end{tikzpicture}
end{frame}
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',
    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%2f463126%2fuse-tikz-shapes-arrows-as-path%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    You can use arrows as paths.



    MWE



    documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
    usepackage{tikz}
    usetikzlibrary{positioning,arrows,arrows.meta}
    begin{document}
    tikzset{block/.style={rectangle, draw, fill=Apricot!70,
    text width=10em, text centered, rounded corners=0pt, minimum height=0em}}
    tikzset{arw/.style={>={Triangle[length=3mm,width=5mm]},line width=2mm,draw=gray}}
    begin{frame}[fragile]
    begin{tikzpicture}[scale=.85]
    node[block, text width=1cm, draw= none]at (-1.3,0) (cpu1){PC};
    node[block, text width=1cm, minimum height=2cm, draw = none, right=0.5cm of cpu1] (cpu3) {Register file};
    node[block, text width=3cm, draw= none, below=0.7cm of cpu3] (cpu2){BUS Interface};
    node[block, text width=1cm, minimum height=2cm, draw= none,right=1cm of cpu3] (cpu4){ALU};
    draw[arw,<->] (cpu3.south|-cpu2.north) -- (cpu3);
    draw[arw,->] (cpu3.340) -- (cpu4.200);
    draw[arw,<-] (cpu3.20) -- (cpu4.160);
    end{tikzpicture}
    end{frame}
    end{document}


    enter image description here






    share|improve this answer



















    • 1




      @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
      – nidhin
      Dec 4 at 17:54















    up vote
    1
    down vote













    You can use arrows as paths.



    MWE



    documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
    usepackage{tikz}
    usetikzlibrary{positioning,arrows,arrows.meta}
    begin{document}
    tikzset{block/.style={rectangle, draw, fill=Apricot!70,
    text width=10em, text centered, rounded corners=0pt, minimum height=0em}}
    tikzset{arw/.style={>={Triangle[length=3mm,width=5mm]},line width=2mm,draw=gray}}
    begin{frame}[fragile]
    begin{tikzpicture}[scale=.85]
    node[block, text width=1cm, draw= none]at (-1.3,0) (cpu1){PC};
    node[block, text width=1cm, minimum height=2cm, draw = none, right=0.5cm of cpu1] (cpu3) {Register file};
    node[block, text width=3cm, draw= none, below=0.7cm of cpu3] (cpu2){BUS Interface};
    node[block, text width=1cm, minimum height=2cm, draw= none,right=1cm of cpu3] (cpu4){ALU};
    draw[arw,<->] (cpu3.south|-cpu2.north) -- (cpu3);
    draw[arw,->] (cpu3.340) -- (cpu4.200);
    draw[arw,<-] (cpu3.20) -- (cpu4.160);
    end{tikzpicture}
    end{frame}
    end{document}


    enter image description here






    share|improve this answer



















    • 1




      @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
      – nidhin
      Dec 4 at 17:54













    up vote
    1
    down vote










    up vote
    1
    down vote









    You can use arrows as paths.



    MWE



    documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
    usepackage{tikz}
    usetikzlibrary{positioning,arrows,arrows.meta}
    begin{document}
    tikzset{block/.style={rectangle, draw, fill=Apricot!70,
    text width=10em, text centered, rounded corners=0pt, minimum height=0em}}
    tikzset{arw/.style={>={Triangle[length=3mm,width=5mm]},line width=2mm,draw=gray}}
    begin{frame}[fragile]
    begin{tikzpicture}[scale=.85]
    node[block, text width=1cm, draw= none]at (-1.3,0) (cpu1){PC};
    node[block, text width=1cm, minimum height=2cm, draw = none, right=0.5cm of cpu1] (cpu3) {Register file};
    node[block, text width=3cm, draw= none, below=0.7cm of cpu3] (cpu2){BUS Interface};
    node[block, text width=1cm, minimum height=2cm, draw= none,right=1cm of cpu3] (cpu4){ALU};
    draw[arw,<->] (cpu3.south|-cpu2.north) -- (cpu3);
    draw[arw,->] (cpu3.340) -- (cpu4.200);
    draw[arw,<-] (cpu3.20) -- (cpu4.160);
    end{tikzpicture}
    end{frame}
    end{document}


    enter image description here






    share|improve this answer














    You can use arrows as paths.



    MWE



    documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
    usepackage{tikz}
    usetikzlibrary{positioning,arrows,arrows.meta}
    begin{document}
    tikzset{block/.style={rectangle, draw, fill=Apricot!70,
    text width=10em, text centered, rounded corners=0pt, minimum height=0em}}
    tikzset{arw/.style={>={Triangle[length=3mm,width=5mm]},line width=2mm,draw=gray}}
    begin{frame}[fragile]
    begin{tikzpicture}[scale=.85]
    node[block, text width=1cm, draw= none]at (-1.3,0) (cpu1){PC};
    node[block, text width=1cm, minimum height=2cm, draw = none, right=0.5cm of cpu1] (cpu3) {Register file};
    node[block, text width=3cm, draw= none, below=0.7cm of cpu3] (cpu2){BUS Interface};
    node[block, text width=1cm, minimum height=2cm, draw= none,right=1cm of cpu3] (cpu4){ALU};
    draw[arw,<->] (cpu3.south|-cpu2.north) -- (cpu3);
    draw[arw,->] (cpu3.340) -- (cpu4.200);
    draw[arw,<-] (cpu3.20) -- (cpu4.160);
    end{tikzpicture}
    end{frame}
    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 4 at 17:50

























    answered Dec 4 at 14:43









    nidhin

    2,889926




    2,889926








    • 1




      @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
      – nidhin
      Dec 4 at 17:54














    • 1




      @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
      – nidhin
      Dec 4 at 17:54








    1




    1




    @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
    – nidhin
    Dec 4 at 17:54




    @marmot I thought this is what OP was asking for. The question that you mentioned also makes sense. Thanks for the arrows.meta suggestion, with that it looks better. :)
    – nidhin
    Dec 4 at 17:54










    up vote
    0
    down vote













    To use the nodes and their shape as if they were figures drawn on the path, you can use the relative placement of the nodes relative to each other. To do this, simply use the syntax of the positioning library you have already loaded.



    Thus, instead of anchoring each node to a specific coordinate point, it is sufficient to use the key right = below = below left=, etc.



    See page 229 of manual 3.0.1a.



    I slightly cleaned up the code of the superfluous:
    for example, you specify draw=none for each block call. Just delete the draw key in the style of the node. But I'm far from having written everything correctly, for example, the tikzstyle syntax is obsolete.



    tikzstyle{block} = [rectangle, draw, fill=Apricot!70, 
    text width=10em, text centered, rounded corners, minimum height=0em]


    Etc.



    This is only a first sketch that you need to rework to your liking. I changed some colors to make it easier for you to read this new code.



    Sketch and code:



    sketch



    documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
    usepackage{amsmath, tikz}
    usetikzlibrary{positioning,arrows}
    usetikzlibrary{decorations.pathmorphing}
    usetikzlibrary{decorations.markings}
    usetikzlibrary{shadows.blur, shapes.arrows}
    synctex=1
    % usepackage{listings}%, fancyvrb}
    usepackage[T1]{fontenc}

    begin{document}
    tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
    text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
    tikzstyle{block} = [rectangle, fill=Apricot!70, text centered]
    tikzstyle{line} = [draw, -latex']
    tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em]

    begin{frame}[fragile]
    begin{tikzpicture}[scale=.85]
    node[block, text width=1cm, ]at (-1.3,0) (cpu1)
    {PC};
    node[block, text width=1.2cm, text height=1.5cm,right=5mm of cpu1](cpu2) {Register file};
    node[block, text width=1cm, ,text height=2cm,right=1.5 of cpu2] (cpu3){ALU};

    node[double arrow, fill=Black, rotate=90,below = 6mm of cpu2] (double-arrow)
    {phantom{aa}};
    node[single arrow, fill=blue,above right=-20mm and 5mm of cpu2] (single-arrow){phantom{aa}};
    node[single arrow, fill=red, rotate=180,above right=-5mm and 10mm of cpu2] {phantom{aaa}};

    node[block, text width=3cm, below=1cm of cpu2,below left= 4mm and -3mm of double-arrow] (cpu4){BUS Interface};

    end{tikzpicture}
    end{frame}
    end{document}





    share|improve this answer

























      up vote
      0
      down vote













      To use the nodes and their shape as if they were figures drawn on the path, you can use the relative placement of the nodes relative to each other. To do this, simply use the syntax of the positioning library you have already loaded.



      Thus, instead of anchoring each node to a specific coordinate point, it is sufficient to use the key right = below = below left=, etc.



      See page 229 of manual 3.0.1a.



      I slightly cleaned up the code of the superfluous:
      for example, you specify draw=none for each block call. Just delete the draw key in the style of the node. But I'm far from having written everything correctly, for example, the tikzstyle syntax is obsolete.



      tikzstyle{block} = [rectangle, draw, fill=Apricot!70, 
      text width=10em, text centered, rounded corners, minimum height=0em]


      Etc.



      This is only a first sketch that you need to rework to your liking. I changed some colors to make it easier for you to read this new code.



      Sketch and code:



      sketch



      documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
      usepackage{amsmath, tikz}
      usetikzlibrary{positioning,arrows}
      usetikzlibrary{decorations.pathmorphing}
      usetikzlibrary{decorations.markings}
      usetikzlibrary{shadows.blur, shapes.arrows}
      synctex=1
      % usepackage{listings}%, fancyvrb}
      usepackage[T1]{fontenc}

      begin{document}
      tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
      text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
      tikzstyle{block} = [rectangle, fill=Apricot!70, text centered]
      tikzstyle{line} = [draw, -latex']
      tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
      minimum height=2em]

      begin{frame}[fragile]
      begin{tikzpicture}[scale=.85]
      node[block, text width=1cm, ]at (-1.3,0) (cpu1)
      {PC};
      node[block, text width=1.2cm, text height=1.5cm,right=5mm of cpu1](cpu2) {Register file};
      node[block, text width=1cm, ,text height=2cm,right=1.5 of cpu2] (cpu3){ALU};

      node[double arrow, fill=Black, rotate=90,below = 6mm of cpu2] (double-arrow)
      {phantom{aa}};
      node[single arrow, fill=blue,above right=-20mm and 5mm of cpu2] (single-arrow){phantom{aa}};
      node[single arrow, fill=red, rotate=180,above right=-5mm and 10mm of cpu2] {phantom{aaa}};

      node[block, text width=3cm, below=1cm of cpu2,below left= 4mm and -3mm of double-arrow] (cpu4){BUS Interface};

      end{tikzpicture}
      end{frame}
      end{document}





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        To use the nodes and their shape as if they were figures drawn on the path, you can use the relative placement of the nodes relative to each other. To do this, simply use the syntax of the positioning library you have already loaded.



        Thus, instead of anchoring each node to a specific coordinate point, it is sufficient to use the key right = below = below left=, etc.



        See page 229 of manual 3.0.1a.



        I slightly cleaned up the code of the superfluous:
        for example, you specify draw=none for each block call. Just delete the draw key in the style of the node. But I'm far from having written everything correctly, for example, the tikzstyle syntax is obsolete.



        tikzstyle{block} = [rectangle, draw, fill=Apricot!70, 
        text width=10em, text centered, rounded corners, minimum height=0em]


        Etc.



        This is only a first sketch that you need to rework to your liking. I changed some colors to make it easier for you to read this new code.



        Sketch and code:



        sketch



        documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
        usepackage{amsmath, tikz}
        usetikzlibrary{positioning,arrows}
        usetikzlibrary{decorations.pathmorphing}
        usetikzlibrary{decorations.markings}
        usetikzlibrary{shadows.blur, shapes.arrows}
        synctex=1
        % usepackage{listings}%, fancyvrb}
        usepackage[T1]{fontenc}

        begin{document}
        tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
        text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
        tikzstyle{block} = [rectangle, fill=Apricot!70, text centered]
        tikzstyle{line} = [draw, -latex']
        tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
        minimum height=2em]

        begin{frame}[fragile]
        begin{tikzpicture}[scale=.85]
        node[block, text width=1cm, ]at (-1.3,0) (cpu1)
        {PC};
        node[block, text width=1.2cm, text height=1.5cm,right=5mm of cpu1](cpu2) {Register file};
        node[block, text width=1cm, ,text height=2cm,right=1.5 of cpu2] (cpu3){ALU};

        node[double arrow, fill=Black, rotate=90,below = 6mm of cpu2] (double-arrow)
        {phantom{aa}};
        node[single arrow, fill=blue,above right=-20mm and 5mm of cpu2] (single-arrow){phantom{aa}};
        node[single arrow, fill=red, rotate=180,above right=-5mm and 10mm of cpu2] {phantom{aaa}};

        node[block, text width=3cm, below=1cm of cpu2,below left= 4mm and -3mm of double-arrow] (cpu4){BUS Interface};

        end{tikzpicture}
        end{frame}
        end{document}





        share|improve this answer












        To use the nodes and their shape as if they were figures drawn on the path, you can use the relative placement of the nodes relative to each other. To do this, simply use the syntax of the positioning library you have already loaded.



        Thus, instead of anchoring each node to a specific coordinate point, it is sufficient to use the key right = below = below left=, etc.



        See page 229 of manual 3.0.1a.



        I slightly cleaned up the code of the superfluous:
        for example, you specify draw=none for each block call. Just delete the draw key in the style of the node. But I'm far from having written everything correctly, for example, the tikzstyle syntax is obsolete.



        tikzstyle{block} = [rectangle, draw, fill=Apricot!70, 
        text width=10em, text centered, rounded corners, minimum height=0em]


        Etc.



        This is only a first sketch that you need to rework to your liking. I changed some colors to make it easier for you to read this new code.



        Sketch and code:



        sketch



        documentclass[10pt,xcolor=dvipsnames,xcolor=table]{beamer}
        usepackage{amsmath, tikz}
        usetikzlibrary{positioning,arrows}
        usetikzlibrary{decorations.pathmorphing}
        usetikzlibrary{decorations.markings}
        usetikzlibrary{shadows.blur, shapes.arrows}
        synctex=1
        % usepackage{listings}%, fancyvrb}
        usepackage[T1]{fontenc}

        begin{document}
        tikzstyle{sblock} = [rectangle, draw, %fill=Apricot!70,
        text width=5em, text centered, rounded corners, minimum height=0em, node distance=3.5cm]
        tikzstyle{block} = [rectangle, fill=Apricot!70, text centered]
        tikzstyle{line} = [draw, -latex']
        tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
        minimum height=2em]

        begin{frame}[fragile]
        begin{tikzpicture}[scale=.85]
        node[block, text width=1cm, ]at (-1.3,0) (cpu1)
        {PC};
        node[block, text width=1.2cm, text height=1.5cm,right=5mm of cpu1](cpu2) {Register file};
        node[block, text width=1cm, ,text height=2cm,right=1.5 of cpu2] (cpu3){ALU};

        node[double arrow, fill=Black, rotate=90,below = 6mm of cpu2] (double-arrow)
        {phantom{aa}};
        node[single arrow, fill=blue,above right=-20mm and 5mm of cpu2] (single-arrow){phantom{aa}};
        node[single arrow, fill=red, rotate=180,above right=-5mm and 10mm of cpu2] {phantom{aaa}};

        node[block, text width=3cm, below=1cm of cpu2,below left= 4mm and -3mm of double-arrow] (cpu4){BUS Interface};

        end{tikzpicture}
        end{frame}
        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 4 at 14:20









        AndréC

        6,98211140




        6,98211140






























            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%2f463126%2fuse-tikz-shapes-arrows-as-path%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

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?