September 23, 2004 8:38 PM
Latex is a god send. Our lab reports usually consist of more code than anything else. To some of my fellow students, report creation involves a repetitive session involving Open, Copy and Paste. Some run cat *.c > out and then spend a lot of time adding headings, comments etc. and editing it to make it presentable. But latex and a little bit of elisp lets me automate this every single time.

Nothing fancy, really. The verbatim package lets me include the contents of any ascii file. Well, using the built in input and verbatim commands can also do the trick. The listing of files (and associated metadata like headings, summary) in a directory is generated by my code archives generator with a slight modification. Instead of outputting html, it outputs latex code.

Here's a sample Latex file:

% .... imagine lots more (Lots!)
\cfile{Dijkstra's Shortest Path}{/home/anirudh/s4/dijsp.c}

C-c C-c RET in AucTex mode and 53 pages are ready for presentation in no time. Watch out for overfull \hbox warnings though.


Copyright © 2004-2011 Anirudh Sasikumar. All rights reserved.
Last Updated: January 21, 2005 4:25 PM