Edit Links |
Examples /
IncludeExternalProgramListingCategories: Example << | Page list | >>How to include an external program listing into LyX. Table of contents (hide)
1. Include programlistingsThis automatically uses the source code, and any change in the external source code will be visible in the LyX output. The latest version is available at http://www.taljaren.se/MinLyXTutorial.pdf Notice that you can skip the -S cpp parameter and then the highlight program will automatically select the appropriate language.
Change the file name (KOD.cpp) to your file, and change
language if you use something else than C++ (cpp).
(but do not include this last line!) to the LaTeX Preamble window in
document settings. Click the Save as Document Defaults button.
nedit is the texteditor that I use to write program code. Change to what
you want to use. Notice that the Format name must be something unique that is
not used elsewhere.
Add the same thing for conversion from C++ to LATEX(plain). Dont forget to
change to reflect the language you are using. IMPORTANT! If you get errors with undefined command sequences and see the command \dq, then try removing the -r switch! Also make sure that you don't use any "extra parameters".
2. Use in figuresYou will likely want to use your code in figures as well. The process for this is fairly simple:
3. Issues
4. Contributors
5. Categories |