On Sat, Dec 03, 2005 at 09:40:55AM +0000, Drop Box wrote:
[If that was my real name I'd seriously consider sueing my mother...]

> ERT in mathed seems to have a few issues. 

It surely has. There is no such thing like a TeX parser other than TeX
itself... And TeX has the benefit of operating on static text only, it
does not have to edit it.

> 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.

You could try to define a macro in ERT outside math and use it inside,
i.e. something like

Outside Mathed, in ERT or preamble: \def\arsub{\ar@/_/[r]}
In math: \arsub
 
> 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]

I am afraid this is too far off from what mathed considers 'plain
LaTeX'.

Andre'

Reply via email to