latex,交换图

latex,交换图

我有这个图表:

\begin{equation*}
\begin{tikzpicture}
    \matrix (m) [matrix of math nodes, row sep=2.5em,
            column sep=3em, text height=0.75ex, text depth=0.5ex] {
       0& A& B& C&0 \\
     0&\textstyle\sum^{-i-1}M_{-i-1}& N &\textstyle\sum^{-i}M_{-i}& 0\\ };


        \path[->] (m-1-2) edge node[above] {} (m-2-2);
         \path[->] (m-1-3) edge node[above] {} (m-2-3);
        \path[->] (m-1-4) edge node[above] {} (m-2-4);
        \path[->] (m-1-1) edge node[above] {} (m-1-2);
       \path[->] (m-1-2) edge node[above] {} (m-1-3);



         \path[->] (m-1-3) edge node[above] {} (m-1-4);

         \path[->] (m-1-4) edge node[above] {} (m-1-5);


        \path[->] (m-2-1) edge node[above] {} (m-2-2);

        \path[->] (m-2-2) edge node[above] {} (m-2-3);

         \path[->] (m-2-3) edge node[above] {} (m-2-4);

         \path[->] (m-2-4) edge node[above] {} (m-2-5);

\end{tikzpicture}  
\end{equation*}

我该怎么做才能使垂直箭头不触及底线上的内容(\textstyle\sum^{-i-1}M_{-i-1}N\textstyle\sum^{-i}M_{-i})?

答案1

使用起来更简单tikz-cd

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\begin{document}

\begin{equation*}
\begin{tikzcd}
  0 \arrow[r] & A \arrow[r] \arrow[d] & B \arrow[r] \arrow[d] & C \arrow[r] \arrow[d] & 0 \\
  0 \arrow[r] & \sum^{-i-1}M_{-i-1} \arrow[r] & N \arrow[r] & \sum^{-i}M_{-i} \arrow[r] & 0
\end{tikzcd}
\end{equation*}

\end{document}

在此处输入图片描述

相关内容