
다음 다이어그램이 있습니다 xypic
.
\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage[all,cmtip,2cell]{xy}
\begin{document}
\[\xymatrix{
& K\Omega M \ar[rr] \ar[ld]_(.4){K\Omega F} \ar@{.>}'[d][dd]_-\simeq && K\Delta M \ar[rr] \ar[ld] && Kq\Delta M \ar[ld] \\
K\Omega N \ar[rr] \ar@{.>}[dd]_-\simeq && K\Delta N \ar[rr] && Kq\Delta N \\
& \Omega Kq\Delta M \ar@/_2pc/[rruu] \ar[ld]_-{\Omega Kq\Delta F} & \\
\Omega Kq\Delta N \ar@/_2pc/[rruu]
}\]
\end{document}
이는 다음과 같이 렌더링됩니다.
"배경에 있는" 곡선 화살표는 다른 화살표와 교차할 때마다 두 번 끊어져 실제로 배경에 있는 듯한 느낌을 주어야 합니다. 어떻게 이를 달성할 수 있나요?
답변1
xypic으로 할 수 있는지는 모르겠지만, 단지 참고용(그리고 재미로)으로 Tikz로 했습니다.
이 경우 "앞"에 있는 선을 두 번 그리는 것이 비결입니다. 첫 번째는 흰색으로 매우 두껍게 그려지고, 두 번째는 검정색으로 보통 너비로 그려집니다.
TikZ에서는 먼저 xy-pic과 유사한 구문을 사용하여 노드 행렬을 그린 다음 일반적인 형식을 갖는 행렬 노드의 이름을 좌표로 사용하여 모든 연결을 (M-row-column)
그리고 필요한 레이블을 지정합니다. 을 사용하여 연결합니다 node
.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of math nodes, row sep=1cm, column sep=0.5cm] (M) {
& K\Omega M && K\Delta M && Kq\Delta M \\
K\Omega N && K\Delta N && Kq\Delta N \\
& \Omega Kq\Delta M & \\
\Omega Kq\Delta N \\
};
\draw[->] (M-1-2) -- (M-2-1)
node[midway, above left] {\scriptsize $K\Omega F$};
\draw[->,dotted] (M-2-1) -- (M-4-1)
node[midway, left] {\scriptsize $\simeq$};
\draw[->] (M-3-2) -- (M-4-1)
node[midway, above, xshift=-1em] {\scriptsize $\Omega Kq\Delta F$};
\draw[->, dotted] (M-1-2) -- (M-3-2)
node[pos=0.7, left] {\scriptsize $\simeq$};
\draw[->] (M-1-2) -- (M-1-4);
\draw[->] (M-1-4) -- (M-1-6);
\draw[->] (M-3-2) to[out=20, in=-110] (M-1-4);
\draw[white, line width=1ex] (M-2-1) -- (M-2-3);
\draw[->] (M-2-1) -- (M-2-3);
\draw[white, line width=1ex] (M-2-3) -- (M-2-5);
\draw[->] (M-2-3) -- (M-2-5);
\draw[white, line width=.5ex] (M-4-1) to[out=20, in=-110] (M-2-3);
\draw[->] (M-4-1) to[out=20, in=-110] (M-2-3);
\draw[->] (M-1-4) -- (M-2-3);
\draw[->] (M-1-6) -- (M-2-5);
\end{tikzpicture}
\end{document}
결과:
답변2
이것은 여전히 아니지만 xypic
의 구문은 tikz-cd
그것과 매우 유사합니다. 전체 다이어그램에 대해 이 패키지로 전환할 수도 있습니다. tikz-cd
훨씬 더 많은 가능성을 제공하므로 를 사용하는 것이 좋습니다 .
% arara: pdflatex
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
& K\Omega M \ar{rr} \ar[swap, "K\Omega F"]{dl} \ar[dotted, near end, swap, "\simeq"]{dd} && K\Delta M \ar{rr} \ar{dl} \ar[bend left, <-]{ddll} && Kq\Delta M \ar{dl} \\
K\Omega N \ar[crossing over]{rr} \ar[dotted, swap, "\simeq"]{dd} & & K\Delta N \ar[crossing over]{rr} && Kq\Delta N \\
& \Omega Kq\Delta M \ar[swap, near start, "\Omega Kq\Delta F"]{dl} & \\
\Omega Kq\Delta N \ar[crossing over, bend right]{uurr}
\end{tikzcd}
\]
\end{document}