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.

When I do this...

\documentclass{minimal}
\usepackage[all]{xy}

\begin{document}
This text should come directly before the diagram.
\[ \xymatrix@ru{
\bullet \ar[rd] \ar[d] \\
\bullet \ar[r] \ar[rd] & \bullet \ar[rd] \ar[d] \\
& \bullet \ar[r] \ar[rd] & \bullet \ar[d] \\
& & \bullet
} \]
This text should come directly after the diagram.
\end{document}

... there is a bunch of empty space between the bottom of the diagram and the second line of text. When I remove the @ru, it becomes apparent that the rotated xymatrix is taking up the same amount of vertical space as the unrotated one, even though the rotated matrix is much smaller vertically.

Is this a bug, or a feature? Either way, how can I prevent this behavior?

share|improve this question
add comment

1 Answer

It appears that Xy-pic is not able to compute the correct bounding box; however, there's another way to build the same diagrams: just use a "double spaced" matrix reducing the intercolumn and interrow space.

\documentclass{article}
\usepackage[all]{xy}

\begin{document}
This text should come directly before the diagram.
\[
\xymatrix@C-6pt@R-6pt{
 \bullet \ar[rr] \ar[rd] && \bullet \ar[rr] \ar[rd] && \bullet \ar[rd] \\
 & \bullet \ar[rr] \ar[ru] && \bullet \ar[rr] \ar[ru] && \bullet
}
\]
This text should come directly after the diagram.
\end{document}

enter image description here

Maybe \xymatrix@C-12pt@R-6pt is even better.

share|improve this answer
    
Thanks for the suggestion! I wanted to rotate the diagrams, rather than double-spacing them, because it would make the source code substantially more readable for me, and also make it easier to build larger diagrams out of the code for the smaller ones. In the end, I just decided to leave the diagrams unrotated: if you can't beat 'em, join 'em. –  Vectornaut Dec 20 '12 at 7:15
add 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.