On 12/28/2011 03:31 PM, Bogdan wrote:
On 28-Dec-11 6:04 pm, Richard Heck wrote:
On 12/28/2011 12:49 PM, Richard Heck wrote:
On 12/28/2011 10:00 AM, Bogdan wrote:
Hi all,

When editing plain .tex files I used to do this all the time to leave
extra space between equation lines in, say, an align environment,
e.g.:

\begin{align}
f(x) &= \left(x^2\right)^n\\[10pt]
&= x^{2n}
\end{align}

Note the \\[10pt]

How do I do this (easily) in LyX? I notice that if I import a piece
of plain .tex then LyX does preserve those extra spaces as I can see
it in the source code, but I haven't yet managed to it directly in
LyX.

This is weird. Type exactly that into LyX, as normal text (for some
reason copy and paste is not working), then highlight it and hit
Ctrl-M to make math. Not only will you see the space in the source but
in LyX itself. But I cannot see how to modify it once it's there. So
here's one way to do it that isn't too hard: Enter the equation as you
normally would in LyX, without the extra space; when it is right, do
View>Source, copy the source of the equation, paste it into LyX as
normal text; add the code for the extra space, and then highlight and
hit Ctrl-M. Not ideal but it works.

I've looked into this, and there doesn't seem to be UI for setting this,
or any way to enter it directly into a formula. Please feel free to file
an enhancement request for this.

Yes, I've already tried copy/paste or manual back and forth between
plain text and ctrl-m. As you've discovered, once it's there, it's
even more hassle to edit it. The whole procedure is more cumbersome
than editing latex directly (which I take it LyX is trying to avoid).


LyX doesn't natively support every TeX construct, so there will always be things like this.

Is there a way to edit the lyx source directly while in LyX? I know I
can do it separately.

It would be quite nice if LyX offered a feature to edit, say, the
source of a highlighted portion of text/math. That way, for any such
unsupported features like \\[10pt], I could just select text, edit lyx
source, a separate window/panel appears with the source, do my edits
there e.g. add \\[10pt], press done to go back to normal LyX view. I
know it looks like it defeats the purpose of LyX but would allow quick
workarounds of any troublesome situations.

What do others think?

For the math case, this actually wouldn't be that hard.

Richard


Reply via email to