logo

Drawing Diagrams of Universal Properties with TikZ 📂Writing

Drawing Diagrams of Universal Properties with TikZ

Code

diagram.png

\documentclass[12pt]{article}
\usepackage{tikz}

\begin{document}

$$
\begin{tikzpicture}[node distance=3.5cm, auto]
  \node (Vtimes) {$V_{1} \times V_{2}$};
  \node (Votimes) [right of = Vtimes] {$V_{1} \otimes V_{2}$};
  \node (W) [node distance=2.0cm, below of = Votimes] {$W$};
  \draw[->] (Vtimes) to node [swap] {$\phi$} (W);
  \draw[->] (Vtimes) to node {$f$} (Votimes);
  \draw[->, dashed] (Votimes) to node {$\psi$} (W);
\end{tikzpicture}
$$

\end{document}

설명

$\KaTeX$ is still lacking the ability to draw diagrams. To draw diagrams like the one shown above, which includes diagonal lines, the help of TikZ is necessary. The code above works flawlessly on Overleaf.