# A problem with drawing a diagram arrow

Attached a code in latex. I want to draw a (dashed) arrow from $R'$ into $R_S$, but the arrow I define is always merged with the arrow from $R_S$. How can I do it?

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
S \arrow[r, "i_R"] \arrow[d, "\phi| _S"]
& R \arrow [r,"\tau"] \arrow[d,"\phi"] & R_S  \arrow[dl,dashed,"\exists !\phi'"]   \\
(R')^{*} \arrow [r,"i_{R'}"]
& R' % \arrow [ur,dashed,"\exists !\tau'" yshift=-2.5ex]
\end{tikzcd}

\end{document}


You can shift both diagonal arrows; I also suggest to swap the label in the vertical arrows.

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
S \arrow[r, "i_R"] \arrow[d, "\phi| _S"']
& R \arrow[r,"\tau"] \arrow[d,"\phi"']
& R_S \arrow[dl,dashed,"\exists !\phi'",shift left=0.5ex] \\
(R')^{*} \arrow[r,"i_{R'}"]
& R'  \arrow[ur,dashed,"\exists !\tau'",shift left=0.5ex]
\end{tikzcd}

\end{document}


(Sorry, but at the moment I cannot add images for technical reasons)

You can swap the two diagonal arrows by shifting them right and swapping the label position.

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
S \arrow[r,"i_R"] \arrow[d,"\phi| _S"']
& R \arrow[r,"\tau"] \arrow[d,"\phi"']
& R_S  \arrow[dl,dashed,"\exists !\phi'\!"',shift right=0.5ex] \\
(R')^{*} \arrow[r,"i_{R'}"]
& R'  \arrow[ur,dashed,"\exists !\tau'"', shift right=0.5ex]
\end{tikzcd}

\end{document}

• That's okay, how can I put the $R' \to R_S$ bellow the first one?Thanks – I am not Paul Erdos Sep 7 '17 at 22:58
• Alright, I checked it again, and I don't need it. – I am not Paul Erdos Sep 7 '17 at 23:13
• @IamnotPaulErdos I swapped the diagonal arrows anyhow – egreg Sep 7 '17 at 23:16
• Alright thanks. I found that it's negligible and prefered not to bother you for it, but that's still better – I am not Paul Erdos Sep 7 '17 at 23:22