# xypic, xymatrix, aligning entries in a column

I am working with the following code:

\documentclass[12pt,letterpaper]{article}
\usepackage[all]{xy}
\begin{document}

$\xymatrix { & 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 }$
\end{document}


This code creates the following diagram:

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.

-

## 1 Answer

Would this be better?

$\hphantom{4\beta+ f(\beta) + g(\beta) ={}} \xymatrix@R+1pc { 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)} \\ \llap{\gamma={}}C }$


-
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