Cleaned up BuildFileWrangler.

Factored out code commong to four LaTeX source generation methods.