tikz: increase the spacing between the nodes

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












3















I want to increase the spacing between the nodes in a stencil, linked to each other by a stroke



documentclass[a4paper, 12pt]book
usepackagetikz
newcommandstencilptbig[4]node[circle,draw,inner sep=0.1em, outer sep=0pt, minimum size=0.7cm,font=scriptsize,#1] at (#2) (#3) #4
begindocument
begintikzpicture
stencilptbig -1,0i-1 $frac1h^2+frac32h$;
stencilptbig 0,0i $frac-2h^2$;
stencilptbig 1,0i+1$frac1h^2-frac32h$;
draw
(i-1) -- (i)
(i) -- (i+1);
endtikzpicture
enddocument


enter image description here










share|improve this question

















  • 1





    The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

    – Kpym
    Dec 31 '18 at 14:48











  • Many thanks @kpym. short and accurate

    – ecjb
    Dec 31 '18 at 17:57















3















I want to increase the spacing between the nodes in a stencil, linked to each other by a stroke



documentclass[a4paper, 12pt]book
usepackagetikz
newcommandstencilptbig[4]node[circle,draw,inner sep=0.1em, outer sep=0pt, minimum size=0.7cm,font=scriptsize,#1] at (#2) (#3) #4
begindocument
begintikzpicture
stencilptbig -1,0i-1 $frac1h^2+frac32h$;
stencilptbig 0,0i $frac-2h^2$;
stencilptbig 1,0i+1$frac1h^2-frac32h$;
draw
(i-1) -- (i)
(i) -- (i+1);
endtikzpicture
enddocument


enter image description here










share|improve this question

















  • 1





    The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

    – Kpym
    Dec 31 '18 at 14:48











  • Many thanks @kpym. short and accurate

    – ecjb
    Dec 31 '18 at 17:57













3












3








3


0






I want to increase the spacing between the nodes in a stencil, linked to each other by a stroke



documentclass[a4paper, 12pt]book
usepackagetikz
newcommandstencilptbig[4]node[circle,draw,inner sep=0.1em, outer sep=0pt, minimum size=0.7cm,font=scriptsize,#1] at (#2) (#3) #4
begindocument
begintikzpicture
stencilptbig -1,0i-1 $frac1h^2+frac32h$;
stencilptbig 0,0i $frac-2h^2$;
stencilptbig 1,0i+1$frac1h^2-frac32h$;
draw
(i-1) -- (i)
(i) -- (i+1);
endtikzpicture
enddocument


enter image description here










share|improve this question














I want to increase the spacing between the nodes in a stencil, linked to each other by a stroke



documentclass[a4paper, 12pt]book
usepackagetikz
newcommandstencilptbig[4]node[circle,draw,inner sep=0.1em, outer sep=0pt, minimum size=0.7cm,font=scriptsize,#1] at (#2) (#3) #4
begindocument
begintikzpicture
stencilptbig -1,0i-1 $frac1h^2+frac32h$;
stencilptbig 0,0i $frac-2h^2$;
stencilptbig 1,0i+1$frac1h^2-frac32h$;
draw
(i-1) -- (i)
(i) -- (i+1);
endtikzpicture
enddocument


enter image description here







tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 31 '18 at 14:29









ecjbecjb

1956




1956







  • 1





    The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

    – Kpym
    Dec 31 '18 at 14:48











  • Many thanks @kpym. short and accurate

    – ecjb
    Dec 31 '18 at 17:57












  • 1





    The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

    – Kpym
    Dec 31 '18 at 14:48











  • Many thanks @kpym. short and accurate

    – ecjb
    Dec 31 '18 at 17:57







1




1





The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

– Kpym
Dec 31 '18 at 14:48





The first (non optional) argument of stencilptbig is the node position. Change -1,0 to -2,0 and 1,0 to 2,0. Or you can scale down the nodes (for example with using scale=.5).

– Kpym
Dec 31 '18 at 14:48













Many thanks @kpym. short and accurate

– ecjb
Dec 31 '18 at 17:57





Many thanks @kpym. short and accurate

– ecjb
Dec 31 '18 at 17:57










1 Answer
1






active

oldest

votes


















6














Kpym already gave you a nice solution for your problem. I am writing this answer in order to persuade you to use a different syntax. Rather than defining a new command, you may just define a node style, and use positioning for relative positioning. (If you have many of these nodes, you may want look into chains, but here it would be a bit of an overkill IMHO.)



documentclass[a4paper, 12pt]book
usepackagetikz
usetikzlibrarypositioning
begindocument
begintikzpicture[stencilptbig/.style=circle,draw,inner sep=0.1em, outer
sep=0pt, minimum size=0.7cm,font=scriptsize,
node distance=2mm]
node[stencilptbig] (i-1) $frac1h^2+frac32h$;
node[stencilptbig,right=of i-1] (i) $frac-2h^2$;
node[stencilptbig,right=of i] (i+1)$frac1h^2-frac32h$;
draw (i-1) -- (i) (i) -- (i+1);
endtikzpicture
enddocument


enter image description here



If you want to change the gaps, just adjust node distance.






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%2f468036%2ftikz-increase-the-spacing-between-the-nodes%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









    6














    Kpym already gave you a nice solution for your problem. I am writing this answer in order to persuade you to use a different syntax. Rather than defining a new command, you may just define a node style, and use positioning for relative positioning. (If you have many of these nodes, you may want look into chains, but here it would be a bit of an overkill IMHO.)



    documentclass[a4paper, 12pt]book
    usepackagetikz
    usetikzlibrarypositioning
    begindocument
    begintikzpicture[stencilptbig/.style=circle,draw,inner sep=0.1em, outer
    sep=0pt, minimum size=0.7cm,font=scriptsize,
    node distance=2mm]
    node[stencilptbig] (i-1) $frac1h^2+frac32h$;
    node[stencilptbig,right=of i-1] (i) $frac-2h^2$;
    node[stencilptbig,right=of i] (i+1)$frac1h^2-frac32h$;
    draw (i-1) -- (i) (i) -- (i+1);
    endtikzpicture
    enddocument


    enter image description here



    If you want to change the gaps, just adjust node distance.






    share|improve this answer





























      6














      Kpym already gave you a nice solution for your problem. I am writing this answer in order to persuade you to use a different syntax. Rather than defining a new command, you may just define a node style, and use positioning for relative positioning. (If you have many of these nodes, you may want look into chains, but here it would be a bit of an overkill IMHO.)



      documentclass[a4paper, 12pt]book
      usepackagetikz
      usetikzlibrarypositioning
      begindocument
      begintikzpicture[stencilptbig/.style=circle,draw,inner sep=0.1em, outer
      sep=0pt, minimum size=0.7cm,font=scriptsize,
      node distance=2mm]
      node[stencilptbig] (i-1) $frac1h^2+frac32h$;
      node[stencilptbig,right=of i-1] (i) $frac-2h^2$;
      node[stencilptbig,right=of i] (i+1)$frac1h^2-frac32h$;
      draw (i-1) -- (i) (i) -- (i+1);
      endtikzpicture
      enddocument


      enter image description here



      If you want to change the gaps, just adjust node distance.






      share|improve this answer



























        6












        6








        6







        Kpym already gave you a nice solution for your problem. I am writing this answer in order to persuade you to use a different syntax. Rather than defining a new command, you may just define a node style, and use positioning for relative positioning. (If you have many of these nodes, you may want look into chains, but here it would be a bit of an overkill IMHO.)



        documentclass[a4paper, 12pt]book
        usepackagetikz
        usetikzlibrarypositioning
        begindocument
        begintikzpicture[stencilptbig/.style=circle,draw,inner sep=0.1em, outer
        sep=0pt, minimum size=0.7cm,font=scriptsize,
        node distance=2mm]
        node[stencilptbig] (i-1) $frac1h^2+frac32h$;
        node[stencilptbig,right=of i-1] (i) $frac-2h^2$;
        node[stencilptbig,right=of i] (i+1)$frac1h^2-frac32h$;
        draw (i-1) -- (i) (i) -- (i+1);
        endtikzpicture
        enddocument


        enter image description here



        If you want to change the gaps, just adjust node distance.






        share|improve this answer















        Kpym already gave you a nice solution for your problem. I am writing this answer in order to persuade you to use a different syntax. Rather than defining a new command, you may just define a node style, and use positioning for relative positioning. (If you have many of these nodes, you may want look into chains, but here it would be a bit of an overkill IMHO.)



        documentclass[a4paper, 12pt]book
        usepackagetikz
        usetikzlibrarypositioning
        begindocument
        begintikzpicture[stencilptbig/.style=circle,draw,inner sep=0.1em, outer
        sep=0pt, minimum size=0.7cm,font=scriptsize,
        node distance=2mm]
        node[stencilptbig] (i-1) $frac1h^2+frac32h$;
        node[stencilptbig,right=of i-1] (i) $frac-2h^2$;
        node[stencilptbig,right=of i] (i+1)$frac1h^2-frac32h$;
        draw (i-1) -- (i) (i) -- (i+1);
        endtikzpicture
        enddocument


        enter image description here



        If you want to change the gaps, just adjust node distance.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 31 '18 at 16:10

























        answered Dec 31 '18 at 15:43









        marmotmarmot

        91.1k4105198




        91.1k4105198



























            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%2f468036%2ftikz-increase-the-spacing-between-the-nodes%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 check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?