Tikz diagram - Tag on vertical arrow












2















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.










share|improve this question

























  • As usual I have not understood your question. :-) Don't worry :) My best regards.

    – Sebastiano
    1 hour ago
















2















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.










share|improve this question

























  • As usual I have not understood your question. :-) Don't worry :) My best regards.

    – Sebastiano
    1 hour ago














2












2








2


1






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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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










1 Answer
1






active

oldest

votes


















2














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}


enter image description here



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}


enter image description here





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}


enter image description here






share|improve this answer





















  • 1





    @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












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
});


}
});














draft saved

draft discarded


















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









2














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}


enter image description here



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}


enter image description here





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}


enter image description here






share|improve this answer





















  • 1





    @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
















2














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}


enter image description here



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}


enter image description here





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}


enter image description here






share|improve this answer





















  • 1





    @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














2












2








2







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}


enter image description here



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}


enter image description here





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}


enter image description here






share|improve this answer















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}


enter image description here



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}


enter image description here





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}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








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 replace longer text by Samstag? ;-)

    – marmot
    3 mins ago














  • 1





    @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








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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Remix

Dinastia Chin