I would like to post code snippets in a book (programming examples) page. How can I post pre-formatted code snippets along with the text? If possible, I would like the code snippet in a box with a different background color. How can I do this?

Comments

dbeall’s picture

http://drupal.org/project/codefilter

The code filter should do what you need. I believe it is used here on D.org

It permits the use of this would be code inside the code tags
and some text as well...

have fun!