Tikz: Calculate position based on node using fit option












3















I want the nodes c and d be inside q and the position of q to be determined by p.



A second problem is, that the distance between p and q isn't correct even with on grid=false (I guess the width of p isn't available because of using fit?).



documentclass[tikz]{standalone}
usetikzlibrary{positioning,fit}

begin{document}

begin{tikzpicture}
node (a) [draw=black] {a};
node (b) [draw=black,on grid,below=of a] {long text};
node (p) [draw=black,fit={(a) (b)}] {};

node (c) [draw=red] {c};
node (d) [draw=red,below=of c] {d};
node (q) [right=of p,draw=red,fit={(c) (d)}] {};
end{tikzpicture}
end{document}









share|improve this question



























    3















    I want the nodes c and d be inside q and the position of q to be determined by p.



    A second problem is, that the distance between p and q isn't correct even with on grid=false (I guess the width of p isn't available because of using fit?).



    documentclass[tikz]{standalone}
    usetikzlibrary{positioning,fit}

    begin{document}

    begin{tikzpicture}
    node (a) [draw=black] {a};
    node (b) [draw=black,on grid,below=of a] {long text};
    node (p) [draw=black,fit={(a) (b)}] {};

    node (c) [draw=red] {c};
    node (d) [draw=red,below=of c] {d};
    node (q) [right=of p,draw=red,fit={(c) (d)}] {};
    end{tikzpicture}
    end{document}









    share|improve this question

























      3












      3








      3








      I want the nodes c and d be inside q and the position of q to be determined by p.



      A second problem is, that the distance between p and q isn't correct even with on grid=false (I guess the width of p isn't available because of using fit?).



      documentclass[tikz]{standalone}
      usetikzlibrary{positioning,fit}

      begin{document}

      begin{tikzpicture}
      node (a) [draw=black] {a};
      node (b) [draw=black,on grid,below=of a] {long text};
      node (p) [draw=black,fit={(a) (b)}] {};

      node (c) [draw=red] {c};
      node (d) [draw=red,below=of c] {d};
      node (q) [right=of p,draw=red,fit={(c) (d)}] {};
      end{tikzpicture}
      end{document}









      share|improve this question














      I want the nodes c and d be inside q and the position of q to be determined by p.



      A second problem is, that the distance between p and q isn't correct even with on grid=false (I guess the width of p isn't available because of using fit?).



      documentclass[tikz]{standalone}
      usetikzlibrary{positioning,fit}

      begin{document}

      begin{tikzpicture}
      node (a) [draw=black] {a};
      node (b) [draw=black,on grid,below=of a] {long text};
      node (p) [draw=black,fit={(a) (b)}] {};

      node (c) [draw=red] {c};
      node (d) [draw=red,below=of c] {d};
      node (q) [right=of p,draw=red,fit={(c) (d)}] {};
      end{tikzpicture}
      end{document}






      tikz-pgf fit






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 18 at 14:20









      BenBen

      7221419




      7221419






















          3 Answers
          3






          active

          oldest

          votes


















          2














          How about using a matrix?



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm] {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black] {long text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b)}] {};
          node (q) [draw=red,fit={(c) (d)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          The advantage of using one matrix (instead of two) is that it also looks good if the vertical dimensions of the nodes vary.



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm,anchor=center] (mat) {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black,align=center] {long\ text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b) (b|-mat.south)}] {};
          node (q) [draw=red,fit={(c) (d) (d|-mat.south)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          As in any TikZ matrix, every line, including the last one, has to be terminated by \.






          share|improve this answer


























          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58



















          3














          marmot proposes to use a matrix, but I think two matrices are better:



          documentclass[tikz]{standalone}
          usetikzlibrary{positioning,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[draw, matrix of nodes, nodes=draw, row sep=3mm] (a) {
          a\
          long text\
          };

          matrix[draw=red, matrix of nodes, nodes={draw=red},
          right=3mm of a, row sep=3mm] (b) {
          c\
          dvphantom{g}\
          };
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

            – marmot
            Jan 18 at 16:52











          • What are the advantages of using two matrices?

            – Ben
            Jan 18 at 16:53











          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58











          • @marmot It's true, but you can always define the desired dimensions or inner nodes.

            – Ignasi
            Jan 18 at 17:15











          • Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

            – marmot
            Jan 18 at 17:18



















          1














          documentclass[tikz,margin=3mm]{standalone}
          usetikzlibrary{fit, positioning}

          begin{document}

          begin{tikzpicture}[
          node distance = 8mm and 4 mm,
          every node/.style = {inner sep=1mm, minimum height=1.5em}
          ]
          node (a) [draw=black] {a};
          node (b) [draw=black,below=of a] {long text};
          node (p) [draw=black,fit={(a) (b)}] {};

          node (c) [draw=red,right=of b.east |- a] {c};
          node (d) [draw=red,below=of c] {d};
          node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

            – Ben
            Jan 18 at 15:19






          • 3





            @Ben No, -| and |- have nothing to do with the positioning library.

            – Torbjørn T.
            Jan 18 at 15:37











          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%2f470702%2ftikz-calculate-position-based-on-node-using-fit-option%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          How about using a matrix?



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm] {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black] {long text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b)}] {};
          node (q) [draw=red,fit={(c) (d)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          The advantage of using one matrix (instead of two) is that it also looks good if the vertical dimensions of the nodes vary.



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm,anchor=center] (mat) {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black,align=center] {long\ text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b) (b|-mat.south)}] {};
          node (q) [draw=red,fit={(c) (d) (d|-mat.south)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          As in any TikZ matrix, every line, including the last one, has to be terminated by \.






          share|improve this answer


























          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58
















          2














          How about using a matrix?



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm] {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black] {long text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b)}] {};
          node (q) [draw=red,fit={(c) (d)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          The advantage of using one matrix (instead of two) is that it also looks good if the vertical dimensions of the nodes vary.



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm,anchor=center] (mat) {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black,align=center] {long\ text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b) (b|-mat.south)}] {};
          node (q) [draw=red,fit={(c) (d) (d|-mat.south)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          As in any TikZ matrix, every line, including the last one, has to be terminated by \.






          share|improve this answer


























          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58














          2












          2








          2







          How about using a matrix?



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm] {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black] {long text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b)}] {};
          node (q) [draw=red,fit={(c) (d)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          The advantage of using one matrix (instead of two) is that it also looks good if the vertical dimensions of the nodes vary.



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm,anchor=center] (mat) {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black,align=center] {long\ text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b) (b|-mat.south)}] {};
          node (q) [draw=red,fit={(c) (d) (d|-mat.south)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          As in any TikZ matrix, every line, including the last one, has to be terminated by \.






          share|improve this answer















          How about using a matrix?



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm] {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black] {long text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b)}] {};
          node (q) [draw=red,fit={(c) (d)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          The advantage of using one matrix (instead of two) is that it also looks good if the vertical dimensions of the nodes vary.



          documentclass[tikz]{standalone}
          usetikzlibrary{fit,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[column sep=8mm,row sep=3mm,anchor=center] (mat) {
          node (a) [draw=black] {a};
          &
          node (c) [draw=red] {c};
          \
          node (b) [draw=black,align=center] {long\ text};
          &
          node (d) [draw=red] {d};
          \
          };
          node (p) [draw=black,fit={(a) (b) (b|-mat.south)}] {};
          node (q) [draw=red,fit={(c) (d) (d|-mat.south)}] {};
          end{tikzpicture}
          end{document}


          enter image description here



          As in any TikZ matrix, every line, including the last one, has to be terminated by \.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 18 at 17:00

























          answered Jan 18 at 16:31









          marmotmarmot

          94.6k4109209




          94.6k4109209













          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58



















          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58

















          Maybe you want to call attention to the \ before the };

          – Ben
          Jan 18 at 16:58





          Maybe you want to call attention to the \ before the };

          – Ben
          Jan 18 at 16:58











          3














          marmot proposes to use a matrix, but I think two matrices are better:



          documentclass[tikz]{standalone}
          usetikzlibrary{positioning,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[draw, matrix of nodes, nodes=draw, row sep=3mm] (a) {
          a\
          long text\
          };

          matrix[draw=red, matrix of nodes, nodes={draw=red},
          right=3mm of a, row sep=3mm] (b) {
          c\
          dvphantom{g}\
          };
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

            – marmot
            Jan 18 at 16:52











          • What are the advantages of using two matrices?

            – Ben
            Jan 18 at 16:53











          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58











          • @marmot It's true, but you can always define the desired dimensions or inner nodes.

            – Ignasi
            Jan 18 at 17:15











          • Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

            – marmot
            Jan 18 at 17:18
















          3














          marmot proposes to use a matrix, but I think two matrices are better:



          documentclass[tikz]{standalone}
          usetikzlibrary{positioning,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[draw, matrix of nodes, nodes=draw, row sep=3mm] (a) {
          a\
          long text\
          };

          matrix[draw=red, matrix of nodes, nodes={draw=red},
          right=3mm of a, row sep=3mm] (b) {
          c\
          dvphantom{g}\
          };
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

            – marmot
            Jan 18 at 16:52











          • What are the advantages of using two matrices?

            – Ben
            Jan 18 at 16:53











          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58











          • @marmot It's true, but you can always define the desired dimensions or inner nodes.

            – Ignasi
            Jan 18 at 17:15











          • Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

            – marmot
            Jan 18 at 17:18














          3












          3








          3







          marmot proposes to use a matrix, but I think two matrices are better:



          documentclass[tikz]{standalone}
          usetikzlibrary{positioning,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[draw, matrix of nodes, nodes=draw, row sep=3mm] (a) {
          a\
          long text\
          };

          matrix[draw=red, matrix of nodes, nodes={draw=red},
          right=3mm of a, row sep=3mm] (b) {
          c\
          dvphantom{g}\
          };
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer













          marmot proposes to use a matrix, but I think two matrices are better:



          documentclass[tikz]{standalone}
          usetikzlibrary{positioning,matrix}

          begin{document}

          begin{tikzpicture}
          matrix[draw, matrix of nodes, nodes=draw, row sep=3mm] (a) {
          a\
          long text\
          };

          matrix[draw=red, matrix of nodes, nodes={draw=red},
          right=3mm of a, row sep=3mm] (b) {
          c\
          dvphantom{g}\
          };
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 18 at 16:47









          IgnasiIgnasi

          92.6k4166307




          92.6k4166307













          • I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

            – marmot
            Jan 18 at 16:52











          • What are the advantages of using two matrices?

            – Ben
            Jan 18 at 16:53











          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58











          • @marmot It's true, but you can always define the desired dimensions or inner nodes.

            – Ignasi
            Jan 18 at 17:15











          • Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

            – marmot
            Jan 18 at 17:18



















          • I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

            – marmot
            Jan 18 at 16:52











          • What are the advantages of using two matrices?

            – Ben
            Jan 18 at 16:53











          • Maybe you want to call attention to the \ before the };

            – Ben
            Jan 18 at 16:58











          • @marmot It's true, but you can always define the desired dimensions or inner nodes.

            – Ignasi
            Jan 18 at 17:15











          • Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

            – marmot
            Jan 18 at 17:18

















          I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

          – marmot
          Jan 18 at 16:52





          I thought about this as well but I was afraid that, if the nodes have different vertical dimensions, this will no longer work.

          – marmot
          Jan 18 at 16:52













          What are the advantages of using two matrices?

          – Ben
          Jan 18 at 16:53





          What are the advantages of using two matrices?

          – Ben
          Jan 18 at 16:53













          Maybe you want to call attention to the \ before the };

          – Ben
          Jan 18 at 16:58





          Maybe you want to call attention to the \ before the };

          – Ben
          Jan 18 at 16:58













          @marmot It's true, but you can always define the desired dimensions or inner nodes.

          – Ignasi
          Jan 18 at 17:15





          @marmot It's true, but you can always define the desired dimensions or inner nodes.

          – Ignasi
          Jan 18 at 17:15













          Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

          – marmot
          Jan 18 at 17:18





          Yes, sure. I just wanted to say that I do not necessarily think that " two matrices are better". Either of our two options may be advantageous depending on what you precisely intent to do.

          – marmot
          Jan 18 at 17:18











          1














          documentclass[tikz,margin=3mm]{standalone}
          usetikzlibrary{fit, positioning}

          begin{document}

          begin{tikzpicture}[
          node distance = 8mm and 4 mm,
          every node/.style = {inner sep=1mm, minimum height=1.5em}
          ]
          node (a) [draw=black] {a};
          node (b) [draw=black,below=of a] {long text};
          node (p) [draw=black,fit={(a) (b)}] {};

          node (c) [draw=red,right=of b.east |- a] {c};
          node (d) [draw=red,below=of c] {d};
          node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

            – Ben
            Jan 18 at 15:19






          • 3





            @Ben No, -| and |- have nothing to do with the positioning library.

            – Torbjørn T.
            Jan 18 at 15:37
















          1














          documentclass[tikz,margin=3mm]{standalone}
          usetikzlibrary{fit, positioning}

          begin{document}

          begin{tikzpicture}[
          node distance = 8mm and 4 mm,
          every node/.style = {inner sep=1mm, minimum height=1.5em}
          ]
          node (a) [draw=black] {a};
          node (b) [draw=black,below=of a] {long text};
          node (p) [draw=black,fit={(a) (b)}] {};

          node (c) [draw=red,right=of b.east |- a] {c};
          node (d) [draw=red,below=of c] {d};
          node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer
























          • I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

            – Ben
            Jan 18 at 15:19






          • 3





            @Ben No, -| and |- have nothing to do with the positioning library.

            – Torbjørn T.
            Jan 18 at 15:37














          1












          1








          1







          documentclass[tikz,margin=3mm]{standalone}
          usetikzlibrary{fit, positioning}

          begin{document}

          begin{tikzpicture}[
          node distance = 8mm and 4 mm,
          every node/.style = {inner sep=1mm, minimum height=1.5em}
          ]
          node (a) [draw=black] {a};
          node (b) [draw=black,below=of a] {long text};
          node (p) [draw=black,fit={(a) (b)}] {};

          node (c) [draw=red,right=of b.east |- a] {c};
          node (d) [draw=red,below=of c] {d};
          node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer













          documentclass[tikz,margin=3mm]{standalone}
          usetikzlibrary{fit, positioning}

          begin{document}

          begin{tikzpicture}[
          node distance = 8mm and 4 mm,
          every node/.style = {inner sep=1mm, minimum height=1.5em}
          ]
          node (a) [draw=black] {a};
          node (b) [draw=black,below=of a] {long text};
          node (p) [draw=black,fit={(a) (b)}] {};

          node (c) [draw=red,right=of b.east |- a] {c};
          node (d) [draw=red,below=of c] {d};
          node (q) [draw=red,fit={(c) (d)}] {};%right=of p,
          end{tikzpicture}
          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 18 at 14:52









          ZarkoZarko

          123k865161




          123k865161













          • I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

            – Ben
            Jan 18 at 15:19






          • 3





            @Ben No, -| and |- have nothing to do with the positioning library.

            – Torbjørn T.
            Jan 18 at 15:37



















          • I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

            – Ben
            Jan 18 at 15:19






          • 3





            @Ben No, -| and |- have nothing to do with the positioning library.

            – Torbjørn T.
            Jan 18 at 15:37

















          I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

          – Ben
          Jan 18 at 15:19





          I did not knew |-. This is only available because of the positioning library, isn't it? But for your solution one has to know if a or b determines the width of p, which isn't perfectly easy, but should work for me

          – Ben
          Jan 18 at 15:19




          3




          3





          @Ben No, -| and |- have nothing to do with the positioning library.

          – Torbjørn T.
          Jan 18 at 15:37





          @Ben No, -| and |- have nothing to do with the positioning library.

          – Torbjørn T.
          Jan 18 at 15:37


















          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%2f470702%2ftikz-calculate-position-based-on-node-using-fit-option%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

          How to change which sound is reproduced for terminal bell?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

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