在短精確序列的箭頭上繪製矩陣(交換圖)

在短精確序列的箭頭上繪製矩陣(交換圖)

我想使用 tikz-cd 套件繪製一個簡短的精確序列。但我希望某些箭頭上的標籤是矩陣。我似乎無法讓它看起來很好。箭頭的大小不合適,我的列矩陣和行矩陣看起來不一樣(顯然這是因為我使用兩個不同的命令,但我無法以不同的方式使用逗號處理行向量)。下圖顯示了我要存檔的內容。最小的工作範例是我嘗試過的。

這是我試圖重現的引理,我更願意將括號換成圓括號

\documentclass[a4paper,11pt]{amsart}
\usepackage{amsmath,amscd,amssymb,amsfonts,mathrsfs}
\usepackage{mathtools}
\usepackage{tikz-cd}
\DeclarePairedDelimiter{\Vector}{\lparen}{\rparen}
\begin{document}
\begin{equation*}
\begin{tikzcd}
\Sigma_1 \colon \quad 0 \arrow{r} & M_1 
\arrow{r}{\begin{pmatrix} u_1 \\ f_1  \end{pmatrix}} &
E \arrow[column sep = large]{r}{\Vector{f_2,u_2}}
& F \arrow{r} & 0
\end{tikzcd}
\end{equation*}
\end{document}

答案1

您在尋找這樣的東西嗎?

在此輸入影像描述

透過將可選參數傳遞給單元格分隔字元來更改箭頭的長度&[5ex],並smallmatrix使用它來代替pmatrix

\documentclass[a4paper,11pt]{amsart}
%\usepackage{amsmath,amscd,amssymb,amsfonts,mathrsfs}
%\usepackage{mathtools}
\usepackage{tikz-cd}
\begin{document}
\begin{equation*}
\begin{tikzcd}
\Sigma_1 \colon \quad 0 \arrow{r} & M_1 
\arrow{r}{\left[\begin{smallmatrix} u_1 \\ f_1  \end{smallmatrix}\right]} &
E \arrow[column sep = large]{r}{[f_2,u_2]}
&[5ex] F \arrow{r} & 0
\end{tikzcd}
\end{equation*}
\end{document}

答案2

另一個方法是使用positioning具有實際座標的庫,這樣我們就可以輕鬆控制箭頭的長度。 (在這種情況下使用絕對座標並不方便)。另請注意選項的順序:node distance=5mm必須位於 之前right= of N2

在此輸入影像描述

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{equation*}
\begin{tikzpicture}[node distance=1cm]
\path node (M21) {$M_2\oplus N_1$}
node[left= of M21]  (M1)  {$M_1$}
node[node distance=5mm,left= of M1] (L) {$\Sigma_1 : 0$}
node[right= of M21] (N2)  {$N_2$}
node[node distance=5mm,right= of N2] (R) {$0$};

\draw[->] (L)--(M1);
\draw[->] (M1)--(M21) node[midway,above,scale=.8]
{$\begin{bmatrix}u_1\\f_1\end{bmatrix}$};
\draw[->] (M21)--(N2) node[midway,above,scale=.8]
{$\begin{bmatrix}f_2,u_2\end{bmatrix}$};
\draw[->] (N2)--(R);
\end{tikzpicture}
\end{equation*}
\end{document}

答案3

需要tikz-cd從一開始嗎?

\documentclass[a4paper,11pt]{amsart}

\newcommand{\mapname}[1]{%
  \left[\begin{smallmatrix}#1\end{smallmatrix}\right]%
}
\newcommand{\map}[1]{\xrightarrow{\mapname{#1}}}
\newcommand{\fmod}[1]{{\operatorname{mod-}}#1}

\begin{document}

Let
\begin{alignat*}{2}
\Sigma_1 &\colon &\quad& 0 \to M_1 \map{u_1 \\ f_1} M_2\oplus N_1 \map{f_2,u_2} N_2 \to 0 \\
\Sigma_2 &\colon &\quad& 0 \to M_2 \map{v_1 \\ f_2} M_3\oplus N_2 \map{f_3,v_2} N_3 \to 0
\end{alignat*}
be short exact sequences in $\fmod{A}$. Then the sequence
\begin{equation*}
\Sigma_3 \colon \quad 0 \to M_1 \map{v_1u_1 \\ f_1} M_3\oplus N_1 \map{f_3,-v_2u_2} N_3 \to 0
\end{equation*}
is exact. Moreover we have $\delta_{\Sigma_3}=\delta_{\Sigma_1}+\delta_{\Sigma_2}$.

\end{document}

在此輸入影像描述

相關內容