Tilted arrows in latex

arrowstikz-arrowstikz-cd

Here is the figure I want to draw:
enter image description here

Could someone show me how to draw tilted arrows please? I know how to draw a commutative triangle like this:

\documentclass{book}
\usepackage{tikz-cd}
\begin{document}
 \[
    \begin{tikzcd}
    A \arrow [r, dashed ,"\tilde{f}"] \arrow[swap]{dr}{f} & E \arrow{d}{i} \\
     & X
  \end{tikzcd}
  \]
\end{document}

Best Answer

In tikz-cd use dl to indicate the arrow should go "down-left". Similarly, dr is "down-right". Remember to add an extra empty cell in row two below the A (which is why there is an & before the first cell and two && in the second row). The extra single quote is shorthand for swap.

enter image description here

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\[
  \begin{tikzcd}
  & A \arrow[dl,"f_1"']\arrow[dr,"f_2"] \\
  X && Y
  \end{tikzcd}
\]
\end{document}

If you want the columns closer together, you can use \begin{tikzcd}[column sep=small], or you can set column sep=.5cm or any dimension you wish.

enter image description here

Related Question