# [Tex/LaTex] Drawing diagrams of higher categories with TikZ

diagramstikz-pgf

I a planning to give an introductive talk about strict n-categories and I wanted to use TikZ to show the relations between the k-morphims by some cellular diagrams.

To be precise, I want to draw diagrams just like the four diagrams you can find at the top of the page vi of the introduction of Tom Leinster's book "Higher Operads, Higher Categories" http://arxiv.org/abs/math.CT/0305049

The two firsts are of course easy. For the third one I was able to find this

\begin{tikzcd}
A \arrow[bend left=50]{r}[name=U,below]{} \arrow[bend right=50]{r}[name=D]{} & B \arrow[Rightarrow,to path={(U) -- (D)}]{}
\end{tikzcd}


Unfortunatly I have no clue how to modify my code to draw the last one. Any Ideas ?

Something like this?

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

\begin{document}

\begin{tikzcd}[column sep=3cm]
a
\arrow[bend left=50]{r}[name=U,below]{}{f}
\arrow[bend right=50]{r}[name=D]{}[swap]{g}
&
b
\arrow[Rightarrow,to path={(U) to[out=-150,in=150] node[auto,swap] {$\scriptstyle\alpha$} coordinate (M) (D)}]{}
\arrow[Rightarrow,to path={(U) to[out=-30,in=30] node[auto] {$\scriptstyle\beta$} coordinate (N)  (D)}]{}
\arrow[Rightarrow,to path={([xshift=4pt]M) -- node[auto] {$\scriptstyle\Gamma$} ([xshift=-4pt]N)}]{}
\end{tikzcd}

\end{document}


With a little more work the original style can be emulated:

\documentclass{article}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{calc,arrows}

\tikzset{
mydot/.style={circle,fill,inner sep=1.5pt},
commutative diagrams/.cd,
arrow style=tikz,
diagrams={>=latex},
}

\begin{document}

\begin{tikzcd}[column sep=3cm]
\arrow[to path={node[mydot,label={left:$a$}] {}}]{}
\arrow[bend left=50]{r}[name=U,below]{}{f}
\arrow[bend right=50,shorten >= -3.5pt,shorten <= -3.5pt]{r}[name=D]{}{}
\arrow[to path={node[below,yshift=-2pt] at (D) {$\scriptstyle g$} {}}]{}
&
\arrow[to path={node[mydot,label={right:$b$}] {}}]{}
\arrow[Rightarrow,to path={(U) to[out=-160,in=160] node[auto,swap] {$\scriptstyle\alpha$} coordinate (M) (D)}]{}
\arrow[Rightarrow,to path={(U) to[out=-20,in=20] node[auto] {$\scriptstyle\beta$} coordinate (N)  (D)}]{}
\arrow[to path={node[label={center:\scalebox{1.9}[0.75]{$\Rrightarrow$}},label={[yshift=-2pt]above:$\scriptstyle\Gamma$}] at ( $(M)!0.5!(N)$ ) {}}]{}
\end{tikzcd}

\end{document}