5
\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{extsizes}
\usepackage{blindtext}
\textheight 9.3in \textwidth 6.5in
\calclayout
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage[normalem]{ulem}
\usepackage{tikz-cd}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\begin{document}
\[\begin{tikzcd}
\underline{V} 
\arrow[rrrrdd,  bend left]
\arrow[rrdddd, bend right] \arrow[rrdd, dotted] &  &&  & \\
& & &  & \\
&  & A \arrow[dd] \arrow[rr] &  & B \arrow[dd] \\
&  &  &  & \\
&  & C \arrow[rr] &  & D                
\end{tikzcd}\]
\end{document}

above code is giving me following diagram

enter image description here

I used "phantom" technique to number part of commutative diagram. It did not work. I want to write

  • (1) in the diagram enclosed by V,A,B
  • (2) in the diagram enclosed by V,A,C
  • (3) in the diagram enclosed by A,B,C,D

Can some one help me to see how to do this?

3 Answers 3

8

Is this what you mean?

enter image description here

You can add the labels to your diagram with no arrows:

\[\begin{tikzcd}
\underline{V} 
\arrow[rrrrdd,  bend left]
\arrow[rrdddd, bend right] \arrow[rrdd, dotted] &  &&  & \\
& & (1) &  & \\
& (2) & A \arrow[dd] \arrow[rr] &  & B \arrow[dd] \\
&  &  & (3) & \\
&  & C \arrow[rr] &  & D                
\end{tikzcd}\]
1
  • absolutely.. this seem to be much easier than phantom thing,.. Commented Mar 18, 2019 at 12:40
9

Just for fun: tikz-cd is based on TikZ so

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[y=0.8cm]
\node (a) at (0,0) {$A$};
\node (b) at (2,0) {$B$};
\node (c) at (0,-2) {$C$};
\node (d) at (2,-2) {$D$};
\node (v) at (-2,2) {$\underline{V}$};
\draw[->] (a)--(b);
\draw[->] (b)--(d);
\draw[->] (a)--(c);
\draw[->] (c)--(d);
\draw[dotted,->] (v)--(a);
\draw[->] (v) to[bend right] (c);
\draw[->] (v) to[bend left] (b);
\node at (1,-1) {(3)};
\node at (0,1) {(1)};
\node at (-1,0) {(2)};
\end{tikzpicture}
\end{document}

enter image description here


But I prefer this way (though the way I code it is not efficient)

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[y=0.8cm,>=stealth]
\node (V) at (-2,2) {\phantom{$\underline{V}$}};
\node (B) at (2,0) {\phantom{$B$}};
\node (C) at (0,-2) {\phantom{$C$}};
\fill[yellow!50] (0,0) rectangle (2,-2);
\fill[green!20] (V) to[bend left] (B)--(2,0)--(0,0)--(V);
\fill[blue!20] (V) to[bend right] (C)--(0,-2)--(0,0)--(V);
\begin{scope}[every node/.style={fill=white,circle,draw}]
    \node (a) at (0,0) {$A$};
    \node (b) at (2,0) {$B$};
    \node (c) at (0,-2) {$C$};
    \node (d) at (2,-2) {$D$};
    \node (v) at (-2,2) {$\underline{V}$};
\end{scope}
\draw[->] (a)--(b);
\draw[->] (b)--(d);
\draw[->] (a)--(c);
\draw[->] (c)--(d);
\draw[dashed,->] (v)--(a);
\draw[->] (v) to[bend right] (c);
\draw[->] (v) to[bend left] (b);
\node at (1,-1) {(3)};
\node at (0,1) {(1)};
\node at (-1,0) {(2)};
\end{tikzpicture}
\end{document}

enter image description here

2
  • :) :) thanks... Commented Mar 18, 2019 at 12:41
  • @PraphullaKoushik You are welcome. Now you have got three answers, choose the best of them and tick the checkmark on the left of the answer (aka accept that answer). Doing so will mark this question as resolved.
    – user156344
    Commented Mar 19, 2019 at 5:32
7

With phantom arrows:

\documentclass[a4paper]{article}
\usepackage{tikz-cd}

\begin{document}

\[
\begin{tikzcd}[nodes in empty cells]
\underline{V}
  \arrow[rrrrdd,  bend left]
  \arrow[rrdddd, bend right]
  \arrow[rrdd, dotted]
  \arrow[rrrrdd,phantom,"(1)" description]
  \arrow[rrdddd,phantom,"(2)" description]
\\
&&&&\\
&& A \arrow[dd] \arrow[rr] & \arrow[dd,phantom,"(3)" description] &
B \arrow[dd] \\
&&&&\\
&& C \arrow[rr] && D
\end{tikzcd}
\]

\end{document}

enter image description here

You must log in to answer this question.

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