蛇稃的不寻常图解

蛇稃的不寻常图解

我想在 LaTeX 中绘制下图。这本质上是蛇形引理的图表,但与通常的图表略有不同。

在此处输入图片描述

将蛇形引理图旋转九十度,再将其反转,即可得到该图。但是,直接写这个可能更舒服

感谢您的帮助。

以下是常见蛇形引理的代码。

\begin{document}

\documentclass{article}
\thispagestyle{empty}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{%
  matrix,%
  calc,%
  arrows%
}

\begin{tikzpicture}[>=triangle 60]

\matrix[matrix of math nodes,column sep={60pt,between origins},row
sep={60pt,between origins},nodes={asymmetrical rectangle}] (s)
{
&|[name=ka]| \ker f &|[name=kb]| \ker g &|[name=kc]| \ker h \\
%
&|[name=A]| A' &|[name=B]| B' &|[name=C]| C' &|[name=01]| 0 \\
%
|[name=02]| 0 &|[name=A']| A &|[name=B']| B &|[name=C']| C \\
%
&|[name=ca]| \coker f &|[name=cb]| \coker g &|[name=cc]| \coker h \\
};
\draw[->] (ka) edge (A)
          (kb) edge (B)
          (kc) edge (C)
          (A) edge (B)
          (B) edge node[auto] {\(p\)} (C)
          (C) edge (01)
          (A) edge node[auto] {\(f\)} (A')
          (B) edge node[auto] {\(g\)} (B')
          (C) edge node[auto] {\(h\)} (C')
          (02) edge (A')
          (A') edge node[auto] {\(i\)} (B')
          (B') edge (C')
          (A') edge (ca)
          (B') edge (cb)
          (C') edge (cc)
;
\draw[->,gray] (ka) edge (kb)
               (kb) edge (kc)
               (ca) edge (cb)
               (cb) edge (cc)
;
\draw[->,gray,rounded corners] (kc) -| node[auto,text=black,pos=.7]
{\(\partial\)} ($(01.east)+(.5,0)$) |- ($(B)!.35!(B')$) -|
($(02.west)+(-.5,0)$) |- (ca);
\end{tikzpicture}

输出为
蛇稃

这种常见的蛇形引理图的代码也可以在 如何绘制蛇形引理中连接同态的“蛇”形箭头?

答案1

你可以弯曲箭头:

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{cd,bbox}

\DeclareMathOperator{\Coker}{Coker}

\begin{document}

Some text before the diagram, we make it long enough to split across
lines so we see better what happens.
\[
\begin{tikzcd}[
  column sep={5em,between origins},
  row sep=5ex,
  bezier bounding box, % <-- https://tex.stackexchange.com/a/619994/
]
0 \arrow[r] &
A \arrow[r] \arrow[d] &
B \arrow[r,"i"] \arrow[d] &
C \arrow[r] \arrow[d] &
\Coker i \arrow[r] \arrow[d,"g"] &
0
\\
0 \arrow[r] &
D \arrow[r] \arrow[d] &
E \arrow[r,"i"] \arrow[d] &
F \arrow[r] \arrow[d] &
J
\\
&
G \arrow[r] \arrow[rrruu,in=150,out=170,looseness=2.6,"\delta"] &
H \arrow[r] &
I
\end{tikzcd}
\]
Some text after the diagram, we make it long enough to split across
lines so we see better what happens.

\end{document}

在此处输入图片描述

答案2

tikz-cd可以使用箭头选项来控制箭头to path。以下是原始版本以及您的版本,以供比较。

在此处输入图片描述

\documentclass{article}

\usepackage{tikz-cd, amsmath}

\DeclareMathOperator{\coker}{coker}
\tikzcdset{arrow style=tikz, diagrams={>={Triangle[]}}}
\colorlet{mygray}{gray!80}

\begin{document}

\[
\begin{tikzcd}[sep={60pt,between origins}, arrows=thick, every label/.append style={font=\normalsize}]
 & \ker f\arrow[d]\arrow[r, mygray] & \ker g\arrow[d]\arrow[r, mygray] & \ker h\arrow[d] & \\ % Final `&` needed for proper spacing in subsequent rows
 & A'\arrow[d, "f"]\arrow[r] & B'\arrow[d, "g", ""{coordinate, name=Z, pos=.2}]\arrow[r, "p"] & C'\arrow[d, "h"]\arrow[r] & 0\\
0\arrow[r] & A\arrow[d]\arrow[r, "i"] & B\arrow[d]\arrow[r] & C\arrow[d]\\
 & \coker f\arrow[r, mygray] & \coker g\arrow[r, mygray] & \coker h
\arrow[mygray, from=1-4, to=4-2, rounded corners, 
    to path={-- ([xshift=60pt]\tikztostart.east) |- (Z) [pos=.25, text=black]\tikztonodes 
    -| ([xshift=-60pt]\tikztotarget.west) -- (\tikztotarget)}, "\partial"]
\end{tikzcd}
\]

\[
\begin{tikzcd}[sep={60pt,between origins}, arrows=thick, every label/.append style={font=\normalsize}]
0\arrow[r] & A\arrow[r]\arrow[d] & B\arrow[r, "i"]\arrow[d] & C\arrow[r]\arrow[d] & \coker i\arrow[d]\arrow[r] & 0\\
0\arrow[r] & D\arrow[r]\arrow[d] & E\arrow[r]\arrow[d] & F\arrow[r]\arrow[d] & J\\
 & G\arrow[r] & H\arrow[r] & I
\arrow[mygray, from=3-2, to=1-5, rounded corners,
    to path={-- ([xshift=-70pt]\tikztostart.west) --++(0,140pt) [pos=1, text=black]\tikztonodes 
    -| (\tikztotarget.north) }, "\partial"]
\end{tikzcd}
\]

\end{document}

相关内容