I am trying to use LyX to insert child document-listing-program. The program imports OK but it is too long to fit on a single page. At the bottom of the page it outputs over the margin, sometimes cutting characters in half, on the page it continues into it leaves the correct header gap.
I have tried using LaTeX code \lstinputlisting[language=Python]{file.py} with the same result.
Please help
On a side note if you could let me know how to color format the code that would be great. From my reading it seems to imply that by using language = Python a keywords list will have been generated with some keyword styles predefined, but I don't know how to access these and use them to set further styles.
Can't even begin to explain how frustrating this has been trying to find out so any help would be massively appreciated.