1

I have the following picture, but I would like the label $\tilde{f}$ of the arrow in the middle to sit on top of the arrow which I added after defining a path via a phantom arrow.

Are there any way to do this ?

enter image description here

% !TEX TS-program = XeLaTeX
\documentclass[draft]{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings,intersections}


\begin{document}

   \tikzset{%
    scalearrow/.style n args={3}{
     decoration={
      markings,
       mark=at position (1-#1)/2*\pgfdecoratedpathlength
         with {\coordinate (#2);},
       mark=at position (1+#1)/2*\pgfdecoratedpathlength
        with {\coordinate (#3);},
       },
     postaction=decorate,
     } 
    }

\begin{tikzcd}
{ } &{} &{Set} &{}  \\
{ } &{} &{\tilde{f}} &{}  \\
{A}  \ar[uurr,"!"] \ar[rrr,"f"']  \ar[rrr, shift left=5ex, phantom, scalearrow={0.1}{start}{end}] \ar[to path=(start) --(end), Rightarrow]  &{} &{}  &{B} \ar[uul, "\tilde{L}f"']&{}  \\
\end{tikzcd}



\end{document}  
4

enter image description here

but above image is drawn as pure TikZ picture:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{positioning,
                quotes}

\begin{document}
\begin{tikzpicture}[
    node distance = 24mm and 12 mm
                    ]
\node (a) {$A$};
\node (s) [above right=of a] {Set};
\node (b) [below right=of s] {$B$};
%
\draw[->]   (a) edge ["!"] (s)
            (b) edge ["$\tilde{L}f$" '] (s)
            (a) edge ["$f$"] (b);
%            
\node (f) [below=9mm of s]  {$\stackrel{\tilde{f}}{\Rightarrow}$};
\end{tikzpicture}
\end{document} 

or with use Longrightarrow instead of Rightarrow:

enter image description here

and on the end with tikz-cd:

enter image description here

\documentclass[draft]{article}
\usepackage{tikz-cd}

\begin{document}  
\begin{tikzcd}
    &   &   \mathrm{Set}                            &   \\
    &   &   \stackrel{\tilde{f}}{\Longrightarrow}   &   \\
A  \ar[uurr,"!"] \ar[rrr,"f"']  
    &   &   &   B \ar[uul, "\tilde{L}f"']&{}            \\
\end{tikzcd}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.