Drop Box wrote:
I just realized that my previous question may be unclear due to some
errors in my previous post...
ERT in mathed seems to have a few issues. One of them is that LyX
determines when to end an ERT sequence. For example, if I hit C-L (to
start ERT) and then hit the underscore character, LyX exits out of ERT
mode, and the TeX produced is "\_". Although it's not relevant to my
example, I often want to be able to ERT more than just the one
character. I'm currently having issues because of the backslash that
LyX adds.
Now comes my original motivation. I'm trying to use xypic in LyX. I
want to produce the following code:
\ar@/_/[r]
By omitting the underscore, I can produce
\ar@//[r]
by typing this literally. When I type the underscore literally, LyX
produces
\ar@/_{/}[r]
which doesn't work. If I try to use ERT, I get
\ar@/\_/[r]
which doesn't work because of the extra backslash.
My apologies for the double-post. I hope this clarifies things. Thanks!
-Bob
-----
Hello, I'm trying to use ERT in math mode, but as soon as I hit an
escape character, it exits ERT mode.
More specifically, I'd like to second H. Peter Gumm's question
(28-Oct-05). I'm trying to make ERT for xypic, but I can't get the /_/
part of
\ar@/^/[r]
to render properly. If I type it directly, LyX seems to insist on
rendering it as /_{/} which makes it complain. If I try to use ERT, LyX
automatically puts a \ character before the _.
Any advice would be greatly appreciated. Thanks!
-Bob
----
Hopefully I can be helpful by explaining a few tricky things I
discovered about using xypic in LyX.
To prevent errors when using the @ symbol, I had to add
\makeatother
to the preamble, in addition to the standard
\input xy
\xyoption{all}
You can create an xymatrix in math mode by typing \xymatrix. The
resulting matrix will be 1x1, so to enlarge it, use "M-m w i" and "M-m c
i" to add rows and columns.
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