+void AuthorList::sort()
+{
+ std::sort(authors_.begin(), authors_.end(), author_smaller);
+}
+
+
+ostream & operator<<(ostream & os, AuthorList const & a)
+{
+ // Copy the authorlist, because we don't want to sort the original
+ AuthorList sorted = a;
+ sorted.sort();
+
+ AuthorList::Authors::const_iterator a_it = sorted.begin();
+ AuthorList::Authors::const_iterator a_end = sorted.end();
+
+ for (a_it = sorted.begin(); a_it != a_end; ++a_it) {
+ if (a_it->used())
+ os << "\\author " << *a_it << "\n";
+ }
+ return os;
+}
+
+