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?