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.

This question already has an answer here:

I am trying to draw the following figure in trying to typeset the lattice diagram of the semidihedral group or order 16. Here is my tex code.

\documentclass[11pt]{amsart}
\usepackage[all]{xypic}


\begin{document}
\begin{displaymath}
    \xymatrix{
&&&& G \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]   \\
&&& A \ar@{-}[dl] \ar@{-}[d]\ar@{-}[dr]& B  \ar@{-}[d]&C \ar@{-}[dl] \ar@{-}[d]\ar@{-}
[dr] \\
          &&D \ar@{-}[dll] \ar@{-}[dl] \ar@{-}[drr] & E \ar@{-}[dl]|!{[dl];[l]}\hole \ar@{-}[d] \ar@{-}[dr] & F \ar@{-}[d] & H & I    \\
         J \ar@{-}[drrrr] &K \ar@{-}[drrr]&L \ar@{-}[drr]& M \ar@{-}[dr]& N \ar@{-}[d] \\
         &&&& F}
\end{displaymath}



\end{document} 

I want EL to have a hole when it crosses DN and I want EM to have a hole when it crosses DN. How do I achieve this?

Thanks for your time.

share|improve this question

marked as duplicate by Martin Schröder, zeroth, Claudio Fiandrino, Guido, Andrew Swann Feb 8 '13 at 11:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Welcome to TeX.SE! I edited your code by using the {} button :) –  cmhughes Feb 8 '13 at 5:29
    
Thanks so much. I was wondering how to do this. Can you help me?. –  Marcos Rojo Feb 8 '13 at 5:30
    
As there are no nodes at the crossing point, the method from the xyguide can not be used. Please look at this similar question: tex.stackexchange.com/questions/10361/… –  canaaerus Feb 8 '13 at 6:06
    
Yes, I read this. But I don't quite understand how to compute the point of intersection?. –  Marcos Rojo Feb 8 '13 at 6:08
    
As I understand it {[d];[r]} is the intersection line. –  canaaerus Feb 8 '13 at 6:09
show 1 more comment

1 Answer 1

up vote 1 down vote accepted

You can apply the method from http://tex.stackexchange.com/a/10365/15616 to the gap in DN. I tried also to use the same for EM, but curiously that deleted the whole line up to the intersection point as well. So there I just used a gap in the middle.

\documentclass[11pt]{amsart}
\usepackage[all]{xypic}

\begin{document}
\begin{displaymath}
    \xymatrix{
        &&&& G \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]\\
        &&& A \ar@{-}[dl] \ar@{-}[d]\ar@{-}[dr]
            & B \ar@{-}[d]&C \ar@{-}[dl] \ar@{-}[d]\ar@{-}[dr]\\
        && D \ar@{-}[dll] \ar@{-}[dl] \ar@{-}[drr]
            & E \ar@{-}[dl]|!{[l];[dr]}\hole \ar@{-}[d]|\hole \ar@{-}[dr]
            & F \ar@{-}[d] & H & I\\
        J \ar@{-}[drrrr]
            & K \ar@{-}[drrr]
            & L \ar@{-}[drr]
            & M \ar@{-}[dr]& N \ar@{-}[d]\\
            &&&& F}
\end{displaymath}
\end{document}

Explanation:

This uses the intercept calculation of xypics. Compare for example ⟨place⟩ of Figure 1 in XY-pic Reference and point 3j there. By using this in the context of an arrow (see Figure 14 ⟨labels⟩ and ⟨anchor⟩) this calculates the intersection point of the line given by {[l];[dr]}, relative to the current node, and the current arrow.

share|improve this answer
    
Thanks. This does the job. –  Marcos Rojo Feb 8 '13 at 6:30
add comment

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