Daniel said on Wed, 17 Nov 2021 10:44:23 +0100

>On 17/11/2021 10:01, Steve Litt wrote:
>> Hi all,
>> 
>> I have a C program I want to show in a book. So I use the LyX-Code
>> environment, but when I copy the C file to the clipboard and paste it
>> into the LyX-Code environment, all the newlines are removed. What's
>> the right way to show a C program file within LyX?
>> 
>> Thanks,
>> 
>> SteveT
>> 
>> Steve Litt
>> Spring 2021 featured book: Troubleshooting Techniques of the
>> Successful Technologist http://www.troubleshooters.com/techniques
>>   
>
>You could try
>
>"Edit" > "Paste Special" > "Plain Text" or Ctrl+Shift+V.

The preceding worked. Thank you!
>
>I never understood what "Plain Text" does not among other things it 
>should keep the line breaks. I guess keeping line-breaks should be the 
>default...

It's ridiculous that it's not the default, you're right.

Thanks also to Norman Dunbar who suggested the same things.

Thanks also to Hartmut Hasse and Stephan Witt for their suggestions,
which I didn't try for lack of time once the Shift+Ctrl+v worked.

I spent 2 hours trying to find a method last night, before figuring I'd
be better off asking the list. Thanks for your suggestions!

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to