Original: Libretti for operas, oratorios, and cantatas in the 17th and 18th centuries generally were written by someone other than the composer, often a well-known poet.
Simplified: Arrigo Boito, who wrote libretti for, among others, Giuseppe Verdi and Amilcare Ponchielli, composed two operas of his own.