Ich habe folgendes Problem mit Tikz: Ich möchte eine Kurve zeichnen, die den Knoten $H_q(X_1)$
und verbindet $H_q(X_1,A)$
. Ich habe den Befehl \draw[bend right,->] (-2) to node [anchor=north]{$H_{n-1}(Id)$} (10)
; in der letzten Zeile meines Codes unten verwendet, aber das Ergebnis ist nicht gut. Die gezeichnete Kurve liegt über den Buchstaben, wie gezeigt:
Wie kann ich dafür sorgen, dass diese Kurve weiter nach links abknickt? Dies ist der Code meines Diagramms:
\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}
Vielen Dank im Voraus.
Edit: Wie kann vermieden werden, dass beispielsweise $H_q(s_2)$
die Verbindungslinie zwischen $H_q(X)$
und überschrieben wird $H_q(X,X_2)$
?
PS: Ich habe das Biegeproblem gelöst.
Zweite Änderung: Ich verwende Tikz-Cd, wie von Egreg empfohlen. Der Code lautet:
\[
\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}
\]
Das Ergebnis ist:
Das Problem ist jetzt, dass ich den Schwanz und den Kopf nicht genau wie in meinem Originalbild zeichnen kann. Es werden immer Fehler angezeigt? Wie kann ich das machen?
Antwort1
Sie können Folgendes verwenden 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}