4

I want to build a chain of commutative diagram

I did get the code here for building the commutative diagram. This is the code.

\documentclass[12pt,twoside,a4paper]{report}
\usepackage{tikz-cd}
%\newcommand{\nospaceperiod}{\makebox[0pt][l]{\,}}
\begin{document}
\[
\begin{tikzcd}
V_1 \arrow{r} \arrow{d}{f_1} &
  V_2    \arrow{r} \arrow{d}{f_2} &
 \cdots \arrow{r} &
  V_{n-1} \arrow{r}    \arrow{d}{f_{n-1}} &
  V_n \arrow{d}{f_n}
\\
W_1 \arrow{r} &
 W_2      \arrow{r} &
 \cdots      \arrow{r} &
  W_{n-1} \arrow{r} &
W_n
\end{tikzcd}
\]
\end{document}

which gives this output

enter image description here

I am almost done. I just want to know what do I change in \arrow{r} to make the right arrow to be two sided arrow or hook arrow or curved arrow.

I want output to look like these

chain of Commutative diagram

Curved arrow

Please share some manual that gives different keywords for different kind of arrows.

7
  • 3
    Simply use an option to arrow: \arrow[<->]{r}.
    – Sigur
    Commented May 3, 2019 at 15:07
  • 2
    To bend the arrow: \arrow[bend right]{r} or \arrow[bend left]{r}.
    – Sigur
    Commented May 3, 2019 at 15:09
  • Thank you.. \arrow[<->]{r} works. But how do add a curved arrow from one variable to other surpassing one or more middle variables.. Like in the last diagram above ? Commented May 3, 2019 at 15:13
  • 2
    Use r twice: \arrow[bend right]{rr}
    – Sigur
    Commented May 3, 2019 at 15:14
  • That works well :) Thank you Commented May 3, 2019 at 15:17

1 Answer 1

4

For two sided arrow, simply replace it by: \arrow[<->]{r}.

To bend the arrow, use: \arrow[bend right]{r} or \arrow[bend left]{r}

Use \arrow[bend right]{rr}to point the curved arrow to next but one variable.

To get the output as in last image, use this code

\documentclass{report}
\usepackage{tikz-cd,bbm,amsmath,amssymb}

\begin{document}
\[
\begin{tikzcd}
I    \arrow{r}{s}
     \arrow[bend right]{rr}{\mathbbm{1}} &
X^c  \arrow{r}{p}                        &
I 
\end{tikzcd}
\]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .