Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use xypics for diagrams, but I don't know how to put the dashed line in the diagram below. Search didn't find much. Can anybody here help?

Big Diagram

share|improve this question
    
I believe that the only possibility is to insert a new column from the first line to the last one, without entries. –  Sigur Feb 8 '13 at 23:08
add comment

2 Answers 2

up vote 7 down vote accepted

Here's a way to do it without putting an extra column into the diagram. The dashed line is again inserted as a dashed arrow with no head or tail, i.e., \ar@{--}, but we'll specify both the source and the target of the arrow. In addition, both the source and the target of the arrow will be displaced from one of the nodes. The actual specification of the dashed line is

\ar@{--}[]+<3.5em,0em>;[dddd]+<3.5em,0em>

Note the semicolon; that means that the source is the thing before it and the target is the thing after it. The source is thus []+<3.5em,0em>. Since [] denotes the current node, the source is the point 3.5em to the right and 0em down from the current node.

Similarly, the target of the arrow is [dddd]+<3.5em,0em>, which means the point 3.5em to the right and 0em down from the node [dddd].

Here's a complete latex file:

\documentclass{article}
\usepackage[cmtip,all]{xy}
\begin{document}
\thispagestyle{empty}
\begin{displaymath}
  \xymatrix  {
    && 0\ar[d] \ar@{--}[]+<3.5em,0em>;[dddd]+<3.5em,0em>
    & 0\ar[d]
    &  0\ar[d]\\
    & 0\ar[d] \ar[r]
    & \Gamma^n\Omega^1 \ar[d] \ar[r]^-{d}
    & \Gamma^{n-1}\Omega^1\otimes\Omega^1\ar[d] \ar[r]^{d}
    & \Gamma^{n-2}\Omega^1\otimes\Omega^2 \ar[d] \ar[r]
    & \cdots   \\
    0 \ar[r]
    & A\ar[d]_{Id} \ar[r]^{d^1}
    & P^n\ar[d] \ar[r]^-{D}
    & P^{n-1}\otimes \Omega^1\ar[d] \ar[r]^{D}
    & P^{n-2}\otimes \Omega^2\ar[d] \ar[r] & \cdots \\ 
    0 \ar[r]
    & A\ar[d]_{Id} \ar[r]^{d^1}
    & P^{n-1}\ar[d] \ar[r]^-{D}
    & P^{n-2}\otimes \Omega^1\ar[d] \ar[r]^{D}
    & P^{n-3}\otimes \Omega^2\ar[d] \ar[r]
    & \cdots \\  
    & 0
    & 0
    & 0
    & 0
  }
\end{displaymath}
\end{document}

It produces xy-pic diagram

share|improve this answer
    
Wow... awesome... Thanks a lot. –  hyh Feb 9 '13 at 5:55
    
Nice. Is there also a way to specify 3.5em as half the column width? –  canaaerus Feb 9 '13 at 7:20
    
@canaaerus: Sorry, I don't know how to refer to the column width, except for the command that can set it. I found the 3.5em by trial and error. –  Phil Hirschhorn Feb 9 '13 at 14:05
add comment

I believe that the only possibility is to insert a new column from the first line to the last one, without entries.

You can control the space between columns changing the value 2em.

Probably it is not possible to change the space only for some columns.

\[ 
\xymatrix@C=2em@R=2em{ &  & 0\ar[d] & \ar@{--}[dddd] & 0\ar[d] &  0\ar[d] &  &  \\ & 0\ar[d] \ar[r]  & \Gamma^n\Omega^1 \ar[d] \ar[rr]^{d} && \Gamma^{n-1}\Omega^1\otimes\Omega^1\ar[d] \ar[r]^{d}& \Gamma^{n-2}\Omega^1\otimes\Omega^2 \ar[d] \ar[r]& \cdots   \\  0 \ar[r] & A\ar[d]_{Id} \ar[r]^{d^1} & P^n\ar[d] \ar[rr]^{D} && P^{n-1}\otimes \Omega^1\ar[d] \ar[r]^{D} & P^{n-2}\otimes \Omega^2\ar[d] \ar[r] & \cdots \\ 
 0 \ar[r] & A\ar[d]_{Id} \ar[r]^{d^1} & P^{n-1}\ar[d] \ar[rr]^{D} && P^{n-2}\otimes \Omega^1\ar[d] \ar[r]^{D} & P^{n-3}\otimes \Omega^2\ar[d] \ar[r] & \cdots \\  
 & 0 & 0 && 0 & 0 &  
  }  \]

enter image description here

share|improve this answer
    
Great. That @C=1em is for columns? is there a similar thing that controls vertical arrows? –  hyh Feb 8 '13 at 23:19
    
Use @R= for rows. –  Sigur Feb 8 '13 at 23:21
    
Just write in sequence: @C=1cm@R=2cm for example. –  Sigur Feb 8 '13 at 23:25
    
Say I want to set @C=5em@R=5em globally, what do I do? –  hyh Feb 8 '13 at 23:25
    
I don't know. I guess that you have to set up one by one. You have to adjust each matrix at once. –  Sigur Feb 8 '13 at 23:27
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.