如何使用 Tikz cd 绘制此图

如何使用 Tikz cd 绘制此图
\begin{center}
\begin{tikzpicture}

\node (A) at (0,0) {$U\times V$};
\node[right=of A] (B) {$F^{U\times V}$};
\node[right=of B] (C) {$U\otimes V$};
\node [below=of B] (D) {$W$};


\draw[->] (A)--(B) node [midway,above] {$j$};
\draw[->] (B)--(C) node [midway,above] {$\pi$};
\draw[->] (A)--(D) node [midway,left,below] {$f$};
\draw[dashed,->] (B)--(D) node [midway,right] {$\sigma$};
\draw[->,bend left] (A) to node [above] {$t$} (C) ;
\draw[dashed,->] (C)--(D) node [midway,below] {$\tau$};

\end{tikzpicture}
\end{center}

答案1

我展示了两种构建图表的方法。这肯定tikz-cd会带来更好的语法和输出。

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{positioning} % for the original

\begin{document}

With \texttt{tikzcd}

\begin{tikzcd}
U\times V
  \arrow[dr,swap,"f"]
  \arrow[r,"j"]
  \arrow[rr,bend left,"t"]
& F^{U\times V}
  \arrow[d,dashed,"\sigma"]
  \arrow[r,"\pi"]
& U\otimes V
  \arrow[dl,dashed,"\tau"]
\\
& W
\end{tikzcd}

\bigskip

With \texttt{tikzpicture}

\begin{tikzpicture}

\node (A) at (0,0) {$U\times V$};
\node[right=of A] (B) {$F^{U\times V}$};
\node[right=of B] (C) {$U\otimes V$};
\node [below=of B] (D) {$W$};


\draw[->] (A)--(B) node [midway,above] {$j$};
\draw[->] (B)--(C) node [midway,above] {$\pi$};
\draw[->] (A)--(D) node [midway,left,below] {$f$};
\draw[dashed,->] (B)--(D) node [midway,right] {$\sigma$};
\draw[->,bend left] (A) to node [above] {$t$} (C) ;
\draw[dashed,->] (C)--(D) node [midway,below] {$\tau$};

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容