Many academic papers and books do this. For example, see the famous paper "Why Functional Programming Matters" [1]. To me, having non-monospaced font in a paper or book is a signal that the contents are "too academic" to be of practical use. This is a very weak signal though - for example, Sally Goldman's excellent book "A Practical Guide to Data Structures and Algorithms using Java"[2] has pages and pages of useful Java code in non-monospaced font.
[1] https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.p...
[2] http://www.amazon.com/Practical-Structures-Algorithms-Chapma...