Quantcast
Channel: Question and Answer » tikz-arrows
Viewing all articles
Browse latest Browse all 33

Rounded arrow in tikzcd with text on it

$
0
0

This is a continuation of my previous question. I would like to draw a rectangular-like arrow with rounded corners in tikzcd and would like to put a text on this arrow. Here is my attempt:

enter image description here

documentclass[12pt,a4paper]{article}
usepackage[latin1]{inputenc}
usepackage{tikz-cd}
usepackage[english]{babel}
usepackage{relsize}
tikzset{nodes={inner sep=2pt}}
usepackage{blindtext}

begin{document}
[begin{tikzcd}[sep=34pt]
    B ar{r}[swap]{g}
    ar[to path={ -- ([yshift=-4ex]tikztostart.south) -| (tikztotarget)},
        rounded corners=12pt]{rr}
    & B' ar{r}[swap]{g'}
    ar[phantom]{d}[pos=0.45]{mathsmaller{g' circ g}} & B'' \
    & phantom{.} &
 end{tikzcd}]
blindtext

end{document}

The problem is that the phantom node produces extra white space in the tikzpicture, so that the text after it does not come directly after it.

There is a “dirty” solution using vspace{-10mm} after the tikzpicture, but this is not very precise and not elegant.


Viewing all articles
Browse latest Browse all 33

Trending Articles