Re: Carriage return in ERT inset
Le 21/02/2016 15:15, David Rörich a écrit : Hello Jürgen, no, not directly. As a single line break is ignored in Latex, Lyx seems to remove these single line breaks automatically to make the editor layout consistent with the output. I think you have two options here: Actually, it you paste with Shift+Ctrl+V, LyX will keep the lines. But this is not useful because LaTeX will ignore them as David explained. 1) Use double line breaks in the text you paste into the ERT. Lyx will convert this to single line breaks in the ERT which translates to a whitespace in the output. (see files attached) 2) Use the listing environment (Insert > Program listing). Everything you insert there will be interpreted verbatim. This is the way to go if you would like to insert program code in your document. If you do not care about syntax coloring, you can also use the Verbatim layout (or LyX-Code if you want to make some font changes in your text). JMarc 2016-02-21 9:38 GMT+01:00 Jürgen Lange>: Hello, Code with carriage returns a a a a inserted in ERT inset in Lyx appears as a a a a Is it possible to keep the carriage returns? (This is important in cases with huge parts of code, example: gnuplot scripts) Regards Jürgen
Re: Carriage return in ERT inset
I want to give feedback (tested with a minimal gnuplot script). 1) double line breaks in ERT: works 2) program listing: fails, because gnuplot script is printed and not interpreted 3) paste special > plain text in ERT: works (my preferred method) Thanks!
Re: Carriage return in ERT inset
On Sun, Feb 21, 2016 at 03:15:49PM +0100, David Rörich wrote: > Hello Jürgen, > > no, not directly. As a single line break is ignored in Latex, Lyx seems to > remove these single line breaks automatically to make the editor layout > consistent with the output. I think you have two options here: > > 1) Use double line breaks in the text you paste into the ERT. Lyx will > convert this to single line breaks in the ERT which translates to a > whitespace in the output. (see files attached) > 2) Use the listing environment (Insert > Program listing). Everything you > insert there will be interpreted verbatim. This is the way to go if you > would like to insert program code in your document. I believe that a third option is to do ctrl+shift+v, or Edit > Paste Special > Plain Text. Scott signature.asc Description: PGP signature
Re: Carriage return in ERT inset
Hello Jürgen, no, not directly. As a single line break is ignored in Latex, Lyx seems to remove these single line breaks automatically to make the editor layout consistent with the output. I think you have two options here: 1) Use double line breaks in the text you paste into the ERT. Lyx will convert this to single line breaks in the ERT which translates to a whitespace in the output. (see files attached) 2) Use the listing environment (Insert > Program listing). Everything you insert there will be interpreted verbatim. This is the way to go if you would like to insert program code in your document. Regards, David 2016-02-21 9:38 GMT+01:00 Jürgen Lange: > Hello, > > Code with carriage returns > > a > a > a > a > > inserted in ERT inset in Lyx appears as > > a a a a > > Is it possible to keep the carriage returns? > (This is important in cases with huge parts of code, example: gnuplot > scripts) > > Regards > Jürgen > ert_linebreaks.lyx Description: application/lyx ert_linebreaks.pdf Description: Adobe PDF document
Carriage return in ERT inset
Hello, Code with carriage returns a a a a inserted in ERT inset in Lyx appears as a a a a Is it possible to keep the carriage returns? (This is important in cases with huge parts of code, example: gnuplot scripts) Regards Jürgen