The LaTeX listings package is possibly the most widely used source code formatting package. I am a LaTeX newbie and tend to evaluate potential packages primarily based of their popularity –Google plays a vital role here. The listings package was somewhat an exception since I resorted to using it not only because it is popular, but also because it fits in perfectly within my typesetting workflow.

My approach to writing, like most things I do in life, is centered on decomposing individual chapters into smaller manageable compoenents. The figure below illustrates the level of fragmentation I typically follow…