This is how I would do it: Also, if syntax highlighting is not required, package alltt:. Nested compound statements are a red herring. Lamport writes "TeX is usually pronounced techmaking lah -teck, lah- teckand lay -teck the logical choices; but language is not always logical, so lay-tecks is also possible. The present TUG policy is that papers in TUGboat are members-only for one year, and go to the general public after all. Are there any coding style guidelines for LaTeX?
I use the listings package quite frequently, http:
Code Highlighting with minted