replace links in bibliography with proper BibTeX citations, and alphabetize