In Se7en, John Doe is tracked to his residence by Detectives Mills and Somerset due to activity on his library card:
"Divine Comedy", "History of Catholicism", A book called "Murderers and Madmen", "Modern Homicide Investigation", "In Cold Blood", "Of Human Bondage". The Marquis de Sade. Works of Saint Thomas Aquinas. There. He wrote about the seven deadly sins.
These are the books that John Doe had checked out. John Doe was shown to be extremely knowledgeable in the Seven Deadly sins. He obviously had been studying them for quite some time to the point of obsession.
Also, we see that John Doe's apartment is stocked with several books.
I understand that the notebooks to the left of Somerset are John Doe's personal writings. However, there are several books shown in his apartment.
The police officer even states how well educated and wealthy he is.
All we know about him is that he's independently wealthy, well educated and totally insane.
Is it ever explained why John Doe would need to check out books from a public library on a subject that he is obviously already well versed in?