Thanks so much for the article! It is very well-written, and it answered some of my questions, namely how to bend arrows. Unfortunately, it leaves unanswered perhaps the most annoying issue for me: how do I center labels over arrows?

(Arrow labels are by default are centered according to the midpoints of the corresponding objects. If one object label is large and the other is small, the arrow label will be off-center with respect to the midpoint of the actual arrow.)

The article mentions this, but only in the instance of the label intersecting the arrow, e.g. A--f-->B, which is typeset as "\ar[r]|-{f}". The "|" character here is fine since LyX does nothing special with it. However, if I want
  f
A----->B
the code is "\ar[r]^-{f}" which LyX translates to
"\ar[r]^{-}{f}"  In turn, xypic interprets this as
   -
Af----->B

The only workaround I've found is adding to the preamble
\newcommand{\uc}[2]{#1^-{#2}}
\newcommand{\lc}[2]{#1_-{#2}}

and now I can get my arrow with "\uc{\ar[r]}{f}".

This works, but it's far from desirable since it's a lot of extra typing and a much uglier than it should be. It leaves me wondering why there isn't a mechanism (that I'm aware of) to just write normal ERT in math mode.

Can anyone think of a better workaround?  Thanks!

-Bob


P.S. H. Peter's article is very nice, but after all the Google searching I did, it never came up. I wonder if there's anything that could be done to increase its pagerank.

-----------
Paul A. Rubin wrote:

I think H. Peter sorted this out after considerable (presumably painful) experimentation. He wrote up a manual on how to get xypic instructions into LyX ERT boxes. You can find it at http://www.mathematik.uni-marburg.de/~gumm/LyX/xypic/xypic.pdf.

Paul


Reply via email to