5
\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{extsizes}
\usepackage{blindtext}
\textheight 9.3in \textwidth 6.5in
\calclayout
\usepackage{mathtools}
\usepackage{amsmath,amsthm,amsfonts,amssymb} 
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage[normalem]{ulem} 
\usepackage{tikz-cd}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel} 
\usepackage{color}
\pagestyle{myheadings}
\begin{document}

\begin{tikzcd}
 A \arrow[dd, "p"'] \arrow[ddrr, phantom, "\Rightarrow"] \arrow[rr, "q"] &  & B \arrow[dd, "r"] \\
 &  &  \\
 C \arrow[rr, "s"] &  & D
 \end{tikzcd}

    \begin{tikzcd}
A \arrow[dd, "p"'] \arrow[rrdd, "q"]    &  & \\
&  &                                                  \\
B \arrow[rr, "r"] &  & C                                         
\end{tikzcd}

 \end{document}

This is what I have written to get a commutative diagram.

I want to add an arrow (\Rightarrow) inside the diagram from bottom left corner to top right corner. Can some one help me to do this? I have tried to add using "phantom" but it is not coming as I expected. I want this pointing from top left corner to bottom right corner (or bottom left corner to top right corner).

8
  • Just add \arrow[ddrr] after A. But why doubling the number of rows and columns?
    – egreg
    Jun 12 '19 at 14:45
  • No No. I do not want from A to D. I want this arrow to be "inside" the diagram.. I do not know how to clarify this.. I want to draw a commutative diagram. Some symbol showing this is commutative diagram @egreg Jun 12 '19 at 14:54
  • \arrow[uurr] rightafter C, then. Or insert \circlearrowleft in the centre of the diagram.
    – Bernard
    Jun 12 '19 at 15:04
  • “All diagrams in this paper are understood to be commutative, unless the contrary is explicitly stated for a particular diagram”.
    – egreg
    Jun 12 '19 at 15:06
  • @egreg that is definitely one option :) I am planning to do in diagram also :) Please see the edit.. Jun 12 '19 at 15:11
7

You can shorten a Rightarrow as you like.

For the triangle, you can name the label and draw an arrow to it.

\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{tikz-cd}
\tikzcdset{row sep/normal=50pt, column sep/normal=50pt}

\begin{document}

\begin{tikzcd}
    A\arrow[d, "p"']\arrow[Rightarrow, shorten >=25pt, shorten <=25pt, dr]\arrow[r, "q"] &  B\arrow[d, "r"]\\
    C\arrow[r, "s", swap] & D
\end{tikzcd}

\begin{tikzcd}
    A\arrow[d, "p"']\arrow[r, "q"] &  B\arrow[d, "r"]\\
    C\arrow[r, "s", swap]\arrow[Rightarrow, shorten >=25pt, shorten <=25pt, ur] & D
\end{tikzcd}

\begin{tikzcd}
    A\arrow[d, "p"']\arrow[rd, "q"{name=M}] \\
    B\arrow[r, "r", swap]\arrow[Rightarrow, shorten >=10pt, shorten <=10pt, to=M] & C
\end{tikzcd}

\end{document}

enter image description here

2
  • I am realising the beauty.. This makes so much sense.. If I write " \arrow[Rightarrow, ur]", it will give arrow from C to B... If I do not want to start from C, I should just decrease the length of the arrow :D :D, how do I do that? by writing " \arrow[Rightarrow, shorten >=30pt, shorten <=30pt, ur]" :D :D Thanks... Jun 13 '19 at 5:31
  • 1
    @PraphullaKoushik Yes, it's very simple :)
    – CarLaTeX
    Jun 13 '19 at 5:37
6

Why not simply this, to specify the diagram commutes? Unrelated: I took the liberty to simplify your code, in particular removing unnecessary packages (already loaded by another package).

\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{extsizes}
\usepackage{blindtext}
\textheight 9.3in \textwidth 6.5in
\calclayout
\usepackage{mathtools}
\usepackage{amsthm,amssymb}
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage[normalem]{ulem}
\usepackage{tikz-cd}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\pagestyle{myheadings}

\begin{document}

\begin{tikzcd}[row sep = large, column sep = large]
 A \arrow[d, "p"'] \arrow[r, "q"] & B \arrow[d, "r"] \\
 C \arrow[ur, phantom, "\scalebox{1.5}{$\circlearrowleft$}" description]\arrow[r, "s"] & D
 \end{tikzcd}

 \end{document} 

enter image description here

3
  • Thank you. I have combined your answer with other answer and got what I wanted.. :) Jun 12 '19 at 15:35
  • I have added the answer.. If you think it can be made better, please feel free to edit :) Jun 12 '19 at 15:41
  • I am having trouble doing the something for triangle.. I have added in the question.. can you please see. Jun 12 '19 at 16:25
4

You can use a phantom arrow, with the label in the middle via description and sloped.

\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[sep=huge]
A \arrow[dr,phantom,"\to" description, sloped]
  \arrow[d, "p"'] \arrow[r, "q"] & B \arrow[d, "r"] \\
C \arrow[r, "s"] & D
\end{tikzcd}

\end{document}

enter image description here

3
  • Thank you. I have combined your answer with other answer and got what I wanted.. :) Jun 12 '19 at 15:35
  • I have added the answer.. If you think it can be made better, please feel free to edit :) Jun 12 '19 at 15:41
  • I am having trouble doing the something for triangle.. I have added in the question.. can you please see.. Jun 12 '19 at 16:24
2
\documentclass[12pt,reqno,a4paper]{amsart}
\usepackage{extsizes}
\usepackage{blindtext}
\textheight 9.3in \textwidth 6.5in
\calclayout
\usepackage{mathtools}
\usepackage{amsmath,amsthm,amsfonts,amssymb} 
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage[normalem]{ulem} 
\usepackage{tikz-cd}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel} 
\usepackage{color}
\pagestyle{myheadings}
\begin{document}


\begin{tikzcd}
A \arrow[dd, "p"'] 
\arrow[rr, "q"] &  & B \arrow[dd, "r"] \\
&  &  \\
C \arrow[rr, "s"] \arrow[uurr, phantom, "\scalebox{2}{$\Rightarrow$}" description, sloped] &  & D
\end{tikzcd}.

 \end{document}

enter image description here

2

Here there are two version using xy package. The first mode has the classic tips (see the example below),

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[all]{xy}
\usepackage{amssymb}
\newcommand{\RLongrightarrow}{\rotatebox{45}{$\Longrightarrow$}}
\usepackage{graphicx}
\begin{document}
\xymatrix@R=3pc@C=3pc{\ar @{} [dr] |{\RLongrightarrow}
A \ar[d] \ar[r] & B \ar[d] \\
C \ar[r] & D}
\end{document}

the second has the same tips of tikz-cd where I have forgotten, before, to add the labels. See the code below and the image:

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\newcommand{\RLongrightarrow}{\rotatebox{45}{$\Longrightarrow$}}
\usepackage{graphicx}
\begin{document}
\xymatrix@R=3pc@C=3pc{\ar @{} [dr] |{\RLongrightarrow}
A \ar[d]_p \ar[r]^q & B \ar[d]^r \\
C \ar[r]_s & D}
\end{document}

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.