tikz: increase the spacing between the nodes
Clash Royale CLAN TAG#URR8PPP
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
tikz-pgf
add a comment |
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
tikz-pgf
1
The first (non optional) argument ofstencilptbig
is the node position. Change-1,0
to-2,0
and1,0
to2,0
. Or you can scale down the nodes (for example with usingscale=.5
).
– Kpym
Dec 31 '18 at 14:48
Many thanks @kpym. short and accurate
– ecjb
Dec 31 '18 at 17:57
add a comment |
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
tikz-pgf
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
tikz-pgf
tikz-pgf
asked Dec 31 '18 at 14:29
ecjbecjb
1956
1956
1
The first (non optional) argument ofstencilptbig
is the node position. Change-1,0
to-2,0
and1,0
to2,0
. Or you can scale down the nodes (for example with usingscale=.5
).
– Kpym
Dec 31 '18 at 14:48
Many thanks @kpym. short and accurate
– ecjb
Dec 31 '18 at 17:57
add a comment |
1
The first (non optional) argument ofstencilptbig
is the node position. Change-1,0
to-2,0
and1,0
to2,0
. Or you can scale down the nodes (for example with usingscale=.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
add a comment |
1 Answer
1
active
oldest
votes
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
If you want to change the gaps, just adjust node distance
.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
If you want to change the gaps, just adjust node distance
.
add a comment |
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
If you want to change the gaps, just adjust node distance
.
add a comment |
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
If you want to change the gaps, just adjust node distance
.
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
If you want to change the gaps, just adjust node distance
.
edited Dec 31 '18 at 16:10
answered Dec 31 '18 at 15:43
marmotmarmot
91.1k4105198
91.1k4105198
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
The first (non optional) argument of
stencilptbig
is the node position. Change-1,0
to-2,0
and1,0
to2,0
. Or you can scale down the nodes (for example with usingscale=.5
).– Kpym
Dec 31 '18 at 14:48
Many thanks @kpym. short and accurate
– ecjb
Dec 31 '18 at 17:57