a person who pays more attention to formal rules and book learning than they merit
A teacher or schoolmaster.
Pedantic.
The word comes from the Italian pedante, which originally meant "a teacher" or "schoolmaster." It entered English through Middle French and is related to the modern French word pédant.