# Which package should I use for doing a connecting homomorphism diagram like this in latex

which package should I use for doing a diagram like this in latex:

-
Thanks I'll look for them =D –  Dion May 18 '13 at 20:48
Ah, that was supposed to be xy-pic (the \xymatrix macro is what you are looking for). There are a few tikz-cd questions here that are very similar to your image (especially the long arrow): How to draw bent arrows going to a new line in long formulas (ex. chain complexes), How do you draw the "snake" arrow for the connecting homomorphism in the snake lemma? and Tikz-cd and snake lemma: "loseness" and centered figures. –  Qrrbrbirlbel May 18 '13 at 21:11
That's the Mayer-Vietoris sequence. Couldn't have passed my qualifying exams without it! –  Matthew Leingang May 18 '13 at 21:11
that's right =D –  Dion May 18 '13 at 22:13
I don't know tikz-cd so perhaps that'll do it., but if not I'd recommend using tikz along with tikzmark. Then you could easily separate the drawing from the the text, or better still come up with a macro to automate this, but then the trick is really to figure out how you want to specify these types of diagrams. –  Peter Grill May 18 '13 at 22:50

Using xy-pic package for Commutative Homomorphism diagrams. your diagram was made using xy-pic as suggested by Qrrbrbirlbel in his comment

code for diagram

\documentclass[12pt,border=5pt]{standalone}
\usepackage[all]{xy}
\begin{document}
\xymatrix{
& H^{k+1}(M) \ar[r]^<<<<<<<<<<<{i^*} & \cdots \\
& H^k(M) \ar[r]^>>>>>{i^*}
& H^k(U) \oplus H^k(V) \ar[r]^>>>>>{j^*}
& H^k(U \cap V) \ar [ul] [l] [lllu] |{d^*} [l] [rlllu] \\
&  *{}  & \cdots \ar[r]^<<<<<<<<<<{j^*}
& H^{k-1}(U \cap V) \ar [ul] [l] [lllu] |{d^*} [l] [rlllu] }
\end{document}


Output:

-

Here's one possibility using tikz-cd:

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

\tikzset{
curarrow/.style={
rounded corners=8pt,
execute at begin to={every node/.style={fill=red}},
to path={-- ([xshift=50pt]\tikztostart.center)
|- (#1) node[fill=white] {$\scriptstyle d^*$}
-| ([xshift=-40pt]\tikztotarget.center)
-- (\tikztotarget)}
}
}

\begin{document}

\begin{tikzcd}[cells={nodes={text height=2ex,text depth=0.75ex}}]
{} & & H^{k+1}(M) \arrow{r}{i^*} & \cdots \\
{} & & H^k(M)
\arrow{r}{i^*}
& H^k(U) \oplus H^k(V) \arrow{r}{j^*}
\arrow[draw=none]{u}[name=Y, shape=coordinate]{}
\arrow[draw=none]{d}[name=Z,shape=coordinate]{}
& H^k(U \cap V) \arrow[curarrow=Y]{ull}{} \\
& & & \cdots \arrow{r}{j^*} & H^{k-1}(U \cap V)
\arrow[curarrow=Z]{ull}{} \\
\end{tikzcd}

\end{document}


-

Here is one possible solution using tikz

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{figure}[htbp]
\begin{tikzpicture}
\tikzstyle{tight}  = [outer sep=0,inner sep=0]
\tikzstyle{myarr}  = [-stealth]
\tikzstyle{myline} = [-,tight]
\node (v1) at (1,0)     {$\dots$};
\node (v2) at (3.5,0)   {$H^{k-1}\left(U \bigcap V \right)$};
\node (v5) at (0,1)     {$d*$};
\node (v13) at (0,3)    {$d*$};
\node (v8) at (-3.5,2)  {$H^k\left( M \right)$};
\node (v9) at (0,2)     {$H^k\left( U \right) \otimes H^k\left( V \right)$};
\node (v10) at (3.5,2)  {$H^{k}\left(U \bigcap V \right)$};
\node (v16) at (-3.5,4) {$H^{k+1}\left( M \right)$};
\node (v17) at (-1,4)   {$\dots$};
\draw [myline](5,0)  node (v3)  {} .. controls (6,0) and (6,1)   .. (5,1)  node (v4) {};
\draw [myline](-5,1) node (v6)  {} .. controls (-6,1) and (-6,2) .. (-5,2) node (v7) {};
\draw [myline](5,2)  node (v11) {} .. controls (6,2) and (6,3)   .. (5,3)  node (v12) {};
\draw [myline](-5,3) node (v14) {} .. controls (-6,3) and (-6,4) .. (-5,4) node (v15) {};
\node at (2,0.25) {$j*$};
\node at (-2,2.25) {$i*$};
\node at (2,2.25) {$j*$};
\node at (-2,4.25) {$i*$};

\draw [myarr] (v1) edge (v2);
\draw [myarr] (v7) edge (v8);
\draw [myarr] (v8) edge (v9);
\draw [myarr] (v9) edge (v10);
\draw [myarr] (v15) edge (v16);
\draw [myarr] (v16) edge (v17);

\draw [myline] (v2) edge (v3);
\draw [myline] (v4) edge (v5);
\draw [myline] (v5) edge (v6);
\draw [myline] (v10) edge (v11);
\draw [myline] (v12) edge (v13);
\draw [myline] (v13) edge (v14);
\end{tikzpicture}
\end{figure}
\end{document}


Which produces result like this:

-
If you want the asterisks to be superscripted, just replace i* with i^* and so on. –  John Wickerson May 19 '13 at 6:28
Yeah sure, I missed that, trivial.... –  Nicholas Hamilton May 19 '13 at 6:51
Also, it looks like \otimes should be replaced with \oplus, and \bigcap should be replaced with \cap. –  John Wickerson May 19 '13 at 7:29