Creating a node
I am trying to create a node as shown in the below figure. Could anyone help me how to create it?
Thank you in advance
tikz-pgf tikz-node
add a comment |
I am trying to create a node as shown in the below figure. Could anyone help me how to create it?
Thank you in advance
tikz-pgf tikz-node
add a comment |
I am trying to create a node as shown in the below figure. Could anyone help me how to create it?
Thank you in advance
tikz-pgf tikz-node
I am trying to create a node as shown in the below figure. Could anyone help me how to create it?
Thank you in advance
tikz-pgf tikz-node
tikz-pgf tikz-node
edited 18 hours ago
JouleV
8,15222153
8,15222153
asked 19 hours ago
Akhilesh ThotharaAkhilesh Thothara
191
191
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}
node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{nodepart{two}ReadInput};
end{tikzpicture}
end{document}
Update:
Following code shows an improved version of previous code. It shows font and colors more similar to OP's example.
A second solution is also provided. This one uses a regular node with larger inner xsep
and a path picture
option which draws inner lines. This solution avoids to use nodepart{two}
inside node's contents and offers a better control over size of lateral boxes.
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}[
mynode/.style={
rectangle split,
rectangle split parts=3,
rectangle split horizontal,
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange
}
]
node[mynode]{nodepart{two}ReadInput};
end{tikzpicture}
begin{tikzpicture}[
mynode/.style={
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange,
inner xsep=4mm,
path picture={%
draw ([xshift=-2mm]path picture bounding box.north east)--([xshift=-2mm]path picture bounding box.south east);
draw ([xshift=2mm]path picture bounding box.north west)--([xshift=2mm]path picture bounding box.south west);},
}
]
node[mynode]{ReadInput};
end{tikzpicture}
end{document}
1
Here are some suggestions: I think the second part should be of fixed width, the font should be insffamily
and the node should have a shade color. Anyway, +1 :)
– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can useminimum width
ortext width
options.
– Ignasi
14 hours ago
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%2f481474%2fcreating-a-node%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
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}
node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{nodepart{two}ReadInput};
end{tikzpicture}
end{document}
Update:
Following code shows an improved version of previous code. It shows font and colors more similar to OP's example.
A second solution is also provided. This one uses a regular node with larger inner xsep
and a path picture
option which draws inner lines. This solution avoids to use nodepart{two}
inside node's contents and offers a better control over size of lateral boxes.
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}[
mynode/.style={
rectangle split,
rectangle split parts=3,
rectangle split horizontal,
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange
}
]
node[mynode]{nodepart{two}ReadInput};
end{tikzpicture}
begin{tikzpicture}[
mynode/.style={
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange,
inner xsep=4mm,
path picture={%
draw ([xshift=-2mm]path picture bounding box.north east)--([xshift=-2mm]path picture bounding box.south east);
draw ([xshift=2mm]path picture bounding box.north west)--([xshift=2mm]path picture bounding box.south west);},
}
]
node[mynode]{ReadInput};
end{tikzpicture}
end{document}
1
Here are some suggestions: I think the second part should be of fixed width, the font should be insffamily
and the node should have a shade color. Anyway, +1 :)
– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can useminimum width
ortext width
options.
– Ignasi
14 hours ago
add a comment |
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}
node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{nodepart{two}ReadInput};
end{tikzpicture}
end{document}
Update:
Following code shows an improved version of previous code. It shows font and colors more similar to OP's example.
A second solution is also provided. This one uses a regular node with larger inner xsep
and a path picture
option which draws inner lines. This solution avoids to use nodepart{two}
inside node's contents and offers a better control over size of lateral boxes.
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}[
mynode/.style={
rectangle split,
rectangle split parts=3,
rectangle split horizontal,
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange
}
]
node[mynode]{nodepart{two}ReadInput};
end{tikzpicture}
begin{tikzpicture}[
mynode/.style={
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange,
inner xsep=4mm,
path picture={%
draw ([xshift=-2mm]path picture bounding box.north east)--([xshift=-2mm]path picture bounding box.south east);
draw ([xshift=2mm]path picture bounding box.north west)--([xshift=2mm]path picture bounding box.south west);},
}
]
node[mynode]{ReadInput};
end{tikzpicture}
end{document}
1
Here are some suggestions: I think the second part should be of fixed width, the font should be insffamily
and the node should have a shade color. Anyway, +1 :)
– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can useminimum width
ortext width
options.
– Ignasi
14 hours ago
add a comment |
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}
node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{nodepart{two}ReadInput};
end{tikzpicture}
end{document}
Update:
Following code shows an improved version of previous code. It shows font and colors more similar to OP's example.
A second solution is also provided. This one uses a regular node with larger inner xsep
and a path picture
option which draws inner lines. This solution avoids to use nodepart{two}
inside node's contents and offers a better control over size of lateral boxes.
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}[
mynode/.style={
rectangle split,
rectangle split parts=3,
rectangle split horizontal,
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange
}
]
node[mynode]{nodepart{two}ReadInput};
end{tikzpicture}
begin{tikzpicture}[
mynode/.style={
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange,
inner xsep=4mm,
path picture={%
draw ([xshift=-2mm]path picture bounding box.north east)--([xshift=-2mm]path picture bounding box.south east);
draw ([xshift=2mm]path picture bounding box.north west)--([xshift=2mm]path picture bounding box.south west);},
}
]
node[mynode]{ReadInput};
end{tikzpicture}
end{document}
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}
node[rectangle split, rectangle split parts=3, rectangle split horizontal, draw]{nodepart{two}ReadInput};
end{tikzpicture}
end{document}
Update:
Following code shows an improved version of previous code. It shows font and colors more similar to OP's example.
A second solution is also provided. This one uses a regular node with larger inner xsep
and a path picture
option which draws inner lines. This solution avoids to use nodepart{two}
inside node's contents and offers a better control over size of lateral boxes.
documentclass[tikz,border=2mm]{standalone}
usetikzlibrary{positioning, shapes.multipart}
begin{document}
begin{tikzpicture}[
mynode/.style={
rectangle split,
rectangle split parts=3,
rectangle split horizontal,
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange
}
]
node[mynode]{nodepart{two}ReadInput};
end{tikzpicture}
begin{tikzpicture}[
mynode/.style={
font=sffamily,
color = cyan!80!black,
draw,
top color=white,
bottom color=orange,
inner xsep=4mm,
path picture={%
draw ([xshift=-2mm]path picture bounding box.north east)--([xshift=-2mm]path picture bounding box.south east);
draw ([xshift=2mm]path picture bounding box.north west)--([xshift=2mm]path picture bounding box.south west);},
}
]
node[mynode]{ReadInput};
end{tikzpicture}
end{document}
edited 16 hours ago
answered 18 hours ago
IgnasiIgnasi
95.3k4175319
95.3k4175319
1
Here are some suggestions: I think the second part should be of fixed width, the font should be insffamily
and the node should have a shade color. Anyway, +1 :)
– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can useminimum width
ortext width
options.
– Ignasi
14 hours ago
add a comment |
1
Here are some suggestions: I think the second part should be of fixed width, the font should be insffamily
and the node should have a shade color. Anyway, +1 :)
– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can useminimum width
ortext width
options.
– Ignasi
14 hours ago
1
1
Here are some suggestions: I think the second part should be of fixed width, the font should be in
sffamily
and the node should have a shade color. Anyway, +1 :)– JouleV
17 hours ago
Here are some suggestions: I think the second part should be of fixed width, the font should be in
sffamily
and the node should have a shade color. Anyway, +1 :)– JouleV
17 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
Thanks for your solution.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
How do I change the width of the rectangles on the end.
– Akhilesh Thothara
15 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can use
minimum width
or text width
options.– Ignasi
14 hours ago
@AkhileshThothara On second solution, the width is automaticaly adjusted to text width, but if you want to impose some width you can use
minimum width
or text width
options.– Ignasi
14 hours ago
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%2f481474%2fcreating-a-node%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