Like a pedant, overly concerned with formal rules and trivial points of learning.
The word comes from the Latin pedant, originally referring to a schoolmaster, combined with the suffix -ic. It was later adopted into English to describe someone who is overly concerned with minor details or rules.