document updated 11 years ago, on Feb 20, 2011
When documenting a technical procedure that asks the user to run command-line commands, it is important to clearly distinguish between human-readable prose and text that's intended for the computer (full command-lines, and shorter snippets of code or command-lines, and possibly even one-word identifiers within a sentence of prose).

Many documents don't have a clear enough of a visual dinstinction between the two.

At the very least, you should use a proportional font for prose and a monospace font for code. However, IMHO, this isn't always a clear enough distinction, particularly when the operator already understands the procedure. In this case, they want to completely ignore the human-reaedable text (because they understand it already) and quickly scan for only the computer-readable text. (because it's slightly more difficult to remember every character exactly)

On screen

On-screen, I prefer to use a distinct color, either the foreground or background, to signify text that's intended for the computer.

Black-and-white printouts

If you're fortunate enough to have a printer that can reliably reproduce gray-levels, then I prefer to mark computer-text with a slight gray background.

However, in my experience, many black-and-white printers vary their gray levels quite a bit over the life of the toner cartridge, getting lighter as toner level falls. This makes it difficult to use slight-gray-backgrounds, because the gray level needs to be very preceise (not too light or it becomes harder to distinguish from white-background text, and not too dark or it becomes harder to read the black-on-dark-gray text).

If your printer is among the majority that have uneven gray levels, it's better to do this:

Color print-outs

Use a different foreground color for the computer text. (using color for background is wasteful of ink)