Pentagon of pentagonsCustom arrow shaft in tikzpgf macro that returns a nodeTikZ: How to connect nodes and...

Sundering Titan and basic normal lands and snow lands

I can't die. Who am I?

What is the oldest European royal house?

PTIJ: Aliyot for the deceased

The Key to the Door

Why aren't there more gauls like Obelix?

Is there a math equivalent to the conditional ternary operator?

What are Radio-location Services in the 1.9-2.0 MHz range?

DC input on op amp integrator

Giving a talk in my old university, how prominently should I tell students my salary?

Professor forcing me to attend a conference

Rationale to prefer local variables over instance variables?

The past tense for the quoting particle って

Is there a way to find out the age of climbing ropes?

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

What is the purpose of a disclaimer like "this is not legal advice"?

Faulty RAID1 disk now shows as foreign

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

Create chunks from an array

Python function to ask for a multiple-choice answer

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

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

What is brightness?

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



Pentagon of pentagons


Custom arrow shaft in tikzpgf macro that returns a nodeTikZ: How to connect nodes and specify line direction?Preserve node and font size when scalingDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingHow does tikz-3dplot parse keys?Using chemfig arrows between tikz nodeshow to draw 'inhibitory' arrow in latex tikz?How do I draw an array with markers (arrows) showing pointers, and braces telling something about part of the range?Fill area between wave-linesHow to add multiple differently colored borders around a node?













3















I want to create a macro in TikZ that allows me to draw a pentagon of pentagons where every node, arrow and triangle is labelled (the common/repeated parts will have the same labels). Here is nice example (in xypic) of what I'd like (just maybe upside down):
enter image description here
A friend of mine kindly helped me with the TikZ code for the pentagons:



documentclass[tikz]{standalone}
%
usepackage{tikz}
usetikzlibrary{calc}
tikzset{
between/.style args={#1 and #2}{
at = ($(#1)!0.5!(#2)$)
},
betweenl/.style args={#1 and #2}{
at = ($(#1)!0.35!(#2)$)
}
}
%
newcommand{drawPent}[2]{%
foreach r in {0,1,2,3,4}
node (r) at (162 + r * 72:#2) {footnotesize $r$};
draw[->] (0) -- node[left] {footnotesize $ab$} coordinate (ab) (1);
draw[->] (1) -- node[below] {footnotesize $bc$} coordinate (bc) (2);
draw[->] (2) -- node[right] {footnotesize $cd$} coordinate (cd) (3);
draw[->] (3) -- node[above] {footnotesize $de$} coordinate (de) (4);
draw[->] (0) -- node[above] {footnotesize $ae$} coordinate (ae) (4);
{ifcase #1
draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
draw[->] (0) -- node[fill=white] {footnotesize $ad$} coordinate (ad) (3);
node[between=1 and ac] {footnotesize $abc$};
node[betweenl=ad and 2] {footnotesize $acd$};
node[betweenl=ad and 4] {footnotesize $ade$};
or
draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
node[between=1 and ac] {footnotesize $abc$};
node[betweenl=ae and 2] {footnotesize $ace$};
node[between=ce and 3] {footnotesize $cde$};
or
draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (3);
draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
node[betweenl=ad and 1] {footnotesize $abd$};
node[between=bd and 2] {footnotesize $bcd$};
node[betweenl=ad and 4] {footnotesize $ade$};
or
draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
node[between=0 and be] {footnotesize $abe$};
node[betweenl=de and 1] {footnotesize $bde$};
node[between=bd and 2] {footnotesize $bcd$};
or
draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
node[between=0 and be] {footnotesize $abe$};
node[betweenl=bc and 4] {footnotesize $bce$};
node[between=ce and 3] {footnotesize $cde$};
elsefi}
}
%
begin{document}
% defa{a}defb{b}defc{c}defd{d}defe{e}
defab{f}defbc{g}defcd{h}defde{i}defae{l}
defac{m}defad{n}defbd{o}defbe{p}defce{q}
defabc{r}defacd{s}defade{t}
deface{u}defcde{v}
defabd{w}defbcd{x}
defabe{y}defbde{z}
defbce{A}
%
begin{tikzpicture}
drawPent 0{1.5}
end{tikzpicture}
end{document}


enter image description here



The command drawPent takes two parameters: the first is the 'kind' of pentagon (going from 0 to 4) and the second is the dimension of the pentagon. I formerly define all the labels, which are later gathered in the picture by the macro.
I am very much open to critics and advise for improving the code of the smaller pentagons.



There are two things I am not able to do:




  • Label the nodes of the pentagons with the formerly defined a, b, c, d, e instead of 0, 1, 2, 3, 4 without getting rid of the for cycle. This is a very minor aspect, but I am curious to learn how to deal efficiently with variables on TeX. (I tried something like r/i in {0/a, 1/b, 2c} etc but I was not able to make it work.)-

  • Draw a big pentagon of small pentagons (aka a 4-simplex or 4-oriental). I imagine that having this first macro done, then using wisely scope it is possible to create a big pentagon in which each node is a smaller pentagon. Actually, the arrows between pentagons have to be triple arrows aka 3-arrows, but that is not a problem since I can use the macro tarrow of this answer.
    The macro might accept a parameter for the 'base length' of the big pentagon, but it is far from necessary.










share|improve this question



























    3















    I want to create a macro in TikZ that allows me to draw a pentagon of pentagons where every node, arrow and triangle is labelled (the common/repeated parts will have the same labels). Here is nice example (in xypic) of what I'd like (just maybe upside down):
    enter image description here
    A friend of mine kindly helped me with the TikZ code for the pentagons:



    documentclass[tikz]{standalone}
    %
    usepackage{tikz}
    usetikzlibrary{calc}
    tikzset{
    between/.style args={#1 and #2}{
    at = ($(#1)!0.5!(#2)$)
    },
    betweenl/.style args={#1 and #2}{
    at = ($(#1)!0.35!(#2)$)
    }
    }
    %
    newcommand{drawPent}[2]{%
    foreach r in {0,1,2,3,4}
    node (r) at (162 + r * 72:#2) {footnotesize $r$};
    draw[->] (0) -- node[left] {footnotesize $ab$} coordinate (ab) (1);
    draw[->] (1) -- node[below] {footnotesize $bc$} coordinate (bc) (2);
    draw[->] (2) -- node[right] {footnotesize $cd$} coordinate (cd) (3);
    draw[->] (3) -- node[above] {footnotesize $de$} coordinate (de) (4);
    draw[->] (0) -- node[above] {footnotesize $ae$} coordinate (ae) (4);
    {ifcase #1
    draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
    draw[->] (0) -- node[fill=white] {footnotesize $ad$} coordinate (ad) (3);
    node[between=1 and ac] {footnotesize $abc$};
    node[betweenl=ad and 2] {footnotesize $acd$};
    node[betweenl=ad and 4] {footnotesize $ade$};
    or
    draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
    draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
    node[between=1 and ac] {footnotesize $abc$};
    node[betweenl=ae and 2] {footnotesize $ace$};
    node[between=ce and 3] {footnotesize $cde$};
    or
    draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (3);
    draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
    node[betweenl=ad and 1] {footnotesize $abd$};
    node[between=bd and 2] {footnotesize $bcd$};
    node[betweenl=ad and 4] {footnotesize $ade$};
    or
    draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
    draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
    node[between=0 and be] {footnotesize $abe$};
    node[betweenl=de and 1] {footnotesize $bde$};
    node[between=bd and 2] {footnotesize $bcd$};
    or
    draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
    draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
    node[between=0 and be] {footnotesize $abe$};
    node[betweenl=bc and 4] {footnotesize $bce$};
    node[between=ce and 3] {footnotesize $cde$};
    elsefi}
    }
    %
    begin{document}
    % defa{a}defb{b}defc{c}defd{d}defe{e}
    defab{f}defbc{g}defcd{h}defde{i}defae{l}
    defac{m}defad{n}defbd{o}defbe{p}defce{q}
    defabc{r}defacd{s}defade{t}
    deface{u}defcde{v}
    defabd{w}defbcd{x}
    defabe{y}defbde{z}
    defbce{A}
    %
    begin{tikzpicture}
    drawPent 0{1.5}
    end{tikzpicture}
    end{document}


    enter image description here



    The command drawPent takes two parameters: the first is the 'kind' of pentagon (going from 0 to 4) and the second is the dimension of the pentagon. I formerly define all the labels, which are later gathered in the picture by the macro.
    I am very much open to critics and advise for improving the code of the smaller pentagons.



    There are two things I am not able to do:




    • Label the nodes of the pentagons with the formerly defined a, b, c, d, e instead of 0, 1, 2, 3, 4 without getting rid of the for cycle. This is a very minor aspect, but I am curious to learn how to deal efficiently with variables on TeX. (I tried something like r/i in {0/a, 1/b, 2c} etc but I was not able to make it work.)-

    • Draw a big pentagon of small pentagons (aka a 4-simplex or 4-oriental). I imagine that having this first macro done, then using wisely scope it is possible to create a big pentagon in which each node is a smaller pentagon. Actually, the arrows between pentagons have to be triple arrows aka 3-arrows, but that is not a problem since I can use the macro tarrow of this answer.
      The macro might accept a parameter for the 'base length' of the big pentagon, but it is far from necessary.










    share|improve this question

























      3












      3








      3








      I want to create a macro in TikZ that allows me to draw a pentagon of pentagons where every node, arrow and triangle is labelled (the common/repeated parts will have the same labels). Here is nice example (in xypic) of what I'd like (just maybe upside down):
      enter image description here
      A friend of mine kindly helped me with the TikZ code for the pentagons:



      documentclass[tikz]{standalone}
      %
      usepackage{tikz}
      usetikzlibrary{calc}
      tikzset{
      between/.style args={#1 and #2}{
      at = ($(#1)!0.5!(#2)$)
      },
      betweenl/.style args={#1 and #2}{
      at = ($(#1)!0.35!(#2)$)
      }
      }
      %
      newcommand{drawPent}[2]{%
      foreach r in {0,1,2,3,4}
      node (r) at (162 + r * 72:#2) {footnotesize $r$};
      draw[->] (0) -- node[left] {footnotesize $ab$} coordinate (ab) (1);
      draw[->] (1) -- node[below] {footnotesize $bc$} coordinate (bc) (2);
      draw[->] (2) -- node[right] {footnotesize $cd$} coordinate (cd) (3);
      draw[->] (3) -- node[above] {footnotesize $de$} coordinate (de) (4);
      draw[->] (0) -- node[above] {footnotesize $ae$} coordinate (ae) (4);
      {ifcase #1
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
      draw[->] (0) -- node[fill=white] {footnotesize $ad$} coordinate (ad) (3);
      node[between=1 and ac] {footnotesize $abc$};
      node[betweenl=ad and 2] {footnotesize $acd$};
      node[betweenl=ad and 4] {footnotesize $ade$};
      or
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
      draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
      node[between=1 and ac] {footnotesize $abc$};
      node[betweenl=ae and 2] {footnotesize $ace$};
      node[between=ce and 3] {footnotesize $cde$};
      or
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (3);
      draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
      node[betweenl=ad and 1] {footnotesize $abd$};
      node[between=bd and 2] {footnotesize $bcd$};
      node[betweenl=ad and 4] {footnotesize $ade$};
      or
      draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
      draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
      node[between=0 and be] {footnotesize $abe$};
      node[betweenl=de and 1] {footnotesize $bde$};
      node[between=bd and 2] {footnotesize $bcd$};
      or
      draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
      draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
      node[between=0 and be] {footnotesize $abe$};
      node[betweenl=bc and 4] {footnotesize $bce$};
      node[between=ce and 3] {footnotesize $cde$};
      elsefi}
      }
      %
      begin{document}
      % defa{a}defb{b}defc{c}defd{d}defe{e}
      defab{f}defbc{g}defcd{h}defde{i}defae{l}
      defac{m}defad{n}defbd{o}defbe{p}defce{q}
      defabc{r}defacd{s}defade{t}
      deface{u}defcde{v}
      defabd{w}defbcd{x}
      defabe{y}defbde{z}
      defbce{A}
      %
      begin{tikzpicture}
      drawPent 0{1.5}
      end{tikzpicture}
      end{document}


      enter image description here



      The command drawPent takes two parameters: the first is the 'kind' of pentagon (going from 0 to 4) and the second is the dimension of the pentagon. I formerly define all the labels, which are later gathered in the picture by the macro.
      I am very much open to critics and advise for improving the code of the smaller pentagons.



      There are two things I am not able to do:




      • Label the nodes of the pentagons with the formerly defined a, b, c, d, e instead of 0, 1, 2, 3, 4 without getting rid of the for cycle. This is a very minor aspect, but I am curious to learn how to deal efficiently with variables on TeX. (I tried something like r/i in {0/a, 1/b, 2c} etc but I was not able to make it work.)-

      • Draw a big pentagon of small pentagons (aka a 4-simplex or 4-oriental). I imagine that having this first macro done, then using wisely scope it is possible to create a big pentagon in which each node is a smaller pentagon. Actually, the arrows between pentagons have to be triple arrows aka 3-arrows, but that is not a problem since I can use the macro tarrow of this answer.
        The macro might accept a parameter for the 'base length' of the big pentagon, but it is far from necessary.










      share|improve this question














      I want to create a macro in TikZ that allows me to draw a pentagon of pentagons where every node, arrow and triangle is labelled (the common/repeated parts will have the same labels). Here is nice example (in xypic) of what I'd like (just maybe upside down):
      enter image description here
      A friend of mine kindly helped me with the TikZ code for the pentagons:



      documentclass[tikz]{standalone}
      %
      usepackage{tikz}
      usetikzlibrary{calc}
      tikzset{
      between/.style args={#1 and #2}{
      at = ($(#1)!0.5!(#2)$)
      },
      betweenl/.style args={#1 and #2}{
      at = ($(#1)!0.35!(#2)$)
      }
      }
      %
      newcommand{drawPent}[2]{%
      foreach r in {0,1,2,3,4}
      node (r) at (162 + r * 72:#2) {footnotesize $r$};
      draw[->] (0) -- node[left] {footnotesize $ab$} coordinate (ab) (1);
      draw[->] (1) -- node[below] {footnotesize $bc$} coordinate (bc) (2);
      draw[->] (2) -- node[right] {footnotesize $cd$} coordinate (cd) (3);
      draw[->] (3) -- node[above] {footnotesize $de$} coordinate (de) (4);
      draw[->] (0) -- node[above] {footnotesize $ae$} coordinate (ae) (4);
      {ifcase #1
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
      draw[->] (0) -- node[fill=white] {footnotesize $ad$} coordinate (ad) (3);
      node[between=1 and ac] {footnotesize $abc$};
      node[betweenl=ad and 2] {footnotesize $acd$};
      node[betweenl=ad and 4] {footnotesize $ade$};
      or
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (2);
      draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
      node[between=1 and ac] {footnotesize $abc$};
      node[betweenl=ae and 2] {footnotesize $ace$};
      node[between=ce and 3] {footnotesize $cde$};
      or
      draw[->] (0) -- node[fill=white] {footnotesize $ac$} coordinate (ac) (3);
      draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
      node[betweenl=ad and 1] {footnotesize $abd$};
      node[between=bd and 2] {footnotesize $bcd$};
      node[betweenl=ad and 4] {footnotesize $ade$};
      or
      draw[->] (1) -- node[fill=white] {footnotesize $bd$} coordinate (bd) (3);
      draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
      node[between=0 and be] {footnotesize $abe$};
      node[betweenl=de and 1] {footnotesize $bde$};
      node[between=bd and 2] {footnotesize $bcd$};
      or
      draw[->] (1) -- node[fill=white] {footnotesize $be$} coordinate (be) (4);
      draw[->] (2) -- node[fill=white] {footnotesize $ce$} coordinate (ce) (4);
      node[between=0 and be] {footnotesize $abe$};
      node[betweenl=bc and 4] {footnotesize $bce$};
      node[between=ce and 3] {footnotesize $cde$};
      elsefi}
      }
      %
      begin{document}
      % defa{a}defb{b}defc{c}defd{d}defe{e}
      defab{f}defbc{g}defcd{h}defde{i}defae{l}
      defac{m}defad{n}defbd{o}defbe{p}defce{q}
      defabc{r}defacd{s}defade{t}
      deface{u}defcde{v}
      defabd{w}defbcd{x}
      defabe{y}defbde{z}
      defbce{A}
      %
      begin{tikzpicture}
      drawPent 0{1.5}
      end{tikzpicture}
      end{document}


      enter image description here



      The command drawPent takes two parameters: the first is the 'kind' of pentagon (going from 0 to 4) and the second is the dimension of the pentagon. I formerly define all the labels, which are later gathered in the picture by the macro.
      I am very much open to critics and advise for improving the code of the smaller pentagons.



      There are two things I am not able to do:




      • Label the nodes of the pentagons with the formerly defined a, b, c, d, e instead of 0, 1, 2, 3, 4 without getting rid of the for cycle. This is a very minor aspect, but I am curious to learn how to deal efficiently with variables on TeX. (I tried something like r/i in {0/a, 1/b, 2c} etc but I was not able to make it work.)-

      • Draw a big pentagon of small pentagons (aka a 4-simplex or 4-oriental). I imagine that having this first macro done, then using wisely scope it is possible to create a big pentagon in which each node is a smaller pentagon. Actually, the arrows between pentagons have to be triple arrows aka 3-arrows, but that is not a problem since I can use the macro tarrow of this answer.
        The macro might accept a parameter for the 'base length' of the big pentagon, but it is far from necessary.







      tikz-pgf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      Andrea GagnaAndrea Gagna

      23716




      23716






















          1 Answer
          1






          active

          oldest

          votes


















          2














          You could just store the "little" pentagon in a pic, which can be placed at the corners of a larger polygon.



          documentclass[tikz]{standalone}
          %
          usepackage{tikz}
          usetikzlibrary{calc}

          tikzset{
          between/.style args={#1 and #2}{
          at = ($(#1)!0.5!(#2)$)
          },
          betweenl/.style args={#1 and #2}{
          at = ($(#1)!0.35!(#2)$)
          }
          }
          %
          tikzset{pics/.cd,
          Pent/.style n args={4}{code={%
          begin{scope}[font=footnotesize]
          foreach XX [count=r starting from 0] in {#3}
          node (r) at (162 + r * 72:#2) {$XX$};
          draw[->] (0) -- node[midway,left] (ab) {$ab$} (1);
          draw[->] (1) -- node[midway,below] (bc) {$bc$} (2);
          draw[->] (2) -- node[midway,right] (cd) {$cd$} (3);
          draw[->] (3) -- node[midway,above] (de) {$de$} (4);
          draw[->] (0) -- node[midway,above] (ea) {$ae$} (4);
          ifcase#1
          draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ac) {$ac$} (2);
          draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ad) {$ad$} (3);
          node[between=1 and ac] {$abc$};
          node[betweenl=ad and 2] {$acd$};
          node[betweenl=ad and 4] {$ade$};
          or
          draw[->] (0) -- node[midway,fill=white] (ac) {$ac$} (2);
          draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
          node[between=1 and ac] {$abc$};
          node[betweenl=ea and 2] {$ace$};
          node[between=ce and 3] {$cde$};
          or
          draw[->] (0) -- node[midway,fill=white] (ad) {$ad$} (3);
          draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
          node[betweenl=ad and 1] {$abd$};
          node[between=bd and 2] {$bcd$};
          node[betweenl=ad and 4] {$ade$};
          or
          draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
          draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
          node[between=0 and be] {$abe$};
          node[betweenl=de and 1] {$bde$};
          node[between=bd and 2] {$bcd$};
          or
          draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
          draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
          node[between=0 and be] {$abe$};
          node[betweenl=bc and 4] {$bce$};
          node[between=ce and 3] {$cde$};
          fi
          end{scope}
          }}}
          %
          begin{document}
          % defa{a}defb{b}defc{c}defd{d}defe{e}
          defab{f}defbc{g}defcd{h}defde{i}defae{l}
          defac{m}defad{n}defbd{o}defbe{p}defce{q}
          defabc{r}defacd{s}defade{t}
          deface{u}defcde{v}
          defabd{w}defbcd{x}
          defabe{y}defbde{z}
          defbce{A}
          %
          begin{tikzpicture}
          foreach X [count=RR starting from 0] in {0,...,4}
          {
          path (162+RR*72:4) pic (P-RR) {Pent={RR}{1.5}{a,b,c,d,e}{B-RR}};
          }
          draw[-latex] (P-1ea) -- (P-0bc);
          draw[-latex] (P-0de) -- (P-4ab);
          draw[-latex] (P-4cd) -- (P-3ea);
          draw[-latex] (P-3bc) -- (P-2de);
          draw[-latex] (P-2ab) -- (P-1cd);
          end{tikzpicture}
          end{document}


          enter image description here



          Note that I slightly modified/simplified you code and believe to have fixed a small typo in the third ifcase.






          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%2f478247%2fpentagon-of-pentagons%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You could just store the "little" pentagon in a pic, which can be placed at the corners of a larger polygon.



            documentclass[tikz]{standalone}
            %
            usepackage{tikz}
            usetikzlibrary{calc}

            tikzset{
            between/.style args={#1 and #2}{
            at = ($(#1)!0.5!(#2)$)
            },
            betweenl/.style args={#1 and #2}{
            at = ($(#1)!0.35!(#2)$)
            }
            }
            %
            tikzset{pics/.cd,
            Pent/.style n args={4}{code={%
            begin{scope}[font=footnotesize]
            foreach XX [count=r starting from 0] in {#3}
            node (r) at (162 + r * 72:#2) {$XX$};
            draw[->] (0) -- node[midway,left] (ab) {$ab$} (1);
            draw[->] (1) -- node[midway,below] (bc) {$bc$} (2);
            draw[->] (2) -- node[midway,right] (cd) {$cd$} (3);
            draw[->] (3) -- node[midway,above] (de) {$de$} (4);
            draw[->] (0) -- node[midway,above] (ea) {$ae$} (4);
            ifcase#1
            draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ac) {$ac$} (2);
            draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ad) {$ad$} (3);
            node[between=1 and ac] {$abc$};
            node[betweenl=ad and 2] {$acd$};
            node[betweenl=ad and 4] {$ade$};
            or
            draw[->] (0) -- node[midway,fill=white] (ac) {$ac$} (2);
            draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
            node[between=1 and ac] {$abc$};
            node[betweenl=ea and 2] {$ace$};
            node[between=ce and 3] {$cde$};
            or
            draw[->] (0) -- node[midway,fill=white] (ad) {$ad$} (3);
            draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
            node[betweenl=ad and 1] {$abd$};
            node[between=bd and 2] {$bcd$};
            node[betweenl=ad and 4] {$ade$};
            or
            draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
            draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
            node[between=0 and be] {$abe$};
            node[betweenl=de and 1] {$bde$};
            node[between=bd and 2] {$bcd$};
            or
            draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
            draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
            node[between=0 and be] {$abe$};
            node[betweenl=bc and 4] {$bce$};
            node[between=ce and 3] {$cde$};
            fi
            end{scope}
            }}}
            %
            begin{document}
            % defa{a}defb{b}defc{c}defd{d}defe{e}
            defab{f}defbc{g}defcd{h}defde{i}defae{l}
            defac{m}defad{n}defbd{o}defbe{p}defce{q}
            defabc{r}defacd{s}defade{t}
            deface{u}defcde{v}
            defabd{w}defbcd{x}
            defabe{y}defbde{z}
            defbce{A}
            %
            begin{tikzpicture}
            foreach X [count=RR starting from 0] in {0,...,4}
            {
            path (162+RR*72:4) pic (P-RR) {Pent={RR}{1.5}{a,b,c,d,e}{B-RR}};
            }
            draw[-latex] (P-1ea) -- (P-0bc);
            draw[-latex] (P-0de) -- (P-4ab);
            draw[-latex] (P-4cd) -- (P-3ea);
            draw[-latex] (P-3bc) -- (P-2de);
            draw[-latex] (P-2ab) -- (P-1cd);
            end{tikzpicture}
            end{document}


            enter image description here



            Note that I slightly modified/simplified you code and believe to have fixed a small typo in the third ifcase.






            share|improve this answer




























              2














              You could just store the "little" pentagon in a pic, which can be placed at the corners of a larger polygon.



              documentclass[tikz]{standalone}
              %
              usepackage{tikz}
              usetikzlibrary{calc}

              tikzset{
              between/.style args={#1 and #2}{
              at = ($(#1)!0.5!(#2)$)
              },
              betweenl/.style args={#1 and #2}{
              at = ($(#1)!0.35!(#2)$)
              }
              }
              %
              tikzset{pics/.cd,
              Pent/.style n args={4}{code={%
              begin{scope}[font=footnotesize]
              foreach XX [count=r starting from 0] in {#3}
              node (r) at (162 + r * 72:#2) {$XX$};
              draw[->] (0) -- node[midway,left] (ab) {$ab$} (1);
              draw[->] (1) -- node[midway,below] (bc) {$bc$} (2);
              draw[->] (2) -- node[midway,right] (cd) {$cd$} (3);
              draw[->] (3) -- node[midway,above] (de) {$de$} (4);
              draw[->] (0) -- node[midway,above] (ea) {$ae$} (4);
              ifcase#1
              draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ac) {$ac$} (2);
              draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ad) {$ad$} (3);
              node[between=1 and ac] {$abc$};
              node[betweenl=ad and 2] {$acd$};
              node[betweenl=ad and 4] {$ade$};
              or
              draw[->] (0) -- node[midway,fill=white] (ac) {$ac$} (2);
              draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
              node[between=1 and ac] {$abc$};
              node[betweenl=ea and 2] {$ace$};
              node[between=ce and 3] {$cde$};
              or
              draw[->] (0) -- node[midway,fill=white] (ad) {$ad$} (3);
              draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
              node[betweenl=ad and 1] {$abd$};
              node[between=bd and 2] {$bcd$};
              node[betweenl=ad and 4] {$ade$};
              or
              draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
              draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
              node[between=0 and be] {$abe$};
              node[betweenl=de and 1] {$bde$};
              node[between=bd and 2] {$bcd$};
              or
              draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
              draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
              node[between=0 and be] {$abe$};
              node[betweenl=bc and 4] {$bce$};
              node[between=ce and 3] {$cde$};
              fi
              end{scope}
              }}}
              %
              begin{document}
              % defa{a}defb{b}defc{c}defd{d}defe{e}
              defab{f}defbc{g}defcd{h}defde{i}defae{l}
              defac{m}defad{n}defbd{o}defbe{p}defce{q}
              defabc{r}defacd{s}defade{t}
              deface{u}defcde{v}
              defabd{w}defbcd{x}
              defabe{y}defbde{z}
              defbce{A}
              %
              begin{tikzpicture}
              foreach X [count=RR starting from 0] in {0,...,4}
              {
              path (162+RR*72:4) pic (P-RR) {Pent={RR}{1.5}{a,b,c,d,e}{B-RR}};
              }
              draw[-latex] (P-1ea) -- (P-0bc);
              draw[-latex] (P-0de) -- (P-4ab);
              draw[-latex] (P-4cd) -- (P-3ea);
              draw[-latex] (P-3bc) -- (P-2de);
              draw[-latex] (P-2ab) -- (P-1cd);
              end{tikzpicture}
              end{document}


              enter image description here



              Note that I slightly modified/simplified you code and believe to have fixed a small typo in the third ifcase.






              share|improve this answer


























                2












                2








                2







                You could just store the "little" pentagon in a pic, which can be placed at the corners of a larger polygon.



                documentclass[tikz]{standalone}
                %
                usepackage{tikz}
                usetikzlibrary{calc}

                tikzset{
                between/.style args={#1 and #2}{
                at = ($(#1)!0.5!(#2)$)
                },
                betweenl/.style args={#1 and #2}{
                at = ($(#1)!0.35!(#2)$)
                }
                }
                %
                tikzset{pics/.cd,
                Pent/.style n args={4}{code={%
                begin{scope}[font=footnotesize]
                foreach XX [count=r starting from 0] in {#3}
                node (r) at (162 + r * 72:#2) {$XX$};
                draw[->] (0) -- node[midway,left] (ab) {$ab$} (1);
                draw[->] (1) -- node[midway,below] (bc) {$bc$} (2);
                draw[->] (2) -- node[midway,right] (cd) {$cd$} (3);
                draw[->] (3) -- node[midway,above] (de) {$de$} (4);
                draw[->] (0) -- node[midway,above] (ea) {$ae$} (4);
                ifcase#1
                draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ac) {$ac$} (2);
                draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ad) {$ad$} (3);
                node[between=1 and ac] {$abc$};
                node[betweenl=ad and 2] {$acd$};
                node[betweenl=ad and 4] {$ade$};
                or
                draw[->] (0) -- node[midway,fill=white] (ac) {$ac$} (2);
                draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
                node[between=1 and ac] {$abc$};
                node[betweenl=ea and 2] {$ace$};
                node[between=ce and 3] {$cde$};
                or
                draw[->] (0) -- node[midway,fill=white] (ad) {$ad$} (3);
                draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
                node[betweenl=ad and 1] {$abd$};
                node[between=bd and 2] {$bcd$};
                node[betweenl=ad and 4] {$ade$};
                or
                draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
                draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
                node[between=0 and be] {$abe$};
                node[betweenl=de and 1] {$bde$};
                node[between=bd and 2] {$bcd$};
                or
                draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
                draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
                node[between=0 and be] {$abe$};
                node[betweenl=bc and 4] {$bce$};
                node[between=ce and 3] {$cde$};
                fi
                end{scope}
                }}}
                %
                begin{document}
                % defa{a}defb{b}defc{c}defd{d}defe{e}
                defab{f}defbc{g}defcd{h}defde{i}defae{l}
                defac{m}defad{n}defbd{o}defbe{p}defce{q}
                defabc{r}defacd{s}defade{t}
                deface{u}defcde{v}
                defabd{w}defbcd{x}
                defabe{y}defbde{z}
                defbce{A}
                %
                begin{tikzpicture}
                foreach X [count=RR starting from 0] in {0,...,4}
                {
                path (162+RR*72:4) pic (P-RR) {Pent={RR}{1.5}{a,b,c,d,e}{B-RR}};
                }
                draw[-latex] (P-1ea) -- (P-0bc);
                draw[-latex] (P-0de) -- (P-4ab);
                draw[-latex] (P-4cd) -- (P-3ea);
                draw[-latex] (P-3bc) -- (P-2de);
                draw[-latex] (P-2ab) -- (P-1cd);
                end{tikzpicture}
                end{document}


                enter image description here



                Note that I slightly modified/simplified you code and believe to have fixed a small typo in the third ifcase.






                share|improve this answer













                You could just store the "little" pentagon in a pic, which can be placed at the corners of a larger polygon.



                documentclass[tikz]{standalone}
                %
                usepackage{tikz}
                usetikzlibrary{calc}

                tikzset{
                between/.style args={#1 and #2}{
                at = ($(#1)!0.5!(#2)$)
                },
                betweenl/.style args={#1 and #2}{
                at = ($(#1)!0.35!(#2)$)
                }
                }
                %
                tikzset{pics/.cd,
                Pent/.style n args={4}{code={%
                begin{scope}[font=footnotesize]
                foreach XX [count=r starting from 0] in {#3}
                node (r) at (162 + r * 72:#2) {$XX$};
                draw[->] (0) -- node[midway,left] (ab) {$ab$} (1);
                draw[->] (1) -- node[midway,below] (bc) {$bc$} (2);
                draw[->] (2) -- node[midway,right] (cd) {$cd$} (3);
                draw[->] (3) -- node[midway,above] (de) {$de$} (4);
                draw[->] (0) -- node[midway,above] (ea) {$ae$} (4);
                ifcase#1
                draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ac) {$ac$} (2);
                draw[->] (0) -- node[midway,fill=white,font=footnotesize] (ad) {$ad$} (3);
                node[between=1 and ac] {$abc$};
                node[betweenl=ad and 2] {$acd$};
                node[betweenl=ad and 4] {$ade$};
                or
                draw[->] (0) -- node[midway,fill=white] (ac) {$ac$} (2);
                draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
                node[between=1 and ac] {$abc$};
                node[betweenl=ea and 2] {$ace$};
                node[between=ce and 3] {$cde$};
                or
                draw[->] (0) -- node[midway,fill=white] (ad) {$ad$} (3);
                draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
                node[betweenl=ad and 1] {$abd$};
                node[between=bd and 2] {$bcd$};
                node[betweenl=ad and 4] {$ade$};
                or
                draw[->] (1) -- node[midway,fill=white] (bd) {$bd$} (3);
                draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
                node[between=0 and be] {$abe$};
                node[betweenl=de and 1] {$bde$};
                node[between=bd and 2] {$bcd$};
                or
                draw[->] (1) -- node[midway,fill=white] (be) {$be$} (4);
                draw[->] (2) -- node[midway,fill=white] (ce) {$ce$} (4);
                node[between=0 and be] {$abe$};
                node[betweenl=bc and 4] {$bce$};
                node[between=ce and 3] {$cde$};
                fi
                end{scope}
                }}}
                %
                begin{document}
                % defa{a}defb{b}defc{c}defd{d}defe{e}
                defab{f}defbc{g}defcd{h}defde{i}defae{l}
                defac{m}defad{n}defbd{o}defbe{p}defce{q}
                defabc{r}defacd{s}defade{t}
                deface{u}defcde{v}
                defabd{w}defbcd{x}
                defabe{y}defbde{z}
                defbce{A}
                %
                begin{tikzpicture}
                foreach X [count=RR starting from 0] in {0,...,4}
                {
                path (162+RR*72:4) pic (P-RR) {Pent={RR}{1.5}{a,b,c,d,e}{B-RR}};
                }
                draw[-latex] (P-1ea) -- (P-0bc);
                draw[-latex] (P-0de) -- (P-4ab);
                draw[-latex] (P-4cd) -- (P-3ea);
                draw[-latex] (P-3bc) -- (P-2de);
                draw[-latex] (P-2ab) -- (P-1cd);
                end{tikzpicture}
                end{document}


                enter image description here



                Note that I slightly modified/simplified you code and believe to have fixed a small typo in the third ifcase.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 4 hours ago









                marmotmarmot

                106k5129243




                106k5129243






























                    draft saved

                    draft discarded




















































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


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

                    But avoid



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

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


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




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478247%2fpentagon-of-pentagons%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