Clean up latex makefile template
Fix the sort mapping

Now works for paragraphs in the beginning and end of a file.
Remove tab mappings

Use gt and gT instead.