Quantcast
Channel: Douglas Whitaker » blogging
Viewing all articles
Browse latest Browse all 5

Highlighting source code in posts

$
0
0

In an earlier post I had mentioned that I didn't know how to highlight source code in blog posts (syntax highlighting) or even offset code with a monospace font/typeface. Apparently, this is a feature of WordPress.com that I didn't know about, and is available as a plugin called SyntaxHighlighter Evolved for WordPress.org. I installed it, and it seems to do what I want. It supports a variety of languages, but not all that I use (for instance R is supported but not SAS). I'll keep my eyes open for a different plugin, but this works for now.

Of course, if one doesn't want or care about the syntax highlighting, then <pre> and <code> tags should suffice. A useful post from StackOverflow concerning some subtleties of the tags is here.


Viewing all articles
Browse latest Browse all 5

Trending Articles