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.
I know many manuals and books published prior to the 1980s contained monospace source code, for example because they were produced with technologies that can output only monospace text. I'm specifically asking about other manuals and books, the ones for which there was at least a technical choice of fonts.