TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working with the following code:


                &   A \ar[dd]_{\pi_A}                                   \\
                &   &   **[r] G(A) = G(B)=Z\oplus Z\oplus Z\oplus Z     \\
**[l] 4\beta+ f(\beta) + g(\beta) = &   B \ar[dd]_{\pi_B}               \\
                &   &   **[r] F(B) = F(C)                               \\
**[l] \gamma=   &   C

This code creates the following diagram:

enter image description here

It looks pretty good, except that I would like the left-most column to be much closer, almost touching the center column, and also for the right-most column to be much closer, but maybe an inch or so away from the center column.

If I change the line \xymatrix to \xymatrix@C=-45pt, I get something pretty good, but this solution seems very ad-hoc to me. I think that the issue is that the column alignment is keeping the centerline of the column the same, and keeping the column widths the same, and aligning the entries to flush right (or left) along this centerline, rather than flush right (or left) in the space allotted to the column.

share|improve this question
up vote 5 down vote accepted

Would this be better?

\hphantom{4\beta+ f(\beta) + g(\beta) ={}}
A \ar[d]_{\pi_A}^{\qquad\textstyle G(A) = G(B)=Z\oplus Z\oplus Z\oplus Z} \\
\llap{$4\beta+ f(\beta) + g(\beta) ={}$}B \ar[d]_{\pi_B}^{\qquad\textstyle F(B) = F(C)} \\

enter image description here

share|improve this answer
beautiful... thanks! – Andrey M. Mishchenko Aug 25 '12 at 18:20
I have work-arounds for this issue, but maybe you have a clean solution: Because of the \llaps, the figure does not center properly: it thinks its "center" is to the right of where it should be. Any ideas? – Andrey M. Mishchenko Aug 25 '12 at 19:05
@Andrey I've added an \hphantom to keep the centering – egreg Aug 25 '12 at 19:30
The solution I ended up using was to \rlap the \qquad and text on the right side as well. Thanks for your help! – Andrey M. Mishchenko Aug 25 '12 at 20:43

Your Answer


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.