如何绘制箭头不重叠的交换图?

如何绘制箭头不重叠的交换图?

我正在尝试绘制如下的交换图。

\usepackage{tikz-cd}
\usepackage{newtxmath}

\begin{document}
\[
\begin{tikzcd}
& P \arrow[d, "\pi_i" near start]  &\\
& P_i \arrow[u, "\iota_i" near start] \arrow[d, "\phi" near start] & \\ 
M \arrow[r, "\psi"]&N \arrow[r] & 0
\end{tikzcd}
\]
\end{document}

问题是平行箭头重叠导致图表看起来很糟糕。

在此处输入图片描述

我如何解决它?

答案1

您可以使用shift leftshift right键。

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

\begin{document}
\[
\begin{tikzcd}
& P \arrow[d, "\pi_i" near start,shift left=0.75ex]  &\\
& P_i \arrow[u, "\iota_i" near start,shift left=0.75ex] \arrow[d, "\phi" near start] & \\ 
M \arrow[r, "\psi"]&N \arrow[r] & 0
\end{tikzcd}
\]
\end{document}

在此处输入图片描述

相关内容