On 02/01/2010 01:54 PM, Tim Hutt wrote:
Hi, I've searched but I can't find an answer: Is it possible to edit
the source latex code of equations rather than edit the equations in a
graphical way? I much prefer this method for equations and in my mind
it is one of the things that makes latex superior to for example, MS
Word.

This is possible. First, you can enter LaTeX code at the keyboard, and then LyX will display it as "graphical". So just type Ctrl-M to enter math mode and then start typing:
    2^x + \sqrt 3 = \frac ...
Anything LyX doesn't understand it will display as raw commands.

If this isn't a feature I'd suggest something like CTRL-clicking on an
equation (also accessible by right-click->Edit Source) shows you the
source of the equation and lets you edit it.

Try View>Source if you want to *see* the LaTeX. There is no provision for editing it directly. However, if you really want to edit LaTeX, try this. Highlight just the *inside* of a math inset. Now exit it and paste. You should get the raw LaTeX code. Edit it. Now highlight it and hit Ctrl-M again.

The request for "roundtrip" LaTeX editing is longstanding and difficult to implement. But the math case is special and actually wouldn't be that hard to do. As the workaround just given shows, LyX can essentially do this already. So you might file this special case, of math, as an enhancement request here: http://www.lyx.org/trac/wiki/BugTrackerHome.

rh

Reply via email to