[Xy-pic] Vertical alignment in xymatrix

Lengyel, Florian FLENGYEL at gc.cuny.edu
Mon Mar 3 10:41:17 CET 2003


One way to handle the default vertical alignment in xypic is perhaps
ludicrous--after a certain point one wants to get things to work, even if
the additional effort to read the manual is \epsilon, in protest against
having to decipher the manual further to resolve an issue that must have
been patently obvious to the developers, and which therefore deserves
special mention in neon lights in the manual, one resorts to the \phantom
command, as follows:

Instead of this:
	\xymatrix{-^X \ar[r] & -_X}

you do this:
	\xymatrix{-^X_{\phantom{X}} \ar[r] & -_X^{\phantom{X}}}

FL

-----Original Message-----
From: Michael Abbott [mailto:michael at araneidae.co.uk]
Sent: Monday, March 03, 2003 9:24 AM
To: XyPic mailing list
Subject: [Xy-pic] Vertical alignment in xymatrix


I've got a couple of problems with controlling vertical alignment with
xymatrix, and I'd like to know if there are any solutions.


Firstly, I'd like the option (in fact, I'd rather it were the default) for
the entries in each cell to be aligned on the equation centre line rather
than being vertically centred.

Consider the example:
	\xymatrix{-^X \ar[r] & -_X}
Ideally the two - signs and the arrow should all be on a common
centre-line, but they're not (the difference is subtle but significant and
annoying, and gets worse the bigger the sub- and superscripts get).

Can I do anything about this?

One way to handle the default vertical alignment in xypic is perhaps
ludicrous--after a certain point one wants to get things to work, even if
the additional effort to read the manual is \epsilon, in protest against
having to decipher the manual further to resolve an issue that must have
been patently obvious to the developers, and which therefore deserves
special mention in neon lights in the manual, one resorts to the \phantom
command, as follows:

Instead of this:
	\xymatrix{-^X \ar[r] & -_X}

you do this:
	\xymatrix{-^X_{\phantom{X}} \ar[r] & -_X^{\phantom{X}}}

FL

P.S. Actually, I'd like to know the real answer myself.


More information about the Xy-pic mailing list