다음 그림이 있는데 가운데 화살표의 $\tilde{f}$ 레이블을 가상 화살표를 통해 경로를 정의한 후 추가한 화살표 위에 위치시키고 싶습니다.
이를 수행할 수 있는 방법이 있습니까?
% !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}
답변1
그러나 위의 이미지는 순수한 TikZ 그림으로 그려집니다.
\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}
Longrightarrow
또는 다음 대신 사용 Rightarrow
:
그리고 마지막에는 다음과 같이 합니다 tikz-cd
.
\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}