How to draw the diamond structure using `chains`?
I am using chains
to re-draw the structure (shown below) in Second isomorphism theorem(wiki).
The code and the resulting figure is shown as follows.
How to get rid of the dummy node (added for alignment) and the unnecessary join
lines between it and the node hn
and hcapn
, respectively?
documentclass[tikz]{standalone}
usetikzlibrary{chains, scopes}
begin{document}
begin{tikzpicture}[every on chain/.style = join, every join/.style = -, node distance = 0.8cm and 1.0cm]
{
[start chain = G going below] % G chain
node (g) [on chain] {$G$};
node (hn) [on chain, below = 0.50cm of g] {$HN$};
{ [start branch = H going below left] % H branch
node (h) [on chain] {$H$};
}
{ [start branch = N going below right] % N branch
node [on chain] {$N$};
}
node [on chain] {}; % dummy node % continue G chain
node (hcapn) [on chain, join = with G/H-end, join = with G/N-end] {$H cap N$};
node (e) [on chain, below = 0.50cm of hcapn] {${ e }$};
}
end{tikzpicture}
end{document}
tikz-pgf tikz-chains
add a comment |
I am using chains
to re-draw the structure (shown below) in Second isomorphism theorem(wiki).
The code and the resulting figure is shown as follows.
How to get rid of the dummy node (added for alignment) and the unnecessary join
lines between it and the node hn
and hcapn
, respectively?
documentclass[tikz]{standalone}
usetikzlibrary{chains, scopes}
begin{document}
begin{tikzpicture}[every on chain/.style = join, every join/.style = -, node distance = 0.8cm and 1.0cm]
{
[start chain = G going below] % G chain
node (g) [on chain] {$G$};
node (hn) [on chain, below = 0.50cm of g] {$HN$};
{ [start branch = H going below left] % H branch
node (h) [on chain] {$H$};
}
{ [start branch = N going below right] % N branch
node [on chain] {$N$};
}
node [on chain] {}; % dummy node % continue G chain
node (hcapn) [on chain, join = with G/H-end, join = with G/N-end] {$H cap N$};
node (e) [on chain, below = 0.50cm of hcapn] {${ e }$};
}
end{tikzpicture}
end{document}
tikz-pgf tikz-chains
add a comment |
I am using chains
to re-draw the structure (shown below) in Second isomorphism theorem(wiki).
The code and the resulting figure is shown as follows.
How to get rid of the dummy node (added for alignment) and the unnecessary join
lines between it and the node hn
and hcapn
, respectively?
documentclass[tikz]{standalone}
usetikzlibrary{chains, scopes}
begin{document}
begin{tikzpicture}[every on chain/.style = join, every join/.style = -, node distance = 0.8cm and 1.0cm]
{
[start chain = G going below] % G chain
node (g) [on chain] {$G$};
node (hn) [on chain, below = 0.50cm of g] {$HN$};
{ [start branch = H going below left] % H branch
node (h) [on chain] {$H$};
}
{ [start branch = N going below right] % N branch
node [on chain] {$N$};
}
node [on chain] {}; % dummy node % continue G chain
node (hcapn) [on chain, join = with G/H-end, join = with G/N-end] {$H cap N$};
node (e) [on chain, below = 0.50cm of hcapn] {${ e }$};
}
end{tikzpicture}
end{document}
tikz-pgf tikz-chains
I am using chains
to re-draw the structure (shown below) in Second isomorphism theorem(wiki).
The code and the resulting figure is shown as follows.
How to get rid of the dummy node (added for alignment) and the unnecessary join
lines between it and the node hn
and hcapn
, respectively?
documentclass[tikz]{standalone}
usetikzlibrary{chains, scopes}
begin{document}
begin{tikzpicture}[every on chain/.style = join, every join/.style = -, node distance = 0.8cm and 1.0cm]
{
[start chain = G going below] % G chain
node (g) [on chain] {$G$};
node (hn) [on chain, below = 0.50cm of g] {$HN$};
{ [start branch = H going below left] % H branch
node (h) [on chain] {$H$};
}
{ [start branch = N going below right] % N branch
node [on chain] {$N$};
}
node [on chain] {}; % dummy node % continue G chain
node (hcapn) [on chain, join = with G/H-end, join = with G/N-end] {$H cap N$};
node (e) [on chain, below = 0.50cm of hcapn] {${ e }$};
}
end{tikzpicture}
end{document}
tikz-pgf tikz-chains
tikz-pgf tikz-chains
asked 2 days ago
hengxinhengxin
1,0282926
1,0282926
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
with chain, but two nodes are excluded in join macro and for it the connection is drawn separately:
documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{chains, positioning, shapes.geometric}
makeatletter
tikzset{suspend join/.code={deftikz@after@path{}}}
makeatother
begin{document}
begin{tikzpicture}[
node distance = 8mm and 10 mm,
start chain = going below,
N/.style = {ellipse, draw, inner sep=2pt, on chain, join=by -}]
node (g) [N] {$G$};
node (hn) [N] {$HN$};
node (h) [N, below left=of hn] {$H$};
node (hcapn) [N, below=of h -| hn] {$H cap N$};
node (e) [N] {${ e }$};
%
node (n) [N,suspend join,
below right=of hn] {$N$};
node [below=of hn] {$cong$};
draw (hn) -- (n) (n) -- (hcapn);
end{tikzpicture}
end{document}
Why is it that an identical definition ofsuspend join
can be found e.g. in Heiko Oberdiek's answer?
– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
add a comment |
If you want to replicate the linked picture, I propose this
documentclass[tikz]{standalone}
usetikzlibrary{shapes,fit}
usepackage{mathptmx}
begin{document}
begin{tikzpicture}[x=1.75cm,y=1.75cm]
begin{scope}[every node/.style={draw,circle,minimum size=1cm}]
node (g) at (0,2) {$G$};
node (sn) at (0,1) {$SN$};
node (n) at (-1,0) {$N$};
node (s) at (1,0) {$S$};
node[ellipse,draw,minimum height=1cm] (scn) at (0,-1) {$Scap N$};
node (e) at (0,-2) {${e}$};
end{scope}
draw (g)--(sn)--(n)--(scn)--(e) (scn)--(s)--(sn);
node[rotate=-45,ellipse,draw,dashed,inner xsep=-7mm,inner ysep=-1mm,fit=(sn)(n)] {};
node[rotate=-45,ellipse,draw,dashed,inner xsep=-9mm,inner ysep=1mm,fit=(scn)(s)] {};
node {$cong$};
end{tikzpicture}
end{document}
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%2f482371%2fhow-to-draw-the-diamond-structure-using-chains%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
with chain, but two nodes are excluded in join macro and for it the connection is drawn separately:
documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{chains, positioning, shapes.geometric}
makeatletter
tikzset{suspend join/.code={deftikz@after@path{}}}
makeatother
begin{document}
begin{tikzpicture}[
node distance = 8mm and 10 mm,
start chain = going below,
N/.style = {ellipse, draw, inner sep=2pt, on chain, join=by -}]
node (g) [N] {$G$};
node (hn) [N] {$HN$};
node (h) [N, below left=of hn] {$H$};
node (hcapn) [N, below=of h -| hn] {$H cap N$};
node (e) [N] {${ e }$};
%
node (n) [N,suspend join,
below right=of hn] {$N$};
node [below=of hn] {$cong$};
draw (hn) -- (n) (n) -- (hcapn);
end{tikzpicture}
end{document}
Why is it that an identical definition ofsuspend join
can be found e.g. in Heiko Oberdiek's answer?
– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
add a comment |
with chain, but two nodes are excluded in join macro and for it the connection is drawn separately:
documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{chains, positioning, shapes.geometric}
makeatletter
tikzset{suspend join/.code={deftikz@after@path{}}}
makeatother
begin{document}
begin{tikzpicture}[
node distance = 8mm and 10 mm,
start chain = going below,
N/.style = {ellipse, draw, inner sep=2pt, on chain, join=by -}]
node (g) [N] {$G$};
node (hn) [N] {$HN$};
node (h) [N, below left=of hn] {$H$};
node (hcapn) [N, below=of h -| hn] {$H cap N$};
node (e) [N] {${ e }$};
%
node (n) [N,suspend join,
below right=of hn] {$N$};
node [below=of hn] {$cong$};
draw (hn) -- (n) (n) -- (hcapn);
end{tikzpicture}
end{document}
Why is it that an identical definition ofsuspend join
can be found e.g. in Heiko Oberdiek's answer?
– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
add a comment |
with chain, but two nodes are excluded in join macro and for it the connection is drawn separately:
documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{chains, positioning, shapes.geometric}
makeatletter
tikzset{suspend join/.code={deftikz@after@path{}}}
makeatother
begin{document}
begin{tikzpicture}[
node distance = 8mm and 10 mm,
start chain = going below,
N/.style = {ellipse, draw, inner sep=2pt, on chain, join=by -}]
node (g) [N] {$G$};
node (hn) [N] {$HN$};
node (h) [N, below left=of hn] {$H$};
node (hcapn) [N, below=of h -| hn] {$H cap N$};
node (e) [N] {${ e }$};
%
node (n) [N,suspend join,
below right=of hn] {$N$};
node [below=of hn] {$cong$};
draw (hn) -- (n) (n) -- (hcapn);
end{tikzpicture}
end{document}
with chain, but two nodes are excluded in join macro and for it the connection is drawn separately:
documentclass[tikz, margin=3mm]{standalone}
usetikzlibrary{chains, positioning, shapes.geometric}
makeatletter
tikzset{suspend join/.code={deftikz@after@path{}}}
makeatother
begin{document}
begin{tikzpicture}[
node distance = 8mm and 10 mm,
start chain = going below,
N/.style = {ellipse, draw, inner sep=2pt, on chain, join=by -}]
node (g) [N] {$G$};
node (hn) [N] {$HN$};
node (h) [N, below left=of hn] {$H$};
node (hcapn) [N, below=of h -| hn] {$H cap N$};
node (e) [N] {${ e }$};
%
node (n) [N,suspend join,
below right=of hn] {$N$};
node [below=of hn] {$cong$};
draw (hn) -- (n) (n) -- (hcapn);
end{tikzpicture}
end{document}
edited 2 days ago
answered 2 days ago
ZarkoZarko
129k868169
129k868169
Why is it that an identical definition ofsuspend join
can be found e.g. in Heiko Oberdiek's answer?
– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
add a comment |
Why is it that an identical definition ofsuspend join
can be found e.g. in Heiko Oberdiek's answer?
– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
Why is it that an identical definition of
suspend join
can be found e.g. in Heiko Oberdiek's answer?– marmot
2 days ago
Why is it that an identical definition of
suspend join
can be found e.g. in Heiko Oberdiek's answer?– marmot
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
i didn't invent this definition. i obtained it from some Ulrike Fisher answer (many) years ago. what you like to tel me with your comment?
– Zarko
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
What I want to say is: imagine you had invented this definition, and someone else, let's say I, would use it to answer a question that reads "How to get rid of the dummy node (added for alignment) and the unnecessary join lines between it and the node hn and hcapn, respectively?". Wouldn't you like it much better if the other user, let's say I, would say "I am going to use a definition invented by Zarko..." better?
– marmot
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
@marmot, no, i'm not sensitive to do this. and on the another hand, to give credits to all where i find some interesting solution is almost impossible. how do i should remember all answers which i read (few thousands till now) ? i store in my latex corner only some of attractive (to me) solutions, but my evidence, where i find them is very poor :-(. best regards!
– Zarko
2 days ago
add a comment |
If you want to replicate the linked picture, I propose this
documentclass[tikz]{standalone}
usetikzlibrary{shapes,fit}
usepackage{mathptmx}
begin{document}
begin{tikzpicture}[x=1.75cm,y=1.75cm]
begin{scope}[every node/.style={draw,circle,minimum size=1cm}]
node (g) at (0,2) {$G$};
node (sn) at (0,1) {$SN$};
node (n) at (-1,0) {$N$};
node (s) at (1,0) {$S$};
node[ellipse,draw,minimum height=1cm] (scn) at (0,-1) {$Scap N$};
node (e) at (0,-2) {${e}$};
end{scope}
draw (g)--(sn)--(n)--(scn)--(e) (scn)--(s)--(sn);
node[rotate=-45,ellipse,draw,dashed,inner xsep=-7mm,inner ysep=-1mm,fit=(sn)(n)] {};
node[rotate=-45,ellipse,draw,dashed,inner xsep=-9mm,inner ysep=1mm,fit=(scn)(s)] {};
node {$cong$};
end{tikzpicture}
end{document}
add a comment |
If you want to replicate the linked picture, I propose this
documentclass[tikz]{standalone}
usetikzlibrary{shapes,fit}
usepackage{mathptmx}
begin{document}
begin{tikzpicture}[x=1.75cm,y=1.75cm]
begin{scope}[every node/.style={draw,circle,minimum size=1cm}]
node (g) at (0,2) {$G$};
node (sn) at (0,1) {$SN$};
node (n) at (-1,0) {$N$};
node (s) at (1,0) {$S$};
node[ellipse,draw,minimum height=1cm] (scn) at (0,-1) {$Scap N$};
node (e) at (0,-2) {${e}$};
end{scope}
draw (g)--(sn)--(n)--(scn)--(e) (scn)--(s)--(sn);
node[rotate=-45,ellipse,draw,dashed,inner xsep=-7mm,inner ysep=-1mm,fit=(sn)(n)] {};
node[rotate=-45,ellipse,draw,dashed,inner xsep=-9mm,inner ysep=1mm,fit=(scn)(s)] {};
node {$cong$};
end{tikzpicture}
end{document}
add a comment |
If you want to replicate the linked picture, I propose this
documentclass[tikz]{standalone}
usetikzlibrary{shapes,fit}
usepackage{mathptmx}
begin{document}
begin{tikzpicture}[x=1.75cm,y=1.75cm]
begin{scope}[every node/.style={draw,circle,minimum size=1cm}]
node (g) at (0,2) {$G$};
node (sn) at (0,1) {$SN$};
node (n) at (-1,0) {$N$};
node (s) at (1,0) {$S$};
node[ellipse,draw,minimum height=1cm] (scn) at (0,-1) {$Scap N$};
node (e) at (0,-2) {${e}$};
end{scope}
draw (g)--(sn)--(n)--(scn)--(e) (scn)--(s)--(sn);
node[rotate=-45,ellipse,draw,dashed,inner xsep=-7mm,inner ysep=-1mm,fit=(sn)(n)] {};
node[rotate=-45,ellipse,draw,dashed,inner xsep=-9mm,inner ysep=1mm,fit=(scn)(s)] {};
node {$cong$};
end{tikzpicture}
end{document}
If you want to replicate the linked picture, I propose this
documentclass[tikz]{standalone}
usetikzlibrary{shapes,fit}
usepackage{mathptmx}
begin{document}
begin{tikzpicture}[x=1.75cm,y=1.75cm]
begin{scope}[every node/.style={draw,circle,minimum size=1cm}]
node (g) at (0,2) {$G$};
node (sn) at (0,1) {$SN$};
node (n) at (-1,0) {$N$};
node (s) at (1,0) {$S$};
node[ellipse,draw,minimum height=1cm] (scn) at (0,-1) {$Scap N$};
node (e) at (0,-2) {${e}$};
end{scope}
draw (g)--(sn)--(n)--(scn)--(e) (scn)--(s)--(sn);
node[rotate=-45,ellipse,draw,dashed,inner xsep=-7mm,inner ysep=-1mm,fit=(sn)(n)] {};
node[rotate=-45,ellipse,draw,dashed,inner xsep=-9mm,inner ysep=1mm,fit=(scn)(s)] {};
node {$cong$};
end{tikzpicture}
end{document}
answered 2 days ago
JouleVJouleV
9,91322558
9,91322558
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%2f482371%2fhow-to-draw-the-diamond-structure-using-chains%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