“No shape named X is known” where the shape is known and used elsewhere, when using foreach loops

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












this is my code:



documentclassstandalone% For the example only, any class will do

usepackagetikz
usetikzlibrarypositioning% To get more advances positioning options
usetikzlibraryarrows% To get more arrow heads
usetikzlibraryshapes,trees,hobby,calc

begindocument

tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
tikzstylebblock=[block, fill=blue!50]


begintikzpicture


%nodes
% pos = position
% lb = label
% t = text
foreach pos / lb / t in
(0,-1)/S1/$ $,
(0,1)/S2/$ $,
%
(3,-2)/T1/$B$,
(3,1)/T2/$ $,
%
(6,-3)/U1/$ $,
(6,0)/U2/$B_DP$,
(6,2)/U3/$ $,
%
(9,-2.5)/V1/$ $,
(9,-1)/V2/$ $,
(9,1.5)/V3/$ $


node[bblock] (lb) at pos t;


%arrows
foreach f/t/b in
S1/T1/0,
S2/T2/0,
S2/T1/0,
S1/T2/0,
T1/U1/0,
T1/U2/0,
T2/U3/0,
U1/V1/0,
U2/V2/0,
U2/V3/0,
U3/V3/0


draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


%in arrows
foreach t in
S1,
S2


draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


%out arrows
foreach t in
V1,
V2,
V3


draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


endtikzpicture

enddocument


The last lines of each of the last foreach loops return a "no shape named X is known" where X is whatever shape appeared last in the list. If I add some other shapes, than they are recognized just fine.



Does anyone know why TikZ does this and how this can be fixed?










share|improve this question







New contributor




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























    up vote
    2
    down vote

    favorite












    this is my code:



    documentclassstandalone% For the example only, any class will do

    usepackagetikz
    usetikzlibrarypositioning% To get more advances positioning options
    usetikzlibraryarrows% To get more arrow heads
    usetikzlibraryshapes,trees,hobby,calc

    begindocument

    tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
    text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
    tikzstylebblock=[block, fill=blue!50]


    begintikzpicture


    %nodes
    % pos = position
    % lb = label
    % t = text
    foreach pos / lb / t in
    (0,-1)/S1/$ $,
    (0,1)/S2/$ $,
    %
    (3,-2)/T1/$B$,
    (3,1)/T2/$ $,
    %
    (6,-3)/U1/$ $,
    (6,0)/U2/$B_DP$,
    (6,2)/U3/$ $,
    %
    (9,-2.5)/V1/$ $,
    (9,-1)/V2/$ $,
    (9,1.5)/V3/$ $


    node[bblock] (lb) at pos t;


    %arrows
    foreach f/t/b in
    S1/T1/0,
    S2/T2/0,
    S2/T1/0,
    S1/T2/0,
    T1/U1/0,
    T1/U2/0,
    T2/U3/0,
    U1/V1/0,
    U2/V2/0,
    U2/V3/0,
    U3/V3/0


    draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


    %in arrows
    foreach t in
    S1,
    S2


    draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
    draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


    %out arrows
    foreach t in
    V1,
    V2,
    V3


    draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
    draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


    endtikzpicture

    enddocument


    The last lines of each of the last foreach loops return a "no shape named X is known" where X is whatever shape appeared last in the list. If I add some other shapes, than they are recognized just fine.



    Does anyone know why TikZ does this and how this can be fixed?










    share|improve this question







    New contributor




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





















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      this is my code:



      documentclassstandalone% For the example only, any class will do

      usepackagetikz
      usetikzlibrarypositioning% To get more advances positioning options
      usetikzlibraryarrows% To get more arrow heads
      usetikzlibraryshapes,trees,hobby,calc

      begindocument

      tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
      text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
      tikzstylebblock=[block, fill=blue!50]


      begintikzpicture


      %nodes
      % pos = position
      % lb = label
      % t = text
      foreach pos / lb / t in
      (0,-1)/S1/$ $,
      (0,1)/S2/$ $,
      %
      (3,-2)/T1/$B$,
      (3,1)/T2/$ $,
      %
      (6,-3)/U1/$ $,
      (6,0)/U2/$B_DP$,
      (6,2)/U3/$ $,
      %
      (9,-2.5)/V1/$ $,
      (9,-1)/V2/$ $,
      (9,1.5)/V3/$ $


      node[bblock] (lb) at pos t;


      %arrows
      foreach f/t/b in
      S1/T1/0,
      S2/T2/0,
      S2/T1/0,
      S1/T2/0,
      T1/U1/0,
      T1/U2/0,
      T2/U3/0,
      U1/V1/0,
      U2/V2/0,
      U2/V3/0,
      U3/V3/0


      draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


      %in arrows
      foreach t in
      S1,
      S2


      draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
      draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


      %out arrows
      foreach t in
      V1,
      V2,
      V3


      draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
      draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


      endtikzpicture

      enddocument


      The last lines of each of the last foreach loops return a "no shape named X is known" where X is whatever shape appeared last in the list. If I add some other shapes, than they are recognized just fine.



      Does anyone know why TikZ does this and how this can be fixed?










      share|improve this question







      New contributor




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











      this is my code:



      documentclassstandalone% For the example only, any class will do

      usepackagetikz
      usetikzlibrarypositioning% To get more advances positioning options
      usetikzlibraryarrows% To get more arrow heads
      usetikzlibraryshapes,trees,hobby,calc

      begindocument

      tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
      text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
      tikzstylebblock=[block, fill=blue!50]


      begintikzpicture


      %nodes
      % pos = position
      % lb = label
      % t = text
      foreach pos / lb / t in
      (0,-1)/S1/$ $,
      (0,1)/S2/$ $,
      %
      (3,-2)/T1/$B$,
      (3,1)/T2/$ $,
      %
      (6,-3)/U1/$ $,
      (6,0)/U2/$B_DP$,
      (6,2)/U3/$ $,
      %
      (9,-2.5)/V1/$ $,
      (9,-1)/V2/$ $,
      (9,1.5)/V3/$ $


      node[bblock] (lb) at pos t;


      %arrows
      foreach f/t/b in
      S1/T1/0,
      S2/T2/0,
      S2/T1/0,
      S1/T2/0,
      T1/U1/0,
      T1/U2/0,
      T2/U3/0,
      U1/V1/0,
      U2/V2/0,
      U2/V3/0,
      U3/V3/0


      draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


      %in arrows
      foreach t in
      S1,
      S2


      draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
      draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


      %out arrows
      foreach t in
      V1,
      V2,
      V3


      draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
      draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


      endtikzpicture

      enddocument


      The last lines of each of the last foreach loops return a "no shape named X is known" where X is whatever shape appeared last in the list. If I add some other shapes, than they are recognized just fine.



      Does anyone know why TikZ does this and how this can be fixed?







      tikz-pgf tikz-arrows






      share|improve this question







      New contributor




      Shai Deshe 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




      Shai Deshe 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




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









      asked 1 hour ago









      Shai Deshe

      1132




      1132




      New contributor




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





      New contributor





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






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




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          This is because the parenthesis is written on the next line, which creates a spurious space. Just comment on the end of the line.



          documentclassstandalone% For the example only, any class will do

          usepackagetikz
          usetikzlibrarypositioning% To get more advances positioning options
          usetikzlibraryarrows% To get more arrow heads
          usetikzlibraryshapes,trees,hobby,calc

          begindocument

          tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
          text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
          tikzstylebblock=[block, fill=blue!50]


          begintikzpicture

          %blob
          path[draw,green,fill=red,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (-.5,.3) .. (1.5,2.5) .. (2.8,3.6) .. (4,3) .. (4.2,0) .. (4,-3)
          .. (2.8,-3.6) .. (1.5,-2.5) .. (-.5,-.3)
          ;

          path[draw,red,fill=green,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (12.5,.3) .. (10.5,2.5) .. (9.2,3.6) .. (8,3) .. (7.8,0) .. (8,-3)
          .. (9.2,-3.6) .. (10.5,-2.5) .. (12.5,-.3)
          ;

          node[text=red] at (1.8,0) Huge S;
          node[text=green] at (10.2,0) Huge T;

          %nodes
          % pos = position
          % lb = label
          % t = text
          foreach pos / lb / t in
          (0,-1)/S1/$ $,
          (0,1)/S2/$ $,
          %
          (3,-2)/T1/$B$,
          (3,1)/T2/$ $,
          %
          (6,-3)/U1/$ $,
          (6,0)/U2/$B_DP$,
          (6,2)/U3/$ $,
          %
          (9,-2.5)/V1/$ $,
          (9,-1)/V2/$ $,
          (9,1.5)/V3/$ $


          node[bblock] (lb) at pos t;


          %arrows
          foreach f/t/b in
          S1/T1/0,
          S2/T2/0,
          S2/T1/0,
          S1/T2/0,
          T1/U1/0,
          T1/U2/0,
          T2/U3/0,
          U1/V1/0,
          U2/V2/0,
          U2/V3/0,
          U3/V3/0


          draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


          %in arrows
          foreach t in %
          S1,
          S2% comment to avoid spurious space


          draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
          draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


          %out arrows
          foreach t in
          V1,
          V2,
          V3% comment to avoid spurious space


          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


          endtikzpicture

          enddocument


          spurious






          share|improve this answer




















          • They weren't kidding when they said Tikz is finicky... Thanks for your help
            – Shai Deshe
            1 hour ago










          • @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
            – AndréC
            1 hour ago










          • @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
            – jfbu
            33 mins ago











          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Shai Deshe 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%2f454345%2fno-shape-named-x-is-known-where-the-shape-is-known-and-used-elsewhere-when-us%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          This is because the parenthesis is written on the next line, which creates a spurious space. Just comment on the end of the line.



          documentclassstandalone% For the example only, any class will do

          usepackagetikz
          usetikzlibrarypositioning% To get more advances positioning options
          usetikzlibraryarrows% To get more arrow heads
          usetikzlibraryshapes,trees,hobby,calc

          begindocument

          tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
          text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
          tikzstylebblock=[block, fill=blue!50]


          begintikzpicture

          %blob
          path[draw,green,fill=red,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (-.5,.3) .. (1.5,2.5) .. (2.8,3.6) .. (4,3) .. (4.2,0) .. (4,-3)
          .. (2.8,-3.6) .. (1.5,-2.5) .. (-.5,-.3)
          ;

          path[draw,red,fill=green,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (12.5,.3) .. (10.5,2.5) .. (9.2,3.6) .. (8,3) .. (7.8,0) .. (8,-3)
          .. (9.2,-3.6) .. (10.5,-2.5) .. (12.5,-.3)
          ;

          node[text=red] at (1.8,0) Huge S;
          node[text=green] at (10.2,0) Huge T;

          %nodes
          % pos = position
          % lb = label
          % t = text
          foreach pos / lb / t in
          (0,-1)/S1/$ $,
          (0,1)/S2/$ $,
          %
          (3,-2)/T1/$B$,
          (3,1)/T2/$ $,
          %
          (6,-3)/U1/$ $,
          (6,0)/U2/$B_DP$,
          (6,2)/U3/$ $,
          %
          (9,-2.5)/V1/$ $,
          (9,-1)/V2/$ $,
          (9,1.5)/V3/$ $


          node[bblock] (lb) at pos t;


          %arrows
          foreach f/t/b in
          S1/T1/0,
          S2/T2/0,
          S2/T1/0,
          S1/T2/0,
          T1/U1/0,
          T1/U2/0,
          T2/U3/0,
          U1/V1/0,
          U2/V2/0,
          U2/V3/0,
          U3/V3/0


          draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


          %in arrows
          foreach t in %
          S1,
          S2% comment to avoid spurious space


          draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
          draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


          %out arrows
          foreach t in
          V1,
          V2,
          V3% comment to avoid spurious space


          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


          endtikzpicture

          enddocument


          spurious






          share|improve this answer




















          • They weren't kidding when they said Tikz is finicky... Thanks for your help
            – Shai Deshe
            1 hour ago










          • @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
            – AndréC
            1 hour ago










          • @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
            – jfbu
            33 mins ago















          up vote
          2
          down vote



          accepted










          This is because the parenthesis is written on the next line, which creates a spurious space. Just comment on the end of the line.



          documentclassstandalone% For the example only, any class will do

          usepackagetikz
          usetikzlibrarypositioning% To get more advances positioning options
          usetikzlibraryarrows% To get more arrow heads
          usetikzlibraryshapes,trees,hobby,calc

          begindocument

          tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
          text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
          tikzstylebblock=[block, fill=blue!50]


          begintikzpicture

          %blob
          path[draw,green,fill=red,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (-.5,.3) .. (1.5,2.5) .. (2.8,3.6) .. (4,3) .. (4.2,0) .. (4,-3)
          .. (2.8,-3.6) .. (1.5,-2.5) .. (-.5,-.3)
          ;

          path[draw,red,fill=green,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (12.5,.3) .. (10.5,2.5) .. (9.2,3.6) .. (8,3) .. (7.8,0) .. (8,-3)
          .. (9.2,-3.6) .. (10.5,-2.5) .. (12.5,-.3)
          ;

          node[text=red] at (1.8,0) Huge S;
          node[text=green] at (10.2,0) Huge T;

          %nodes
          % pos = position
          % lb = label
          % t = text
          foreach pos / lb / t in
          (0,-1)/S1/$ $,
          (0,1)/S2/$ $,
          %
          (3,-2)/T1/$B$,
          (3,1)/T2/$ $,
          %
          (6,-3)/U1/$ $,
          (6,0)/U2/$B_DP$,
          (6,2)/U3/$ $,
          %
          (9,-2.5)/V1/$ $,
          (9,-1)/V2/$ $,
          (9,1.5)/V3/$ $


          node[bblock] (lb) at pos t;


          %arrows
          foreach f/t/b in
          S1/T1/0,
          S2/T2/0,
          S2/T1/0,
          S1/T2/0,
          T1/U1/0,
          T1/U2/0,
          T2/U3/0,
          U1/V1/0,
          U2/V2/0,
          U2/V3/0,
          U3/V3/0


          draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


          %in arrows
          foreach t in %
          S1,
          S2% comment to avoid spurious space


          draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
          draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


          %out arrows
          foreach t in
          V1,
          V2,
          V3% comment to avoid spurious space


          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


          endtikzpicture

          enddocument


          spurious






          share|improve this answer




















          • They weren't kidding when they said Tikz is finicky... Thanks for your help
            – Shai Deshe
            1 hour ago










          • @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
            – AndréC
            1 hour ago










          • @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
            – jfbu
            33 mins ago













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          This is because the parenthesis is written on the next line, which creates a spurious space. Just comment on the end of the line.



          documentclassstandalone% For the example only, any class will do

          usepackagetikz
          usetikzlibrarypositioning% To get more advances positioning options
          usetikzlibraryarrows% To get more arrow heads
          usetikzlibraryshapes,trees,hobby,calc

          begindocument

          tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
          text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
          tikzstylebblock=[block, fill=blue!50]


          begintikzpicture

          %blob
          path[draw,green,fill=red,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (-.5,.3) .. (1.5,2.5) .. (2.8,3.6) .. (4,3) .. (4.2,0) .. (4,-3)
          .. (2.8,-3.6) .. (1.5,-2.5) .. (-.5,-.3)
          ;

          path[draw,red,fill=green,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (12.5,.3) .. (10.5,2.5) .. (9.2,3.6) .. (8,3) .. (7.8,0) .. (8,-3)
          .. (9.2,-3.6) .. (10.5,-2.5) .. (12.5,-.3)
          ;

          node[text=red] at (1.8,0) Huge S;
          node[text=green] at (10.2,0) Huge T;

          %nodes
          % pos = position
          % lb = label
          % t = text
          foreach pos / lb / t in
          (0,-1)/S1/$ $,
          (0,1)/S2/$ $,
          %
          (3,-2)/T1/$B$,
          (3,1)/T2/$ $,
          %
          (6,-3)/U1/$ $,
          (6,0)/U2/$B_DP$,
          (6,2)/U3/$ $,
          %
          (9,-2.5)/V1/$ $,
          (9,-1)/V2/$ $,
          (9,1.5)/V3/$ $


          node[bblock] (lb) at pos t;


          %arrows
          foreach f/t/b in
          S1/T1/0,
          S2/T2/0,
          S2/T1/0,
          S1/T2/0,
          T1/U1/0,
          T1/U2/0,
          T2/U3/0,
          U1/V1/0,
          U2/V2/0,
          U2/V3/0,
          U3/V3/0


          draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


          %in arrows
          foreach t in %
          S1,
          S2% comment to avoid spurious space


          draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
          draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


          %out arrows
          foreach t in
          V1,
          V2,
          V3% comment to avoid spurious space


          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


          endtikzpicture

          enddocument


          spurious






          share|improve this answer












          This is because the parenthesis is written on the next line, which creates a spurious space. Just comment on the end of the line.



          documentclassstandalone% For the example only, any class will do

          usepackagetikz
          usetikzlibrarypositioning% To get more advances positioning options
          usetikzlibraryarrows% To get more arrow heads
          usetikzlibraryshapes,trees,hobby,calc

          begindocument

          tikzstyleblock=[rectangle, draw=black, rounded corners, ultra thick,
          text centered, anchor=north, text=white, text width=1cm, text height=.3cm]
          tikzstylebblock=[block, fill=blue!50]


          begintikzpicture

          %blob
          path[draw,green,fill=red,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (-.5,.3) .. (1.5,2.5) .. (2.8,3.6) .. (4,3) .. (4.2,0) .. (4,-3)
          .. (2.8,-3.6) .. (1.5,-2.5) .. (-.5,-.3)
          ;

          path[draw,red,fill=green,thick,use Hobby shortcut,closed=true, opacity=0.2]
          (12.5,.3) .. (10.5,2.5) .. (9.2,3.6) .. (8,3) .. (7.8,0) .. (8,-3)
          .. (9.2,-3.6) .. (10.5,-2.5) .. (12.5,-.3)
          ;

          node[text=red] at (1.8,0) Huge S;
          node[text=green] at (10.2,0) Huge T;

          %nodes
          % pos = position
          % lb = label
          % t = text
          foreach pos / lb / t in
          (0,-1)/S1/$ $,
          (0,1)/S2/$ $,
          %
          (3,-2)/T1/$B$,
          (3,1)/T2/$ $,
          %
          (6,-3)/U1/$ $,
          (6,0)/U2/$B_DP$,
          (6,2)/U3/$ $,
          %
          (9,-2.5)/V1/$ $,
          (9,-1)/V2/$ $,
          (9,1.5)/V3/$ $


          node[bblock] (lb) at pos t;


          %arrows
          foreach f/t/b in
          S1/T1/0,
          S2/T2/0,
          S2/T1/0,
          S1/T2/0,
          T1/U1/0,
          T1/U2/0,
          T2/U3/0,
          U1/V1/0,
          U2/V2/0,
          U2/V3/0,
          U3/V3/0


          draw[->, >=stealth', thick] (f) edge[bend right=b] (t);


          %in arrows
          foreach t in %
          S1,
          S2% comment to avoid spurious space


          draw[->, >=stealth', thick] ($ (t) + (-1.5,.4) $) -- (t);
          draw[->, >=stealth', thick] ($ (t) + (-1.5,-.4) $) -- (t);


          %out arrows
          foreach t in
          V1,
          V2,
          V3% comment to avoid spurious space


          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,.4) $);
          draw[->, >=stealth', thick] (t) -- ($ (t) + (1.5,-.4) $);


          endtikzpicture

          enddocument


          spurious







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          AndréC

          3,516729




          3,516729











          • They weren't kidding when they said Tikz is finicky... Thanks for your help
            – Shai Deshe
            1 hour ago










          • @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
            – AndréC
            1 hour ago










          • @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
            – jfbu
            33 mins ago

















          • They weren't kidding when they said Tikz is finicky... Thanks for your help
            – Shai Deshe
            1 hour ago










          • @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
            – AndréC
            1 hour ago










          • @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
            – jfbu
            33 mins ago
















          They weren't kidding when they said Tikz is finicky... Thanks for your help
          – Shai Deshe
          1 hour ago




          They weren't kidding when they said Tikz is finicky... Thanks for your help
          – Shai Deshe
          1 hour ago












          @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
          – AndréC
          1 hour ago




          @ShaiDeshe Tikz is difficult, it's true but much less than TeX. Spurious spaces are a problem of TeX that arises with Tikz, because Tikz is written in TeX.
          – AndréC
          1 hour ago












          @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
          – jfbu
          33 mins ago





          @AndréC +1 but no problem with spurious spaces with xintFor... that said, the problem with spaces is purely on the user side, as the vast majority of LaTeX users do not make the effort to understand the general rules regarding spaces in TeX. (admittedly even knowing the rules is not always enough of course because macros can change the general expectations by using math mode in disguise for example).
          – jfbu
          33 mins ago











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









           

          draft saved


          draft discarded


















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












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











          Shai Deshe 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%2f454345%2fno-shape-named-x-is-known-where-the-shape-is-known-and-used-elsewhere-when-us%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          How to decode/decipher Mozilla Firefox proprietary .jsonlz4 format? (sessionstore-backups/recovery.jsonlz4)

          White Anglo-Saxon Protestant

          How to be valuable when automation & IT are stealing my job (and maybe my whole career)? [closed]