<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 8/04/2021 3:14 am, Paul A. Rubin
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:f79ee041-e8a3-ba3c-71f4-c2fab49bab48@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="moz-cite-prefix">On 4/7/21 10:14 AM, Mario D wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGLgdwP49xxODVG1ZXKnFGXNtCVotikApUCiKjY9MXjWoKhGPg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>sometime I need to paste some latex code inside a lyx
file.</div>
<div>When I do this, I lose all the formatting and, in
particular, I lose all new lines: this means that what I
end up with in my red box in lyx is a complete mess which
requires a lot of editing.</div>
<div><br>
</div>
<div>This is quite annoying: am I missing something which
results in this behaviour?</div>
<div><br>
</div>
<div>Thank you<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
Have you tried Edit > Paste Special > Paste from LaTeX? Note
that this is used to paste directly into the LyX document, <i>not</i>
into an ERT box (ctrl+L).<br>
<br>
Paul<br>
</blockquote>
<p>I usually just use Ctrl+Shift+V to paste text (including lines of
LaTeX) that preserves new lines. It works in an ERT box. (I wasn't
aware of the Paste from LateX option. In fact, there's quite a
bit here that has changed since I last carefully looked at what
was offered by the different menus.)<br>
</p>
<p>Andrew<br>
</p>
</body>
</html>