On 22/06/2010 5:04 PM, Wadim wrote:
I am not sure what is the right name of this box in english because i am using the german version of LYX. It is the box where you type in program code. I have inserted this box in my document and written stuff into it. In Lyx everything looks fine, but when I convert to pdf the longer lines of code go beyond the right edge of the page. Is there any way to fix this other than making those lines shorter by hand?
In Document > Settings > Preamble you can add \lstset{breaklines=true} If you are interested in what additional customization you can do, have a look at the documentation for the listings package [1]. Cheers, Julien [1] http://www.ctan.org/tex-archive/help/Catalogue/entries/listings.html