[Xy-pic] Vertical alignment in xymatrix
michael at araneidae.co.uk
Wed Mar 5 22:54:51 CET 2003
> Silence from whom ?
Sorry, I think I got too impatient!
> > Adjusting \entrymodifiers is often the right thing to do, to get
> improved alignment when some cell entries have descenders (e.g. subscripts)
> but others do not.
I'll try and understand what the \entrymodifiers solution is doing...
I'm slightly confused by this discussion though. Perhaps I'm
As I understand it, each entry is generated with a particular shape, where
the shape defines the centre and horizontal and vertical extends from the
centre. I'm presuming that the entry is then placed in the matrix with
its centre at the selected point in the matrix, and that lines will point
towards this selected point.
Now the problem is how this centre relates to the mbox (the typeset
mathematical expression) being placed. I can't find the reference, but I
seem to recall that every bit of mathematical text has, as well as the
normal baseline with height and depth, a mathematical centre-line -- which
is, I think, at a defined vertical offset above the baseline. As I recall
it, the - sign is *on* the centre-line.
So what I don't understand is this: how does xymatrix determine the
"centre" of an mbox being placed in the matrix? Is the centre literally
half way between top and bottom? What I'm hoping to achive is some way in
which the centre can be *on* the mathematical centre-line, in other words,
at the standard offset from the baseline.
If this could be done then nothing special would need to be done to ensure
that adjacent entries of differing shapes line up properly.
> In your case, however, because of the unusual shape ...
Of course, special hacks to deal with unusual shapes are what I want to
avoid, as otherwise I'm going to be constantly having to tweak each array
whenever I introduce a new entry of a different shape :(
> The draw-back is that arrows pointing to the cell may terminate at
> a greater distance than you might prefer, upon meeting the boundary
> of a larger rectangle.
Indeed, another reason I don't want to do that.
> If that is really a problem, then you will have to adjust the contents
> of cells individually, rather than collectively. Of course this
> makes it difficult to read the mathematics in your LaTeX source, as
> cells will then become a mixture of content and positioning constructions
> (like the first reply, using \vphantom within the sup/subscripts).
Indeed, indeed. Not at all desireable.
Am I misunderstanding something? It seems to me that in principle the
notion of positioning the centre on the *centre-line* is straightforward
and would solve all my problems...
More information about the Xy-pic