Globular 3-cells and higher diagrams in xy-picHow to nest xymatrix in Xy-picBending snakes with xy-picNested...
Learning to quickly identify valid fingering for piano?
A bug in Excel? Conditional formatting for marking duplicates also highlights unique value
Convert an array of objects to array of the objects' values
Can a Tiny Servant be used as a messenger?
Where is the fallacy here?
How can friction do no work in case of pure rolling?
What is the meaning of "producing negative zeroes" in a system that doesn't support it?
What's the best tool for cutting holes into duct work?
Create chunks from an array
Adjust starting of second line
Being asked to review a paper in conference one has submitted to
What kind of inflection is occuring in passive vb + かかった?
3.5% Interest Student Loan or use all of my savings on Tuition?
Why can't we use freedom of speech and expression to incite people to rebel against government?
“I had a flat in the centre of town, but I didn’t like living there, so …”
Why would the IRS ask for birth certificates or even audit a small tax return?
Deal the cards to the players
An Undercover Army
Caulking a corner instead of taping with joint compound?
Is there a way to find out the age of climbing ropes?
GPL code private and stolen
« Rendre » et « render » (the meaning)
Remove object from array based on array of some property of that object
Should we avoid writing fiction about historical events without extensive research?
Globular 3-cells and higher diagrams in xy-pic
How to nest xymatrix in Xy-picBending snakes with xy-picNested xy-pic diagramsQuestion about rotatebox and xy pic2-cells in xy-pic annoying problemDrawing diagrams of higher categories with TikZstack in xy-picHow to draw the Dynkin diagrams by the Xy-pic package?Bending arrows in xy-picDiagrams and xy-pic package
Is there a nice/standardized way to format globular 3-cells in xy-pic
the same way we can with 2-cells?
For 2-cells the command rtwocell
generates the required arrows, and a modification that allows one to type rncell
for natural numbers n would be incredible for writing category theory papers and nLab pages.
I found a page describing how to define globular 3-cells back in 2004, but xy-pic
appears to have changed syntax significantly since then (or at least I am too green behind the ears to read the code there and translate it to something that works in my version of xy-pic
). Can someone more knowledgable in LaTeX renovate these codes to work with modern xy-pic
syntax?
Any strategy that generalizes to higher cells with arrows between arrows between arrows between... would be beautiful, but a solution for 3-cells is still greatly appreciated. Also please note that tikz
solutions will be somewhat incomprehensible to me due to a lack of familiarity with the syntax, however, if there is no xy-pic
solution (and no kind samaritan willing to create one) and tikz
has an elegant solution on hand I can learn some new syntax and use a tikz
diagram.
The following code
xymatrix@R5mm@C10mm{ & ar@{=>}@/^.7pc/[dd]^Theta ar@{=>}@/_.7pc/[dd]_{;;;Theta'} \ A ar@/^2.0pc/[rr]^F ar@/_2.1pc/[rr]_G & {substack{mathscr{M} \ rightsquigarrow}} & B \ & }
generates the diagram below
and it's relatively straightforward (but time-consuming) to generalize further, but this is pretty hacked together and very time consuming for larger diagrams so a more elegant solution would still be greatly appreciated.
diagrams xy-pic
add a comment |
Is there a nice/standardized way to format globular 3-cells in xy-pic
the same way we can with 2-cells?
For 2-cells the command rtwocell
generates the required arrows, and a modification that allows one to type rncell
for natural numbers n would be incredible for writing category theory papers and nLab pages.
I found a page describing how to define globular 3-cells back in 2004, but xy-pic
appears to have changed syntax significantly since then (or at least I am too green behind the ears to read the code there and translate it to something that works in my version of xy-pic
). Can someone more knowledgable in LaTeX renovate these codes to work with modern xy-pic
syntax?
Any strategy that generalizes to higher cells with arrows between arrows between arrows between... would be beautiful, but a solution for 3-cells is still greatly appreciated. Also please note that tikz
solutions will be somewhat incomprehensible to me due to a lack of familiarity with the syntax, however, if there is no xy-pic
solution (and no kind samaritan willing to create one) and tikz
has an elegant solution on hand I can learn some new syntax and use a tikz
diagram.
The following code
xymatrix@R5mm@C10mm{ & ar@{=>}@/^.7pc/[dd]^Theta ar@{=>}@/_.7pc/[dd]_{;;;Theta'} \ A ar@/^2.0pc/[rr]^F ar@/_2.1pc/[rr]_G & {substack{mathscr{M} \ rightsquigarrow}} & B \ & }
generates the diagram below
and it's relatively straightforward (but time-consuming) to generalize further, but this is pretty hacked together and very time consuming for larger diagrams so a more elegant solution would still be greatly appreciated.
diagrams xy-pic
add a comment |
Is there a nice/standardized way to format globular 3-cells in xy-pic
the same way we can with 2-cells?
For 2-cells the command rtwocell
generates the required arrows, and a modification that allows one to type rncell
for natural numbers n would be incredible for writing category theory papers and nLab pages.
I found a page describing how to define globular 3-cells back in 2004, but xy-pic
appears to have changed syntax significantly since then (or at least I am too green behind the ears to read the code there and translate it to something that works in my version of xy-pic
). Can someone more knowledgable in LaTeX renovate these codes to work with modern xy-pic
syntax?
Any strategy that generalizes to higher cells with arrows between arrows between arrows between... would be beautiful, but a solution for 3-cells is still greatly appreciated. Also please note that tikz
solutions will be somewhat incomprehensible to me due to a lack of familiarity with the syntax, however, if there is no xy-pic
solution (and no kind samaritan willing to create one) and tikz
has an elegant solution on hand I can learn some new syntax and use a tikz
diagram.
The following code
xymatrix@R5mm@C10mm{ & ar@{=>}@/^.7pc/[dd]^Theta ar@{=>}@/_.7pc/[dd]_{;;;Theta'} \ A ar@/^2.0pc/[rr]^F ar@/_2.1pc/[rr]_G & {substack{mathscr{M} \ rightsquigarrow}} & B \ & }
generates the diagram below
and it's relatively straightforward (but time-consuming) to generalize further, but this is pretty hacked together and very time consuming for larger diagrams so a more elegant solution would still be greatly appreciated.
diagrams xy-pic
Is there a nice/standardized way to format globular 3-cells in xy-pic
the same way we can with 2-cells?
For 2-cells the command rtwocell
generates the required arrows, and a modification that allows one to type rncell
for natural numbers n would be incredible for writing category theory papers and nLab pages.
I found a page describing how to define globular 3-cells back in 2004, but xy-pic
appears to have changed syntax significantly since then (or at least I am too green behind the ears to read the code there and translate it to something that works in my version of xy-pic
). Can someone more knowledgable in LaTeX renovate these codes to work with modern xy-pic
syntax?
Any strategy that generalizes to higher cells with arrows between arrows between arrows between... would be beautiful, but a solution for 3-cells is still greatly appreciated. Also please note that tikz
solutions will be somewhat incomprehensible to me due to a lack of familiarity with the syntax, however, if there is no xy-pic
solution (and no kind samaritan willing to create one) and tikz
has an elegant solution on hand I can learn some new syntax and use a tikz
diagram.
The following code
xymatrix@R5mm@C10mm{ & ar@{=>}@/^.7pc/[dd]^Theta ar@{=>}@/_.7pc/[dd]_{;;;Theta'} \ A ar@/^2.0pc/[rr]^F ar@/_2.1pc/[rr]_G & {substack{mathscr{M} \ rightsquigarrow}} & B \ & }
generates the diagram below
and it's relatively straightforward (but time-consuming) to generalize further, but this is pretty hacked together and very time consuming for larger diagrams so a more elegant solution would still be greatly appreciated.
diagrams xy-pic
diagrams xy-pic
edited 21 hours ago
CarLaTeX
32.8k551136
32.8k551136
asked Mar 3 at 21:27
Alec RheaAlec Rhea
1255
1255
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
With tikz-cd
it is not difficult.
The &
are used to separate the cells (and \
to separate the rows, if you have more rows).
arrow[rr, bend left=40, "F", ""{name=U}]
means "draw an arrow, bent to the left of 40 degrees, with the label "F" and call the middle point "U"."
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
means "draw a Rightarrow, labelling it with Theta
, shortening a bit (2pt) the tip and the tail of the arrow, bending to the left from the point called "U" to the point called "D"."
I don't know anything about Globular diagrams, I've just written an example of how to use tikz-cd
.
Edit: for peculiar cases, a pure TikZ solution may be convenient.
I've added one with a TikZ matrix
. If you use it without loading tikz-cd
, you have to load usetikzlibrary{matrix}
.
You can refer to the matrix cells with matrixname-rownumber-columnnumber
.
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
means "position the node UP
16pt above of mymatr
, since the node has an empty text, I've given it an height with inner sep=12pt
."
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
means "draw an arrow, with Implies
arrow tip, and with 2pt distance between the two rows of the arrows, between the south point of node UP
and the north point of point DOWN
."
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
means "draw an Implies
arrow, bent right of 60 degrees, from a point shifted horizontally -10pt from UP.south
to a point shifted horizontally -10pt from DOWN.north
."
documentclass{article}
usepackage{amsmath,amsfonts, amssymb}
usepackage{tikz-cd}
usetikzlibrary{positioning, arrows.meta}
begin{document}
[
begin{tikzcd}
A
arrow[rr, bend left=40, "F", ""{name=U}]
arrow[rr, bend right=40, "G", swap, ""{name=D}]
&
M
&
B
arrow[rr, bend left=40, "A", ""{name=A}]
arrow[rr, bend right=40, "B", swap, ""{name=B}]
&
Rrightarrow
&
bullet
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
arrow[Rightarrow, "Theta'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=U, to=D]
arrow[Rightarrow, "Phi", shorten <=2pt, shorten >=2pt, bend left=40, from=A, to=B]
arrow[Rightarrow, "Phi'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=A, to=B]
end{tikzcd}
]
[
begin{tikzpicture}
matrix[matrix of math nodes,
nodes in empty cells]
(mymatr) {
bullet &[20pt] Rrightarrow &[10pt] Rrightarrow &[20pt] bullet\
};
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
node[below=16pt of mymatr, inner sep=12pt] (DOWN) {};
draw[->, rounded corners=40pt] (mymatr-1-1) -- (UP.north) -- (mymatr-1-4);
draw[->, rounded corners=40pt] (mymatr-1-1) -- (DOWN.south) -- (mymatr-1-4);
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
draw ([xshift=10pt]UP.south) edge[bend left=60, double distance=2pt, -{Implies}] ([xshift=10pt]DOWN.north);
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
end{tikzpicture}
]
end{document}
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 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%2f477609%2fglobular-3-cells-and-higher-diagrams-in-xy-pic%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
With tikz-cd
it is not difficult.
The &
are used to separate the cells (and \
to separate the rows, if you have more rows).
arrow[rr, bend left=40, "F", ""{name=U}]
means "draw an arrow, bent to the left of 40 degrees, with the label "F" and call the middle point "U"."
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
means "draw a Rightarrow, labelling it with Theta
, shortening a bit (2pt) the tip and the tail of the arrow, bending to the left from the point called "U" to the point called "D"."
I don't know anything about Globular diagrams, I've just written an example of how to use tikz-cd
.
Edit: for peculiar cases, a pure TikZ solution may be convenient.
I've added one with a TikZ matrix
. If you use it without loading tikz-cd
, you have to load usetikzlibrary{matrix}
.
You can refer to the matrix cells with matrixname-rownumber-columnnumber
.
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
means "position the node UP
16pt above of mymatr
, since the node has an empty text, I've given it an height with inner sep=12pt
."
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
means "draw an arrow, with Implies
arrow tip, and with 2pt distance between the two rows of the arrows, between the south point of node UP
and the north point of point DOWN
."
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
means "draw an Implies
arrow, bent right of 60 degrees, from a point shifted horizontally -10pt from UP.south
to a point shifted horizontally -10pt from DOWN.north
."
documentclass{article}
usepackage{amsmath,amsfonts, amssymb}
usepackage{tikz-cd}
usetikzlibrary{positioning, arrows.meta}
begin{document}
[
begin{tikzcd}
A
arrow[rr, bend left=40, "F", ""{name=U}]
arrow[rr, bend right=40, "G", swap, ""{name=D}]
&
M
&
B
arrow[rr, bend left=40, "A", ""{name=A}]
arrow[rr, bend right=40, "B", swap, ""{name=B}]
&
Rrightarrow
&
bullet
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
arrow[Rightarrow, "Theta'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=U, to=D]
arrow[Rightarrow, "Phi", shorten <=2pt, shorten >=2pt, bend left=40, from=A, to=B]
arrow[Rightarrow, "Phi'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=A, to=B]
end{tikzcd}
]
[
begin{tikzpicture}
matrix[matrix of math nodes,
nodes in empty cells]
(mymatr) {
bullet &[20pt] Rrightarrow &[10pt] Rrightarrow &[20pt] bullet\
};
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
node[below=16pt of mymatr, inner sep=12pt] (DOWN) {};
draw[->, rounded corners=40pt] (mymatr-1-1) -- (UP.north) -- (mymatr-1-4);
draw[->, rounded corners=40pt] (mymatr-1-1) -- (DOWN.south) -- (mymatr-1-4);
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
draw ([xshift=10pt]UP.south) edge[bend left=60, double distance=2pt, -{Implies}] ([xshift=10pt]DOWN.north);
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
end{tikzpicture}
]
end{document}
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 hours ago
add a comment |
With tikz-cd
it is not difficult.
The &
are used to separate the cells (and \
to separate the rows, if you have more rows).
arrow[rr, bend left=40, "F", ""{name=U}]
means "draw an arrow, bent to the left of 40 degrees, with the label "F" and call the middle point "U"."
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
means "draw a Rightarrow, labelling it with Theta
, shortening a bit (2pt) the tip and the tail of the arrow, bending to the left from the point called "U" to the point called "D"."
I don't know anything about Globular diagrams, I've just written an example of how to use tikz-cd
.
Edit: for peculiar cases, a pure TikZ solution may be convenient.
I've added one with a TikZ matrix
. If you use it without loading tikz-cd
, you have to load usetikzlibrary{matrix}
.
You can refer to the matrix cells with matrixname-rownumber-columnnumber
.
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
means "position the node UP
16pt above of mymatr
, since the node has an empty text, I've given it an height with inner sep=12pt
."
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
means "draw an arrow, with Implies
arrow tip, and with 2pt distance between the two rows of the arrows, between the south point of node UP
and the north point of point DOWN
."
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
means "draw an Implies
arrow, bent right of 60 degrees, from a point shifted horizontally -10pt from UP.south
to a point shifted horizontally -10pt from DOWN.north
."
documentclass{article}
usepackage{amsmath,amsfonts, amssymb}
usepackage{tikz-cd}
usetikzlibrary{positioning, arrows.meta}
begin{document}
[
begin{tikzcd}
A
arrow[rr, bend left=40, "F", ""{name=U}]
arrow[rr, bend right=40, "G", swap, ""{name=D}]
&
M
&
B
arrow[rr, bend left=40, "A", ""{name=A}]
arrow[rr, bend right=40, "B", swap, ""{name=B}]
&
Rrightarrow
&
bullet
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
arrow[Rightarrow, "Theta'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=U, to=D]
arrow[Rightarrow, "Phi", shorten <=2pt, shorten >=2pt, bend left=40, from=A, to=B]
arrow[Rightarrow, "Phi'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=A, to=B]
end{tikzcd}
]
[
begin{tikzpicture}
matrix[matrix of math nodes,
nodes in empty cells]
(mymatr) {
bullet &[20pt] Rrightarrow &[10pt] Rrightarrow &[20pt] bullet\
};
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
node[below=16pt of mymatr, inner sep=12pt] (DOWN) {};
draw[->, rounded corners=40pt] (mymatr-1-1) -- (UP.north) -- (mymatr-1-4);
draw[->, rounded corners=40pt] (mymatr-1-1) -- (DOWN.south) -- (mymatr-1-4);
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
draw ([xshift=10pt]UP.south) edge[bend left=60, double distance=2pt, -{Implies}] ([xshift=10pt]DOWN.north);
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
end{tikzpicture}
]
end{document}
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 hours ago
add a comment |
With tikz-cd
it is not difficult.
The &
are used to separate the cells (and \
to separate the rows, if you have more rows).
arrow[rr, bend left=40, "F", ""{name=U}]
means "draw an arrow, bent to the left of 40 degrees, with the label "F" and call the middle point "U"."
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
means "draw a Rightarrow, labelling it with Theta
, shortening a bit (2pt) the tip and the tail of the arrow, bending to the left from the point called "U" to the point called "D"."
I don't know anything about Globular diagrams, I've just written an example of how to use tikz-cd
.
Edit: for peculiar cases, a pure TikZ solution may be convenient.
I've added one with a TikZ matrix
. If you use it without loading tikz-cd
, you have to load usetikzlibrary{matrix}
.
You can refer to the matrix cells with matrixname-rownumber-columnnumber
.
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
means "position the node UP
16pt above of mymatr
, since the node has an empty text, I've given it an height with inner sep=12pt
."
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
means "draw an arrow, with Implies
arrow tip, and with 2pt distance between the two rows of the arrows, between the south point of node UP
and the north point of point DOWN
."
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
means "draw an Implies
arrow, bent right of 60 degrees, from a point shifted horizontally -10pt from UP.south
to a point shifted horizontally -10pt from DOWN.north
."
documentclass{article}
usepackage{amsmath,amsfonts, amssymb}
usepackage{tikz-cd}
usetikzlibrary{positioning, arrows.meta}
begin{document}
[
begin{tikzcd}
A
arrow[rr, bend left=40, "F", ""{name=U}]
arrow[rr, bend right=40, "G", swap, ""{name=D}]
&
M
&
B
arrow[rr, bend left=40, "A", ""{name=A}]
arrow[rr, bend right=40, "B", swap, ""{name=B}]
&
Rrightarrow
&
bullet
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
arrow[Rightarrow, "Theta'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=U, to=D]
arrow[Rightarrow, "Phi", shorten <=2pt, shorten >=2pt, bend left=40, from=A, to=B]
arrow[Rightarrow, "Phi'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=A, to=B]
end{tikzcd}
]
[
begin{tikzpicture}
matrix[matrix of math nodes,
nodes in empty cells]
(mymatr) {
bullet &[20pt] Rrightarrow &[10pt] Rrightarrow &[20pt] bullet\
};
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
node[below=16pt of mymatr, inner sep=12pt] (DOWN) {};
draw[->, rounded corners=40pt] (mymatr-1-1) -- (UP.north) -- (mymatr-1-4);
draw[->, rounded corners=40pt] (mymatr-1-1) -- (DOWN.south) -- (mymatr-1-4);
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
draw ([xshift=10pt]UP.south) edge[bend left=60, double distance=2pt, -{Implies}] ([xshift=10pt]DOWN.north);
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
end{tikzpicture}
]
end{document}
With tikz-cd
it is not difficult.
The &
are used to separate the cells (and \
to separate the rows, if you have more rows).
arrow[rr, bend left=40, "F", ""{name=U}]
means "draw an arrow, bent to the left of 40 degrees, with the label "F" and call the middle point "U"."
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
means "draw a Rightarrow, labelling it with Theta
, shortening a bit (2pt) the tip and the tail of the arrow, bending to the left from the point called "U" to the point called "D"."
I don't know anything about Globular diagrams, I've just written an example of how to use tikz-cd
.
Edit: for peculiar cases, a pure TikZ solution may be convenient.
I've added one with a TikZ matrix
. If you use it without loading tikz-cd
, you have to load usetikzlibrary{matrix}
.
You can refer to the matrix cells with matrixname-rownumber-columnnumber
.
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
means "position the node UP
16pt above of mymatr
, since the node has an empty text, I've given it an height with inner sep=12pt
."
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
means "draw an arrow, with Implies
arrow tip, and with 2pt distance between the two rows of the arrows, between the south point of node UP
and the north point of point DOWN
."
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
means "draw an Implies
arrow, bent right of 60 degrees, from a point shifted horizontally -10pt from UP.south
to a point shifted horizontally -10pt from DOWN.north
."
documentclass{article}
usepackage{amsmath,amsfonts, amssymb}
usepackage{tikz-cd}
usetikzlibrary{positioning, arrows.meta}
begin{document}
[
begin{tikzcd}
A
arrow[rr, bend left=40, "F", ""{name=U}]
arrow[rr, bend right=40, "G", swap, ""{name=D}]
&
M
&
B
arrow[rr, bend left=40, "A", ""{name=A}]
arrow[rr, bend right=40, "B", swap, ""{name=B}]
&
Rrightarrow
&
bullet
arrow[Rightarrow, "Theta", shorten <=2pt, shorten >=2pt, bend left=40, from=U, to=D]
arrow[Rightarrow, "Theta'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=U, to=D]
arrow[Rightarrow, "Phi", shorten <=2pt, shorten >=2pt, bend left=40, from=A, to=B]
arrow[Rightarrow, "Phi'", shorten <=2pt, shorten >=2pt, bend right=40, swap, from=A, to=B]
end{tikzcd}
]
[
begin{tikzpicture}
matrix[matrix of math nodes,
nodes in empty cells]
(mymatr) {
bullet &[20pt] Rrightarrow &[10pt] Rrightarrow &[20pt] bullet\
};
node[above=16pt of mymatr, inner sep=12pt] (UP) {};
node[below=16pt of mymatr, inner sep=12pt] (DOWN) {};
draw[->, rounded corners=40pt] (mymatr-1-1) -- (UP.north) -- (mymatr-1-4);
draw[->, rounded corners=40pt] (mymatr-1-1) -- (DOWN.south) -- (mymatr-1-4);
draw[double distance=2pt, -{Implies}] (UP.south) -- (DOWN.north);
draw ([xshift=10pt]UP.south) edge[bend left=60, double distance=2pt, -{Implies}] ([xshift=10pt]DOWN.north);
draw ([xshift=-10pt]UP.south) edge[bend right=60, double distance=2pt, -{Implies}] ([xshift=-10pt]DOWN.north);
end{tikzpicture}
]
end{document}
edited 9 hours ago
answered 21 hours ago
CarLaTeXCarLaTeX
32.8k551136
32.8k551136
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 hours ago
add a comment |
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 hours ago
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
I adding my upvote because this nice answer not can be = 0.
– Sebastiano
19 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
Upvoted as well and much appreciated, the explanation of syntax is particularly nice — if no xypic solutions come by in the near future I’ll accept and adapt.
– Alec Rhea
16 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 hours ago
@AlecRhea Thank you, I answered because nobody else did. I added a pure TikZ solution, I think it could be convenient for peculiar cases.
– CarLaTeX
9 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%2f477609%2fglobular-3-cells-and-higher-diagrams-in-xy-pic%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