$H_q(X_1)$
Tikz에 다음과 같은 문제가 있습니다. 노드 와 을 연결하는 곡선을 그리고 싶습니다 $H_q(X_1,A)$
. 나는 명령을 사용했습니다 \draw[bend right,->] (-2) to node [anchor=north]{$H_{n-1}(Id)$} (10)
. 아래 코드의 마지막 줄에 있지만 결과가 좋지 않습니다. 그려진 곡선은 그림과 같이 문자 위에 있습니다.
이 곡선을 왼쪽으로 더 굽히려면 어떻게 해야 합니까? 이것은 내 다이어그램의 코드입니다.
\begin{center}
\begin{tikzpicture}[every node/.style={midway}]
\matrix[column sep={10em,between origins}, row sep={2.9em}] at (0,0) {
\node(-14) {}; & \node (-13) {};&\node(-12) {};\\
\node(-11){} ; & \node(-10) {$H_{q+1}(X,A)$};&\node(-9) {}; \\
\node(-8) {$H_{q+1}(X_2,A)$}; & \node (-7) {};&\node(-6) {$H_{q+1}(X_1,A)$};\\
\node(-5){} ; & \node(-4) {$H_q(A)$};&\node(-3) {}; \\
\node(-2) {$H_q(X_1)$}; & \node (-1) {};&\node(0) {$H_q(X_2)$};\\
\node(1){} ; & \node(2) {$H_q(X)$};&\node(3) {}; \\
\node(4) {$H_q(X,X_2)$}; & \node (5) {};&\node(6) {$H_q(X,X_1)$};\\
\node(7) {}; & \node (8) {$H_q(X,A)$};&\node(9) {};\\
\node(10){$H_q(X_1,A)$} ; & \node(11) {};&\node(12) {$H_q(X_1,A)$}; \\
\node(13) {}; & \node (14) {$H_{q-1}(A)$};&\node(15) {};\\
\node(16){$H_{q-1}(X_2)$} ; & \node(17) {};&\node(18) {$H_{q-1}(X_1)$}; \\
\node(19) {}; & \node (20) {$H_{q-1}(X)$};&\node(21) {};\\
\node(22){} ; & \node(23) {};&\node(24) {}; \\
};
\draw[->] (-14) -- (-10) node[anchor=south] {};
\draw[->] (-13) -- (-10) node[anchor=south] {};
\draw[->] (-12) -- (-10) node[anchor=south] {};
\draw[->] (-4) -- (-6) node[anchor=north] {$\partial_{(q+1)_1}^*$};
\draw[->] (-4) -- (-8) node[anchor=north] {$\partial_{(q+1)_2}^*$};
\draw[->] (-6) -- (-10) node[anchor=south] {$H_q(l_1)$};
\draw[->] (-8) -- (-10) node[anchor=south] {$H_q(l_2)$};
\draw[<-] (-2) -- (-4) node[anchor=south] {$H_q(m_1)$};
\draw[<-] (0) -- (-4) node[anchor=south] {$H_q(m_2)$};
\draw[->] (-2) -- (2) node[anchor=north] {$H_q(i_1)$};
\draw[->][red] (0) -- (2) node[anchor=north] {$H_q(i_2)$};
\draw[->] (2) -- (4) node[anchor=south] {$H_q(s_2)$};
\draw[->] (2) -- (6) node[anchor=south] {$H_q(s_1)$};
\draw[<-] (4) -- (8) node[anchor=north] {$H_q(j_2)$};
\draw[<-] (6) -- (8) node[anchor=north] {$H_q(j_1)$};
\draw[<-] (8) -- (10) node[anchor=north] {$H_q(l_1)$};
\draw[<-] (8) -- (12) node[anchor=north] {$H_q(l_2)$};
\draw[->] (10) -- (14) node[anchor=north] {$\partial_{q_1}^*$};
\draw[->] (12) -- (14) node[anchor=north] {$\partial_{q_2}^*$};
\draw[->] (14) -- (16) node[anchor=south] {$H_{q-1}(m_2)$};
\draw[->] (14) -- (18) node[anchor=south] {$H_{q-1}(m_1)$};
\draw[->] (16) -- (20) node[anchor=north] {$H_{q-1}(i_2)$};
\draw[->] (18) -- (20) node[anchor=north] {$H_{q-1}(i_1)$};
\draw[<-][thick][green] (4) -- (10) node[anchor=east] {$H_q(k_1)$};
\draw[<-] (6) -- (12) node[anchor=west] {$H_q(k_2)$};
\draw[->] (-10) -- (-4) node[anchor=west] {$\partial_{q+1}^*$};
\draw[->] (-4) -- (2) node[anchor=west] {$H_{q}(m)$};
\draw[->] (2) -- (8) node[anchor=west] {$H_{q}(n)$};
\draw[->] (8) -- (14) node[anchor=west] {$\partial_{q}^*$};
\draw[->] (14) -- (20) node[anchor=west] {$H_q(m)$};
\draw[->] (20) -- (22) node[anchor=west] {};
\draw[->] (20) -- (23) node[anchor=west] {};
\draw[->] (20) -- (24) node[anchor=west] {};
\draw[bend right=75,->] (-2) to node [anchor=east]{$H_{q}(n_1)$} (10);
\draw[bend right=75,->] (4) to node [anchor=east]{$\partial_{q_2}^*$} (16);
\draw[bend left=75,->] (0) to node [anchor=west]{$\partial_{q_2}^*$} (12);
\draw[bend left=75,->] (6) to node [anchor=west]{$\partial_{q_2}^*$} (18);
\end{tikzpicture}
\end{center}
미리 감사드립니다.
편집: 예를 들어 과 를 $H_q(s_2)$
연결하는 선을 덮어쓰는 경우를 어떻게 피할 수 있습니까 ?$H_q(X)$
$H_q(X,X_2)$
추신: 굽힘 문제를 해결했습니다.
두 번째 편집: Egreg가 권장하는 대로 Tikz-Cd를 사용합니다. 코드는 다음과 같습니다
\[
\begin{tikzcd}
& {H_q(A)} \arrow[dl,swap,"H_q(m_1)"] \arrow[dd,"H_q(m)"] \arrow[dr,"H_q(m_2)"] \\
H_q(X_1) \arrow[dr,swap,"H_q(i_1)"]
\arrow[dddd,bend right=50,swap,"H_{n-1}(\mathit{Id})"] &&
H_q(X_2) \arrow[dddd,bend left=50,"H_{n-1}(\mathit{Id})"] \arrow[red,dl,"H_q(i_2)"] \\
& H_q(X) \arrow[dl,swap,"H_q(s_1)"] \arrow[dd,"H_q(n)"] \arrow[dr,"H_q(s_2)"] \\
H_q(X,X_2)\arrow[dddd,bend right=50,swap,"H_{n-1}(\mathit{Id})"] && H_q(X,X_1)\arrow[dddd,bend left=50,"H_{n-1}(\mathit{Id})"] \\
& H_q(X,A) \arrow[ul,"H_q(j_2)"] \arrow[ur,swap,"H_q(j_1)"] \arrow[dd,"\partial_q^*"] \\
H_q(X_1,A) \arrow[uu,"H_q(k_1)"] \arrow[ur,swap,"H_q(l_1)"] \arrow[dr,swap,"\partial^*_{q_1}"] &&
H_q(X_1,A) \arrow[ul,"H_q(l_2)"] \arrow[uu,swap,"H_q(k_2)"] \arrow[dl,"\partial^*_{q_2}"] \\
& H_{q-1}(A) \arrow[dl,swap,"H_{q-1}(m_2)"] \arrow[dd,"H_{q-1}(m)"] \arrow[dr,"H_{q-1}(m_1)"] \\
H_{q-1}(X_2) \arrow[dr,swap,"H_{q-1}(i_1)"]
&&
H_{q-1}(X_1) \arrow[red,dl,"H_{q-1}(i_2)"] \\
& H_{q-1}(X)
\end{tikzcd}
\]
결과는 다음과 같습니다.
이제 문제는 꼬리와 머리를 원본 그림과 똑같이 그릴 수 없다는 것입니다. 항상 오류가 표시되나요? 어떻게 해야 합니까?
답변1
당신이 사용할 수있는 tikz-cd
:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}
& {} \arrow[dl] \arrow[dd,swap,"n"] \arrow[dr] \\
H_q(X_1) \arrow[dr,swap,"H_q(i_1)"]
\arrow[dddd,bend right=50,swap,"H_{n-1}(\mathit{Id})"] &&
H_q(X_2) \arrow[red,dl,"H_q(i_2)"] \\
& H_q(X) \arrow[dl,swap,"H_q(s_1)"] \arrow[dd,swap,"n"] \arrow[dr,"H_q(s_2)"] \\
H_q(X,X_2) && H_q(X,X_1) \\
& H_q(X,A) \arrow[ul,"H_q(j_2)"] \arrow[ur,swap,"H_q(j_1)"] \arrow[dd,"\partial"] \\
H_q(X_1,A) \arrow[uu,"H_q(k_1)"] \arrow[ur,swap,"H_q(l_1)"] \arrow[dr,swap,"\partial^*_q"] &&
H_q(X_1,A) \arrow[ul,"H_q(l_2)"] \arrow[uu,swap,"H_q(k_2)"] \arrow[dl,"\partial^*_q"] \\
& {}
\end{tikzcd}
\]
\end{document}