A framework for analyzing varieties of writing in a discipline