At least through the early 1980s, the source code in non typewritten computer manuals and books was usually typeset using proportional fonts, sometimes with syntax highlighting such as keywords in bold. When did these works start switching to unhighlighted monospace fonts for code? Was this shift driven by any particular technologies, production processes, or requirements? I wonder whether the spread of formatting software like `troff` and TeX since the early 1980s, which provide good support for rendering code as monospace, may have driven or helped the shift.