[Xy-pic] Deficiencies in xymatrix package?

Alexander Perlis alexanderperlis at yahoo.com
Mon May 26 04:06:22 CEST 2003


--- Michael Abbott <michael at araneidae.co.uk> wrote:
> 
> This [ \entrymodifiers={+!!<0pt,\fontdimen22\textfont2>} ] is
> such an obvious and easy fix that it ought to be more
> widely known. I didn't actually spot how simple a solution
> this is until I read your article.
> 
> So, to repeat for clarity, the answer to xymatrix vertical
> alignment is to add the line
> 
> 	\entrymodifiers={+!!<0pt,\fontdimen22\textfont2>}
> 
> to the preamble of the document.  Then, unless we perform an
> explicit *{} drop, xymatrix alignment will come out right.
> 
> (This does beg the question as to why we have to do this.  hrm.  A
> "feature" in the design of xymatrix.  grumble grumble...)


If the only use of \xymatrix in a particular document is to typeset
text-with-arrows diagrams, then the \entrymodifiers line shouldbe in
the preamble, and we are wondering: why isn't that the default?

But a flip through the Xy-pic Reference Manual indicates the system
to be designed also for other types of diagrams, including ones with
no text. Center-alignment is sometimes the best approach.

Since a document could include multiple types of diagrams, we cannot
dictate the alignment once and for all in the document's preamble.
Nonetheless, we might argue that \xymatrix and even \xygraph should
default to axis-alignment, whereas the kernel language might default
to center-alignment. Alas, too late now...


> > Could you take a look and let me know whether
> > the proposed syntax would meet your needs?
>
> As far as I can see, the only significant change request is for
> a new offset letter A as a shorthand for
> <0pt,\fontdimen22\objectfont2> where \objectfont is \textfont,
> \scriptfont or whatever, depending on the value of \objectstyle.
> 
> In your article you suggest that !A should be a shorthand for
> !!<the above vector>; I'd guess that this is less compatible
> with the existing system, and that there's no harm in making
> users write !!A.
> 
> So without the A shorthand, when we do an explicit drop we have
> to write, for example
> 
> 	*+[F.]!!<0pt,\fontdimen22\textfont2>{blah}
> 
> which it would be nice to abbreviate to
> 
> 	*+[F.]!!A{blah}


Hmm, that's an interesting point: should it be plain !A or !!A? As
far as I know, at this time a single capital letter is a <corner>,
which refers to an absolute position, not a fixed offset. For
example, don't !C and !!C and !L!!R!UL!C all do the same thing: move
the reference point to the object's center? Perhaps I'm mistaken.
Anyway, I guess I was suggesting that, whereas C is a vector from the
current position to the center, A should be a vector from the current
position to the point horizontally centered and vertically on the
axis. You on the other hand are suggesting that A simply be the
vector <0pt,\fontdimen22\objectfont2>. Since your suggestion will
make things more flexible, it is clearly a Good Thing (TM).
  However, in that case perhaps it should not be a single capital
letter, because it probably shouldn't be a <corner>. Instead, it is
shorthand for a particular vector. I don't know whether Xy-pic has
any such thing today. Does anyone know? If there is an established
syntax, the new construct should follow that.


> 2. An @A option on \xymatrix as a shorthand for
> \entrymodifiers={+!!A}. Well, maybe; but as putting this
> once in the preamble is good enough, it hardly seems necessary.

But what about documents where certain figures need axis-alignment,
other figures need center-alignment?


> 3. Changing the definition of @1.  Well, breaking backwards
> compatibility is generally a bad thing, even if it *is* broken.

A valid point. Yet I suspect all of today's uses of @1 are
one-liners, which would still come out correct under my proposal. Is
anyone using @1 for things other than one-liners? I'm curious.



Thanks for writing your comments.

Alex


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


More information about the Xy-pic mailing list