Edit Links |
Examples /
IncludeExternalProgramListingUsingPygmentsCategories: Example << | Page list | >>How to include external program listings using pygments Table of contents (hide)
1. Include programs listingsThis automatically uses the source code, and any change in the external source code will be visible in the LyX output. Notice that you can skip the -l cpp parameter and then the pygmentize program will automatically select the appropriate language.
(but do not include these two lines!) to the LaTeX Preamble window in
document settings. Add these two lines at the beggining of the preamble:
\usepackage{fancyvrb}
\usepackage{color}
Click the Save as Document Defaults button.
gedit 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. 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. CategoriesCategory: Example |