I am trying to typeset the following diagram, which is part of the definition of Kan extension, using xymatrix. Here is a MWE of what I am currently trying to do.



       \X \ar[rrr]^{F} \ar[ddrr]_{K}  &&& \Y \\
        &\rtwocell<\omit>{\eta} && \\
       && \Z \uurtwocell^{\lank{K}{F}~~~~~}_{G}{\alpha}& 

Basically, the above is me trying to get xymatrix to produce a diagram with decent looking 2-cells. I have also experimented with the following:

   \X \ar[rrr]^{F} \ar[ddrr]_{K}  &\ar@{}[d]|{~~~~~~~~\stackrel{\Downarrow}{\eta}}&& \Y \\
    & && \\
   && \Z \uurtwocell^{\lank{K}{F}~~~~~}_{G}{\alpha}& 

Either of these conveys the message I want to get across, but there are some aesthetic qualities missing. In the first, the two-cell arrows don't look very nice. In the second, I could have spent more time getting the arrows to be the same size, and getting everything into the correct position. This involves a lot of manual fiddling, which is fine if there is no other way. My question is this: Is there any way to approach drawing such diagrams, with two-cells, in a uniform fashion.

  • 3
    This question appears very broad to me. Please read the documentation of tikz-cd or the part about \usetikzlibrary{cd} in the pgf manual. Everything not listed there will most probably be possible with pure TikZ. If you have some specific question about a two cell diagram, please add it to your post. Thanks.
    – LaRiFaRi
    Commented Apr 17, 2015 at 22:40
  • Okay, I am adding now. Commented Apr 19, 2015 at 1:53
  • 1
    Could you please make it so we can compile your code? I dare say TikZ can do this and I know a little TikZ. But I don't know what it should look like and I don't know what class or packages to use so I can't compile your code to see what you're talking about!
    – cfr
    Commented Apr 19, 2015 at 2:39
  • Without a full minimal working example (MWE) it is impossible, for me at least, to tell what you are looking fro. The MWE should look like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. This saves everyone time:)
    – user30471
    Commented Apr 19, 2015 at 5:52
  • What is \lank, what is \X\Y\Z? Please help us help you and get rid of all this extra information. We can not compile your code an thus can't help.
    – LaRiFaRi
    Commented Apr 20, 2015 at 8:58

1 Answer 1


Do you mean something like this?

enter image description here

You can do this using tikz-cd with:

       X \arrow[r,"F"]  \arrow[d,"G"{name=G,left}]& Y \\
       Z \arrow[ur, "H"{name=H,right}, dashrightarrow]
       \arrow[Rightarrow,from=G,"\eta", to=H{shift left=1ex}]

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