This script helps alphabetize a list of authors in LaTeX by last name (useful for large author lists in collaborations).
Assumes that the last name is preceded by '~' or whitespace. It should correctly join any number of affiliation lines to the preceding author.
Usage:
python alphabetize_authors.py input_filename [-o output_filename]
Authors: