# [Xy-pic] Xy-pic xymatric row spacing change in 3.8?

Kristoffer H Rose krisrose at us.ibm.com
Sat Feb 19 23:03:05 CET 2011

Dear David,

> I'm not sure how to properly report this, but I thought you may be
> interested that "xymatrix" behaviour has changed between 3.7 and 3.8.5
> (and other 3.8s): in 3.8 the contents of entries seems to influence the
> size of the entries but, seemingly, not of the frames; see the attached
> files (compiled under 3.7 and 3.8.5 with pdflatex on OSX). Here is the
> input:
>
> \documentclass[12pt]{article}
> \usepackage[all]{xy}
> \begin{document}
> \xymatrix @W=35pt @H=15pt @R=0pt @C=0pt @*[F-] {%
> A&yyy\\
> jjj&Y\\
> }
> \end{document}
>
> if you look at the attached files, it seems that 3.7 aligns rows at the
> centres of the boxes while 3.8 at the base lines of the text inside the
> boxes (I actually prefer the former, but...); indeed [without looking in
> the guts of XYpic] the different depth of the entries seems to account
> for the discrepancy...
>
> Note that if the matrix is, e.g., "A&A\\A&A" that the issue goes away
> (as the entries are the same), but it seems that if the entries have
> different depth (e.g., "A" vs. "y"), the rows are no longer adjacent.

What you are seeing is an effect of the fact that the entry alignment was
changed in 3.8, as explained in the TRAILER:

This version also marks the first version where xymatrix entries are
aligned by their math axis by default as suggested by Alexander Perlis
(in TUGboat 22 (2001), 330-334); thanks to Alexander for the thorough
expect!

Your diagram is clearly an example of one that does not work as you expect
:-)

A workaround for you could be to reset the entry alignment to 3.7's simple
centering, which can be achieved as follows:

\documentclass[12pt]{article}
\usepackage[all]{xy}
\begin{document}
%
\entrymodifiers={!C\entrybox} %%%% Reset alignment to pre-3.8 default
%
\xymatrix @W=35pt @H=15pt @R=0pt @C=0pt @*[F-] {%
A&yyy\\
jjj&Y\\
}
\end{document}

The \entrymodifiers declaration is scoped by the usual TeX scoping rules
so can be given once globally (and you should manually remove any
precompiled *.xyc files when you change it).

> best regards (and many thanks for the great package),

I hope this helps!

Enjoy,
Kris

__
Kristoffer H Rose, ph.d. <krisrose at us.ibm.com> +1(914)784-7642 (fax -6324)
IBM T.J.Watson Research Center, PO Box 704, Yorktown Heights, NY 10598
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xy-pic/attachments/20110219/0d861536/attachment.html>