3

Hi I am trying to draw a long exact sequence and importantly with the terms appearing in threes. Unfortunately what comes out looks awful, does anyone have any ideas of how to make it look nicer? Specifically the diagonal arrows look nasty, are there ways perhaps to bend them or make them appear nicer? Also in the third row I was putting '...'s to cover the terms in between, but this looks bad and the diagonal arrows don't arrange themselves uniformly then. Any suggestions would be very much appreciated :)

I am using xy pic, here is my code:

Our relative long exact sequence is given by

\[ 
\xymatrix{
0 \ar[rr] && H^0(M, \Dd M) \ar[rr] && H^0(M) \ar[rr] && H^0(\Dd M) \ar[dllll]  \\
       && H^1(M, \Dd M) \ar[rr] && H^1(M) \ar[rr] && H^1(\Dd M) \ar[dllll]  \\
       && \cdots \ar[rr] && \cdots \ar[rr] && \cdots \ar[dllll] & \\
       && H^n(M, \Dd M) \ar[rr] && H^n(M) \ar[rr] && 0} \]

And here is what it looks like

enter image description here

(I have used double column spacing to fill the page space)

4
  • please always post a complete document so people can test locally and test any answers. Feb 21, 2015 at 15:11
  • Do some of the xy pic approaches in tex.stackexchange.com/q/3892/15925 help? Feb 21, 2015 at 15:12
  • Would you be willing to switch to the more modern and versatile tikz-cd? Feb 21, 2015 at 15:12
  • … or \pst-node` and its psmatrix environment?
    – Bernard
    Feb 21, 2015 at 15:35

2 Answers 2

6

Here's an option using the more modern and versatile tikz-cd, just in case you want to switch:

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

\newcommand\Dd{\partial}
\tikzset{
Curved/.style={
  rounded corners,to path={ -- ([xshift=2ex]\tikztostart.east)
    |- (#1) [near end]\tikztonodes
    -| ([xshift=-2ex]\tikztotarget.west)
    -- (\tikztotarget)
    }
  }
}
\newcommand{\plhold}[1]{%
  \makebox[\widthof{$#1$}]{$\vphantom{#1}{\cdots}$}%
}

\begin{document}

\begin{tikzcd}%[column sep=2cm]
0 \ar[r] 
  & H^0(M, \Dd M) \ar[r] 
  & H^0(M) \ar[r]\arrow[d, phantom, ""{coordinate, name=A}] 
  & H^0(\Dd M) \arrow[dll,Curved=A]  
\\
& H^1(M, \Dd M) \ar[r] 
  & H^1(M) \ar[r] \arrow[d, phantom, ""{coordinate, name=B}]
  & H^1(\Dd M) \arrow[dll,Curved=B]  
\\
& \plhold{H^n(M, \Dd M)} \ar[r] 
  & \plhold{H^n(M)} \ar[r]\arrow[d, phantom, ""{coordinate, name=C}] 
  & \plhold{H^1(\Dd M)} \arrow[dll,Curved=C] & 
\\
& H^n(M, \Dd M) \ar[r] 
  & H^n(M) \ar[r] 
  & 0 
\end{tikzcd}

\end{document}

enter image description here

Notice that using column sep=<length> you can have a better control over the separation of columns. I left that commented out in my example code to show you how to change it to your liking.

I shamelessly borrowed the \plhold macro from egreg's answer.

1
  • Thanks very much! I'm definitely going to spend some time practising tikz this is the second time someone has pointed out that it work nicer than xy for commutative diagrams. Feb 21, 2015 at 15:45
3

You may improve it by making the dots occupy as much horizontal and vertical space as the objects they replace; bending the arrows doesn't appeal me.

\documentclass{article}
\usepackage{calc}
\usepackage[all,cmtip]{xy}

\newcommand{\Dd}{\partial}
\newcommand{\plhold}[1]{%
  \makebox[\widthof{$#1$}]{$\vphantom{#1}{\cdots}$}%
}

\begin{document}

\[ 
\xymatrix@C+3em{
0 \ar[r]
  & H^0(M, \Dd M) \ar[r] & H^0(M) \ar[r] & H^0(\Dd M) \ar[dll]  \\
  & H^1(M, \Dd M) \ar[r] & H^1(M) \ar[r] & H^1(\Dd M) \ar[dll]  \\
  & \plhold{H^1(M, \Dd M)} \ar[r] & \plhold{H^1(M)} \ar[r] & \plhold{H^1(\Dd M)} \ar[dll] \\
  & H^n(M, \Dd M) \ar[r] & H^n(M) \ar[r] & 0
}
\]

\end{document}

Note that you get better control on the width by acting on the column separation rather than jumping over empty columns.

enter image description here

0

You must log in to answer this question.

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