Add caption for diagram in tikz cd
consider the following code.
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
usepackage{blindtext}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{amsmath,amsthm,amsfonts,amssymb}
usepackage{hyperref}
usepackage{mathrsfs}
usepackage[all]{xy}
usepackage[normalem]{ulem}
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{color}
pagestyle{myheadings}
begin{document}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
end{document}
I want to add caption for a diagram in tikzcd code.
I want to name the figure say “Figure 1”
What are some ways to do that?
diagrams tikz-cd
add a comment |
consider the following code.
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
usepackage{blindtext}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{amsmath,amsthm,amsfonts,amssymb}
usepackage{hyperref}
usepackage{mathrsfs}
usepackage[all]{xy}
usepackage[normalem]{ulem}
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{color}
pagestyle{myheadings}
begin{document}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
end{document}
I want to add caption for a diagram in tikzcd code.
I want to name the figure say “Figure 1”
What are some ways to do that?
diagrams tikz-cd
1
Why not put it into afigure
environment and use the usualcaption
approach. An alternative would be using thecaptionof{figure}{...}
command from thecapt-of
package.
– leandriis
Feb 23 at 14:52
1
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53
add a comment |
consider the following code.
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
usepackage{blindtext}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{amsmath,amsthm,amsfonts,amssymb}
usepackage{hyperref}
usepackage{mathrsfs}
usepackage[all]{xy}
usepackage[normalem]{ulem}
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{color}
pagestyle{myheadings}
begin{document}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
end{document}
I want to add caption for a diagram in tikzcd code.
I want to name the figure say “Figure 1”
What are some ways to do that?
diagrams tikz-cd
consider the following code.
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
usepackage{blindtext}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{amsmath,amsthm,amsfonts,amssymb}
usepackage{hyperref}
usepackage{mathrsfs}
usepackage[all]{xy}
usepackage[normalem]{ulem}
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{color}
pagestyle{myheadings}
begin{document}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
end{document}
I want to add caption for a diagram in tikzcd code.
I want to name the figure say “Figure 1”
What are some ways to do that?
diagrams tikz-cd
diagrams tikz-cd
asked Feb 23 at 14:48
Praphulla KoushikPraphulla Koushik
1546
1546
1
Why not put it into afigure
environment and use the usualcaption
approach. An alternative would be using thecaptionof{figure}{...}
command from thecapt-of
package.
– leandriis
Feb 23 at 14:52
1
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53
add a comment |
1
Why not put it into afigure
environment and use the usualcaption
approach. An alternative would be using thecaptionof{figure}{...}
command from thecapt-of
package.
– leandriis
Feb 23 at 14:52
1
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53
1
1
Why not put it into a
figure
environment and use the usual caption
approach. An alternative would be using the captionof{figure}{...}
command from the capt-of
package.– leandriis
Feb 23 at 14:52
Why not put it into a
figure
environment and use the usual caption
approach. An alternative would be using the captionof{figure}{...}
command from the capt-of
package.– leandriis
Feb 23 at 14:52
1
1
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53
add a comment |
1 Answer
1
active
oldest
votes
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{capt-of}
pagestyle{myheadings}
begin{document}
begin{figure}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
caption{my caption text}
end{figure}
begin{center}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
captionof{figure}{my caption text}
end{center}
end{document}
Unrelated to the question, but you might want to keep in mind that the hyperref
package should generally (with some few exceptions) be the last package that you load.
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert thetikzcd
environment into anequation
environment, I get the following result: i.stack.imgur.com/NcHoF.png
– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
|
show 4 more comments
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%2f476337%2fadd-caption-for-diagram-in-tikz-cd%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[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{capt-of}
pagestyle{myheadings}
begin{document}
begin{figure}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
caption{my caption text}
end{figure}
begin{center}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
captionof{figure}{my caption text}
end{center}
end{document}
Unrelated to the question, but you might want to keep in mind that the hyperref
package should generally (with some few exceptions) be the last package that you load.
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert thetikzcd
environment into anequation
environment, I get the following result: i.stack.imgur.com/NcHoF.png
– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
|
show 4 more comments
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{capt-of}
pagestyle{myheadings}
begin{document}
begin{figure}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
caption{my caption text}
end{figure}
begin{center}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
captionof{figure}{my caption text}
end{center}
end{document}
Unrelated to the question, but you might want to keep in mind that the hyperref
package should generally (with some few exceptions) be the last package that you load.
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert thetikzcd
environment into anequation
environment, I get the following result: i.stack.imgur.com/NcHoF.png
– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
|
show 4 more comments
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{capt-of}
pagestyle{myheadings}
begin{document}
begin{figure}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
caption{my caption text}
end{figure}
begin{center}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
captionof{figure}{my caption text}
end{center}
end{document}
Unrelated to the question, but you might want to keep in mind that the hyperref
package should generally (with some few exceptions) be the last package that you load.
documentclass[14pt,reqno,a4paper]{amsart}
usepackage{extsizes}
textheight 9.3in textwidth 6.5in
calclayout
usepackage{tikz-cd}
usepackage[utf8]{inputenc}
usepackage[english]{babel}
newcommand{uMor}[1]{operatorname{underline{Mor_{#1}}}}
usepackage{capt-of}
pagestyle{myheadings}
begin{document}
begin{figure}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
caption{my caption text}
end{figure}
begin{center}
begin{tikzcd}
(mathcal{C}/U)^{text{op}} arrow[rrr, "{uMor{mathcal{F}}(x,y)}"{name=U}, bend left=49] arrow[rrr, "{uMor{mathcal{G}}(Psi(x),Psi(y))}"'{name=D}, bend right=49] & & & (text{Set})
arrow[Rightarrow, from=U, to=D, shorten >=2pt, shorten <=2pt]
end{tikzcd}
captionof{figure}{my caption text}
end{center}
end{document}
Unrelated to the question, but you might want to keep in mind that the hyperref
package should generally (with some few exceptions) be the last package that you load.
answered Feb 23 at 15:01
leandriisleandriis
9,3351530
9,3351530
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert thetikzcd
environment into anequation
environment, I get the following result: i.stack.imgur.com/NcHoF.png
– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
|
show 4 more comments
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert thetikzcd
environment into anequation
environment, I get the following result: i.stack.imgur.com/NcHoF.png
– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
Does the samething works if I want to write as equation? begin{equation} begin{tikzcd}end{tikzcd}end{equation}??
– Praphulla Koushik
Feb 24 at 0:51
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
@PraphullaKoushik: Yes, it does. Did you try this yourself?
– leandriis
Feb 24 at 9:05
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
It did not work... :O That is why I asked... It did not work for me atleast...
– Praphulla Koushik
Feb 24 at 9:07
If I use the preamble from your question and insert the
tikzcd
environment into an equation
environment, I get the following result: i.stack.imgur.com/NcHoF.png– leandriis
Feb 24 at 9:09
If I use the preamble from your question and insert the
tikzcd
environment into an equation
environment, I get the following result: i.stack.imgur.com/NcHoF.png– leandriis
Feb 24 at 9:09
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
Yes, that I also got.. I want the diagram look like the one above with a caption and also equation number as 1 ...
– Praphulla Koushik
Feb 24 at 9:13
|
show 4 more comments
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%2f476337%2fadd-caption-for-diagram-in-tikz-cd%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
Why not put it into a
figure
environment and use the usualcaption
approach. An alternative would be using thecaptionof{figure}{...}
command from thecapt-of
package.– leandriis
Feb 23 at 14:52
1
I am not really very comfortable with this kind of things. Can you write in detail in an answer. @leandriis thank you
– Praphulla Koushik
Feb 23 at 14:53