20110930 wp syntax and code presentation - plembo/onemoretech GitHub Wiki

title: wp-syntax and code presentation link: https://onemoretech.wordpress.com/2011/09/30/wp-syntax-and-code-presentation/ author: lembobro description: post_id: 1190 created: 2011/09/30 15:01:25 created_gmt: 2011/09/30 19:01:25 comment_status: closed post_name: wp-syntax-and-code-presentation status: publish post_type: post

wp-syntax and code presentation

Just started experimenting with the WP-Syntax plugin for WordPress. Apart from leading me to discover that some (much) of what I though was a pretty good translation out of FlatPress pages into WordPress format was ... crummy, it has caused me to reconsider a lot of what I originally believed about the most effective way to present code in weblogs and other media. My basic philosophy when it comes to writing and especially the presentation of my own writing is generally "the simpler the better". That's how I wound up using the extremely minimalist Sandbox theme on both this and my personal blog. Apart from getting eyestrain from the usual teeny tiny default font sizes set by most themes, I've always preferred letting HTML markup work as originally intended, that is, in the words of css expert Andy Rutledge, to add meaning and context to the content. But as someone who is interested in sharing what I learn, especially in the area of programming, I continue to be interested in anything that can help me improve the presentation of that material. And so I find myself playing around with the basic syntax highlighting and other features provided by WP-Syntax. The plugin uses Generic Syntax Highlighter (GeSHi) supported syntax, and the latter's project page is a good resource for getting beyond the basics. The WordPress plugin page gives a good summary of how to use it and what to expect. Basically what WP-Syntax does is provide a choice of styles for formatting code text. It is invoked by extending the

 tag with a "lang" element: ** <pre lang="perl">** #!/usr/bin/perl use strict; print "Hello Worldn"; __END__; </pre> In the short time I've worked with the plugin I have seen some unexpected results, some of which have been... unpleasant. Some of this may be attributable to my habit of bracketing code in  and then 
 tags, a carryover from the "good old days" when my blogs were hosted on Blogger (by definition the  tag should display in a monospaced font -- but 
 may be needed to allow for indenting and other code formatting elements that would be lost if rendered by standard HTML), and some on the general weirdness that seems to always accompany things technical. Not that I'm complaining. As Garrett Morris (doing his impression of Chico Escuela) once said, "Base-a-ball been berry berry good to me."

Copyright 2004-2019 Phil Lembo

⚠️ **GitHub.com Fallback** ⚠️