On Tue, 23 Nov 2010 00:53:41 +0200, Nikos Chantziaras <rea...@arcor.de>
wrote:
> I'm on LyX 2.0 beta1.
> 
> I wanted to include a *.c file in my document.  There doesn't seem to be

> a way to do that, so I just copy&pasted the C code inside a "program 
> listing" box (Insert->Program Listing).
> 
> However, copy&pasting results in all code being put in one line.  For 
> example, this:
> 
>       steps = 0;
>       while (1. + atom_d > 1.) {
>               atom_d /= 2.;
>               ++steps;
>       }
> 
> ends up as:
> 
> steps = 0;    while (1. + atom_d > 1.) {              atom_d /= 2.;           
> ++steps;        }
> 
> 
> in LyX (and in the rendered PDF.)  So I have two questions at this 
> point:  How do I copy&paste correctly, and is there a way to not 
> copy&paste at all and use an external *.c file?

After you do Ctrl + c place your cursor where you want to paste and do
Shift + Ctrl + v but that might not work for you? I can't test it just now.

HTH
Charlie

Reply via email to