In case people were wondering how the code I’ve been posting has been formatted, here’s the procedure.
This blog is running on a WordPress installation. I’ve installed the “Raw HTML” plugin. This allows me to insert HTML directly into postings by surrounding them with “[raw]” and “[/raw]” in the text input mode.
I program in emacs, so I just needed an emacs package to convert the buffer to HTML. I started out trying to use the built-in htmlfontify-buffer function, but it produced HTML with CSS elements that affected the rest of the page. So, after looking around a bit, I settled on htmlize, which is available at this location.
So, load the code to be rendered, load the htmlize library, and run htmlize-buffer. This creates a new buffer holding the HTML version of the displayed text, ready to be copied into the blogging software.