I need some help to put a hole at the right position please. Here is the diagram:

\xymatrix { \{\iota\} \sqcup A^0 \ar@{->}[rddd]\ar@{->}[dd]_-{\bigsqcup\limits_{\alpha\in A^0} g_\alpha} \ar@{->}[rr]^-{} && \{\iota\} \sqcup A \ar@{->}[rddd]^/20pt/{\rho^{\{\iota\}}(f)} \ar@{->}[rr]^-{\phi} \ar@{->}[dd]_-{} && X \ar@{->}[rdrdd]^-{g}  \\  && &&  \\ \bigsqcup\limits_{\alpha\in A^0} P_\alpha \ar@{->}[rddd]_-{\subset} \ar@{->}[rr]^-{}|!{[r]}\hole && \widehat{A}\ar@{-->}[rddd]_/10pt/{\exists !} \ar@{-->}[rruu]^-{\exists !} && \\ &\{\iota\} \sqcup B^0 \ar@{->}[dd]^-{\bigsqcup\limits_{\beta\in B^0} g_\beta} \ar@{->}[rr]^-{} && \{\iota\} \sqcup B \ar@{->}[rrr]^-{\psi} \ar@{->}[dd]_-{} &&& Y \\  &&& && \\ &\bigsqcup\limits_{\beta\in B^0} P_\beta \ar@{->}[rr]^-{} && \widehat{B} \ar@{-->}[rrruu]^-{\exists !} && }

enter image description here

I would like to push the hole on the left so that it is under the arrow from ${\iota} \sqcup A^0$ to ${\iota} \sqcup B^0$. I don't know how to do that. Thanks for your help.


In xy-matrix, you can specify how far you want the hole (or label) along the arrow using parentheses, so \ar[r]|(0.5)\hole places a hole halfway along the arrow, \ar[r]|(0.9)\hole places it nine-tenths of the way along the arrow, and so on. A little trial and error determined that in this case, it should be \ar@{->}[rr]^-{}|(0.315)\hole.

Here's the full diagram.

\xymatrix {
    \{\iota\} \sqcup A^0 \ar@{->}[rddd]
                         \ar@{->}[dd]_-{\bigsqcup\limits_{\alpha\in A^0} g_\alpha}
    && \{\iota\} \sqcup A \ar@{->}[rddd]^/20pt/{\rho^{\{\iota\}}(f)} 
    && X \ar@{->}[rdrdd]^-{g} \\
    && && \\
    \bigsqcup\limits_{\alpha\in A^0} P_\alpha \ar@{->}[rddd]_-{\subset}
                                              \ar@{->}[rr]^-{}|(0.315)\hole % here
    && \widehat{A} \ar@{-->}[rddd]_/10pt/{\exists !}
                   \ar@{-->}[rruu]^-{\exists !} && \\
    &\{\iota\} \sqcup B^0 \ar@{->}[dd]^-{\bigsqcup\limits_{\beta\in B^0} g_\beta}
    && \{\iota\} \sqcup B \ar@{->}[rrr]^-{\psi}
                          \ar@{->}[dd]_-{} &&& \\
    &&& && \\
    &\bigsqcup\limits_{\beta\in B^0} P_\beta \ar@{->}[rr]^-{}
    && \widehat{B} \ar@{-->}[rrruu]^-{\exists !} &&

Related TeX.SX posts: 1 and 2.

(Finally, and this is a minor point, but \ar without @{} defaults to \ar@{->}, which could save you some typing. Similarly, you don't need to decorate with ^{} or _{}, since they don't do anything if empty.)

  • Thank you. Yes I knew for ^{} and _{} : they are in the source because I replaced the macros \fR{} and \fD{} I am using by what you mention in the source. Oct 12 '15 at 16:12

Alternative method with tikz-cd: crossing over is easy, it's just necessary at times to draw an arrow later.

For the Y node, some adjustment is necessary for getting parallel arrows.



\begin{tikzcd}[column sep=1.5em]
\{\iota\} \sqcup A^0
  \arrow[dd,swap,"\bigsqcup\limits_{\alpha\in A^0} g_\alpha"]
%  \arrow[rddd]% later, for crossing over
  \arrow[rr] &&
\{\iota\} \sqcup A
%  \arrow[rddd,"\rho^{\{\iota\}}(f)"]% later, for crossing over
  \arrow[rr,"\phi"] &&
  \arrow[rrddd,xshift=-.4em,end anchor={[xshift=.4em]north},"g"] \\ \\
\bigsqcup\limits_{\alpha\in A^0} P_\alpha
  \arrow[rr] &&
  \arrow[rruu,dashed,"\exists!"] \\
&\{\iota\} \sqcup B^0
  \arrow[luuu,<-,crossing over]% reversed!
  \arrow[dd,"\bigsqcup\limits_{\beta\in B^0} g_\beta"]
  \arrow[rr,crossing over] &&
\{\iota\} \sqcup B
  \arrow[luuu,<-,crossing over,swap,pos=0.3,"\rho^{\{\iota\}}(f)"]% reversed!
  \arrow[dd] &&&
Y \\ \\
&\bigsqcup\limits_{\beta\in B^0} P_\beta
  \arrow[rr] &&


enter image description here


In addition to egreg's solution, here is a not hard coded correction in order to get parallel arrows. I also changed a bit the way to annotate this just in order to show possibilities. Choose the way you like.

% arara: pdflatex


\begin{tikzcd}[column sep={15ex,between origins}, row sep={5em,between origins}]
    \{\iota\} \sqcup A^0 \arrow{d}[swap]{\bigsqcup\limits_{\alpha\in A^0} g_\alpha} \arrow{rr} 
    & &[-2.5em]
    \{\iota\} \sqcup A \arrow{d}\arrow{rr}{\phi} 
    & &[-5em]
    X \arrow{rdd}{g} 
    \bigsqcup\limits_{\alpha\in A^0} P_\alpha \arrow{rdd}[swap]{\subset}\arrow{rr} 
    & & 
    \widehat{A} \arrow[dashed]{rdd}[swap,pos=.25]{\exists!}\arrow[dashed]{rru}{\exists!} 
    \{\iota\} \sqcup B^0 \arrow[leftarrow,crossing over]{luu}\arrow{d}{\bigsqcup\limits_{\beta\in B^0} g_\beta}\arrow[crossing over]{rr}
    & &
    \{\iota\} \sqcup B \arrow[leftarrow,crossing over]{luu}[swap,pos=0.3]{\rho^{\{\iota\}}(f)}\arrow{rr}{\psi}\arrow{d}
    & &
    \bigsqcup\limits_{\beta\in B^0} P_\beta \arrow{rr} 
    & &
    \widehat{B} \arrow[dashed]{rru}{\exists!}
    & &

enter image description here

  • 1
    I keep forgetting between origins!
    – egreg
    Nov 16 '15 at 21:52

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.