Tikz diagram - Tag on vertical arrow
Consider the following code for a commutative diagram
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{text{example}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
The tag "example" appears on the left hand side of the down arrow. I would like the tag "example" to be written "on the arrow" (as if it were an horizontal arrow, if it makes sense). How can I achieve this?
Edit: in other words, I would like to rotate left the text "example" so that it is parallel to the down arrow.
tikz-arrows tikz-cd
add a comment |
Consider the following code for a commutative diagram
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{text{example}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
The tag "example" appears on the left hand side of the down arrow. I would like the tag "example" to be written "on the arrow" (as if it were an horizontal arrow, if it makes sense). How can I achieve this?
Edit: in other words, I would like to rotate left the text "example" so that it is parallel to the down arrow.
tikz-arrows tikz-cd
As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago
add a comment |
Consider the following code for a commutative diagram
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{text{example}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
The tag "example" appears on the left hand side of the down arrow. I would like the tag "example" to be written "on the arrow" (as if it were an horizontal arrow, if it makes sense). How can I achieve this?
Edit: in other words, I would like to rotate left the text "example" so that it is parallel to the down arrow.
tikz-arrows tikz-cd
Consider the following code for a commutative diagram
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{text{example}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
The tag "example" appears on the left hand side of the down arrow. I would like the tag "example" to be written "on the arrow" (as if it were an horizontal arrow, if it makes sense). How can I achieve this?
Edit: in other words, I would like to rotate left the text "example" so that it is parallel to the down arrow.
tikz-arrows tikz-cd
tikz-arrows tikz-cd
edited 3 hours ago
puzzled
asked 4 hours ago
puzzledpuzzled
312
312
As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago
add a comment |
As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago
As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago
As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
You could place the label of the arrow in a rotatebox:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{hspace*{-0.7cm}rotatebox{90}{test}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

For longer texts:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt,row sep=6em]
A arrow[swap]{d}{hspace*{-0.4cm}rotatebox{90}{longer text}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

As @marmot helpfully pointed out, there is an even simpler approach:
documentclass{article}
usepackage{tikz-cd}
usepackage{amsmath}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap,"text{test}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
begin{tikzcd}[column sep=50pt,row sep=5em]
A arrow[swap,"text{longer text}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replacelonger textbySamstag? ;-)
– marmot
3 mins ago
add a comment |
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%2f482609%2ftikz-diagram-tag-on-vertical-arrow%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
You could place the label of the arrow in a rotatebox:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{hspace*{-0.7cm}rotatebox{90}{test}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

For longer texts:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt,row sep=6em]
A arrow[swap]{d}{hspace*{-0.4cm}rotatebox{90}{longer text}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

As @marmot helpfully pointed out, there is an even simpler approach:
documentclass{article}
usepackage{tikz-cd}
usepackage{amsmath}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap,"text{test}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
begin{tikzcd}[column sep=50pt,row sep=5em]
A arrow[swap,"text{longer text}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replacelonger textbySamstag? ;-)
– marmot
3 mins ago
add a comment |
You could place the label of the arrow in a rotatebox:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{hspace*{-0.7cm}rotatebox{90}{test}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

For longer texts:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt,row sep=6em]
A arrow[swap]{d}{hspace*{-0.4cm}rotatebox{90}{longer text}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

As @marmot helpfully pointed out, there is an even simpler approach:
documentclass{article}
usepackage{tikz-cd}
usepackage{amsmath}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap,"text{test}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
begin{tikzcd}[column sep=50pt,row sep=5em]
A arrow[swap,"text{longer text}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replacelonger textbySamstag? ;-)
– marmot
3 mins ago
add a comment |
You could place the label of the arrow in a rotatebox:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{hspace*{-0.7cm}rotatebox{90}{test}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

For longer texts:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt,row sep=6em]
A arrow[swap]{d}{hspace*{-0.4cm}rotatebox{90}{longer text}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

As @marmot helpfully pointed out, there is an even simpler approach:
documentclass{article}
usepackage{tikz-cd}
usepackage{amsmath}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap,"text{test}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
begin{tikzcd}[column sep=50pt,row sep=5em]
A arrow[swap,"text{longer text}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

You could place the label of the arrow in a rotatebox:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap]{d}{hspace*{-0.7cm}rotatebox{90}{test}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

For longer texts:
documentclass{article}
usepackage{tikz-cd}
begin{document}
begin{tikzcd}[column sep=50pt,row sep=6em]
A arrow[swap]{d}{hspace*{-0.4cm}rotatebox{90}{longer text}}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

As @marmot helpfully pointed out, there is an even simpler approach:
documentclass{article}
usepackage{tikz-cd}
usepackage{amsmath}
begin{document}
begin{tikzcd}[column sep=50pt]
A arrow[swap,"text{test}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
begin{tikzcd}[column sep=50pt,row sep=5em]
A arrow[swap,"text{longer text}" {rotate=90,above}]{d}arrow{r} & B arrow[leftarrow]{dl}\
C
end{tikzcd}
end{document}

edited 1 hour ago
answered 3 hours ago
samcartersamcarter
93.3k7105302
93.3k7105302
1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replacelonger textbySamstag? ;-)
– marmot
3 mins ago
add a comment |
1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replacelonger textbySamstag? ;-)
– marmot
3 mins ago
1
1
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
@marmot Thanks a lot for the suggestion!
– samcarter
1 hour ago
The user wants a tag. Maybe replace
longer text by Samstag? ;-)– marmot
3 mins ago
The user wants a tag. Maybe replace
longer text by Samstag? ;-)– marmot
3 mins 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%2f482609%2ftikz-diagram-tag-on-vertical-arrow%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

As usual I have not understood your question. :-) Don't worry :) My best regards.
– Sebastiano
1 hour ago