hi all,
i have been trying to complete my thesis document using lyx. i need to insert c/c++ code into my documents. i need some examples as to how this can be accomplished. the c program is stored in a file and i would like to include a major part from the file into a lyx/latex document. i tried using the "insert code" option from within lyx but it does not format my code properly.
any help is greatly appreciated, thanx a lot,
Install noweb (an opensource implementation of Donald Knuth's Literate Programming principles). LyX supports noweb (You will have to reconfigure LyX)
Then you can create LyX files selecting one of the noweb classes (e.g. book(noweb) and you can now combine your program code and documentation into a single document. LyX options allow you to compile the code or to produce the documentation. Noweb understands all the languages you are likely to program in (including C++) - will highlight keywords, do line numbering etc.
It is absolutely brilliant. Well worth the effort to learn
regards John O'Gorman
parminder gupta