0

Here is the diagram I want to draw:

enter image description here

I know how to draw ordinary commutative diagram like this and here is my trial:

\documentclass{book}
\usepackage{tikz-cd}
\begin{document}
$$\begin{tikzcd}[row sep=huge]
  & X\ar[dl,"Id_{X}",swap,sloped] \ar[dr,"Id_{X}",sloped] \ar[d,dashed,"{ \vartriangle }" description] & \\
X & X\times X\ar[l,"Pr_{X}"] \ar[r,"Pr_{X}",swap] & X
\end{tikzcd}$$
\end{document}

But I do not know how to draw this tilted commutative diagram. Could anyone help me with drawing so, please?

2
  • Are you loading the tikz-cd package?
    – Sigur
    Apr 1 at 0:49
  • Yeah I do @Sigur
    – Idonotknow
    Apr 1 at 0:54

1 Answer 1

3

You should familiarize yourself with the basic examples in the tikz-cd documentation.

The basic idea is to create a matrix, in your example, 3 rows and 3 columns.

\begin{tikzcd}
   & A\\
   & P\\
  X & & Y
\end{tikzcd}

enter image description here

Arrows are added using the \arrow command, which has many options. The arrows can be aimed using the letters u, d, l, r in any combination. For example, to point an arrow down two rows and right one column, use \arrow[ddr].

enter image description here

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
 \[
  \begin{tikzcd}[row sep=1cm]
    &A\arrow[ddl,"f_1"']\arrow[ddr,"f_2"]\arrow[d,dotted,"\bar{f}" description]\\
    &P\arrow[dl,"p_1"]\arrow[dr,"p_2"']\\
    X&&Y
  \end{tikzcd}
  \]
\end{document}
1
  • Thank you very very much!! this pdf is really super helpful!
    – Idonotknow
    Apr 1 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.