How to paste into LyX-Code ?

Stephan Witt st.witt at gmx.net
Wed Nov 17 10:55:21 UTC 2021


Am 17.11.2021 um 10:01 schrieb Steve Litt <slitt at troubleshooters.com>:
> 
> 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?

Hi Steve,

you may insert a Listings inset and configure it to point to your C file.

After that you can define the lines you want to show and many more things.

See here for the options:
https://mirror.dogado.de/tex-archive/macros/latex/contrib/listings/listings.pdf

BR, Stephan


More information about the lyx-users mailing list