Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Generate lstlisting

Useful when teachers require that you "The report should contain all your source code in appendices."

For each file it creates a heading (like section/subsection -- is customizable) labels it with the filename (also customizable), and lastly includes it using lstinputlisting -- maybe even setting the language parameter if it regonizes the extension.

Requirements

  • Python 3.2+
  • a TeX enviroment with the lstlisting package

Usage

$ generatelstlisting.py <DIR>

This will create the file generated-lstlisting.tex in your current directory.

========================

To change the path of output file, use the -o options, like so

$ generatelstlisting.py -o path/output.tex <DIR>

- adding options to the end is also accepted

========================

To learn about the "advanced" options run SOMEPATH/generatelstlisting.py --help (like changing the section level to "subsubsection")

========================

For more LaTeX source code listing generation, see my difftotex repo.

About

Generate LaTeX `lstlsting` for all files in a directory

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.