Technion - Israel Institute of Technology
Department of Computer Science
CS 236610: Advanced Topics Prog2Tex - produce beautiful program listings

Prog2Tex - produce beautiful program listings

Home Page
The Technion Guide to LaTeX2e
A Short LaTeX Example
A Simple LaTeX Template
A Full Paper Example
Other LaTeX Packages
The  Long "howto" LaTeX Template
Useful Bibliography Files
The "dup" program
Prog2Tex - produce beautiful program listings
One Pager Article
How to Present a Paper
Speaker's Guide
A Guide for New Referees
Cute Tips
The Blackboard Bold and Its Relatives

Prog2TeX is a style file and a C++/LeX program for producing beautiful program listing in LaTeX. Prog2TeX includes support for C++, Java, and Jamoos (the Technion compiler-compiler). To start using prog2TeX you need to files:

  1. prog2tex.sty - a style file for producing the actual output
  2. prog2tex.exe - a program for translating programs into appropriate macros. If you are not a windows user, you may want to compile the prog2tex.l first with lex and then with your favorite C++ compiler.

The prog2tex programs reads a latex file, say foo.tex, which includes C++, Java and other languages statements, or even references to external program files, and generates a foo.prg with suitable LaTeX macros representing these source command. Running latex then on foo.tex will produce the required listings as part of TeX output.

Prog2tex documentation:

bulletLaTeX source file of the main documentation file: prog2tex.tex
bulletA C++ file included by the documentation: sample.cpp
bulletAn included LaTeX file, included.tex, demonstrating how prog2tex works on nested files.
bulletDVI, PostScript, and PDF rendering of the documentation.
bulletOther files produced during the compilation process: prog2tex.aux, prog2tex.log, and prog2tex.prg.

All files in one zip:

Prog2TeX source files

Last updated on 29/09/2004