TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

I'm using LyX, and I want to make an edit to an equation. Since the inline equation is really long, it continues off of the screen. I'm literally in the dark when I try to edit my work since I cannot see it. Is there a way I can copy and paste it or somehow get a hold of the entire equation so I can edit it?

share|improve this question
If your problem is that it is off the screen in the LyX editor, just put a carriage return and continue entering the equation on the next line. Spaces and newlines are ignored in math mode. Or enable a soft line wrap thru preferences -- I would not recommend enabling an automatic hard line wrap. If it is going off the right hand side of the PDF, then you should compose a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. – Peter Grill Nov 24 '12 at 8:42
Also, if you just want to copy and past it, a triple click usually selects the entire line. – Peter Grill Nov 24 '12 at 8:46
What's a carriage return? I can only copy the entire equation, which is not helpful. If I could highlight only the tail, that would help. – The Substitute Nov 24 '12 at 8:50
I'm not sure why LyX doesn't just let us scroll onto the right so we can see the rest of the equation. – The Substitute Nov 24 '12 at 9:02
Looks like a really old problem: lyx.org/trac/ticket/1083 (Via lyx.org/trac/ticket/6157) – Torbjørn T. Nov 24 '12 at 12:07
up vote 3 down vote accepted

Here are four workarounds:

  1. Convert the math to LaTeX, edit the LaTeX, then convert back to math. Two ways to do this:

    1. You could bind the following command-sequence to a shortcut. Then put your cursor in front of your long equation and run the shortcut. command-sequence char-forward; line-end-select ; cut; char-backward; paste; char-delete-forward.

    2. Or if you want to do it manually, go just inside the equation and do ctrl+shift+ or ctrl+end. Both of those work for me. And then go outside of math and paste. It should now show up as LaTeX.

    To convert from LaTeX back to math, highlight the LaTeX code and do ctrl+m.

  2. Bind the following command to a shortcut. This will "split" an inline math inset into two separate inline math insets. command-sequence line-end-select; cut; char-forward; math-mode; paste; char-forward; word-backward

    You might need to do that more than once (at different positions, of course) depending on how long your equation is. To then paste them back together into one math inset highlight them all (using ctrl+ is the easiest) and press ctrl+m.

  3. zoom out (ctrl + scroll wheel).

  4. (from Paul Rubin) "The best workaround I've got now is to insert the cursor into the formula and use Edit > Math > Change Formula Type to make it AMS multiline. Then I can insert ctrl-enter periodically to break it into multiple lines, do any edits I want, and then use Edit > Math > Change Formula Type to convert it back into an regular display mode formula."

See here for more discussion: http://comments.gmane.org/gmane.editors.lyx.general/75509

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.