<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ashevile Web Design and Computer Networking :: Applied Solutions Group &#187; geshi</title>
	<atom:link href="http://www.appliedtns.com/blog/tag/geshi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.appliedtns.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 28 Apr 2010 02:39:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Code Highlighting in Wordpress</title>
		<link>http://www.appliedtns.com/blog/2008/11/code-highlighting-in-wordpress/</link>
		<comments>http://www.appliedtns.com/blog/2008/11/code-highlighting-in-wordpress/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 16:23:14 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[geshi]]></category>
		<category><![CDATA[syntax highlighting]]></category>
		<category><![CDATA[Wordpress Filter]]></category>

		<guid isPermaLink="false">http://asgblog.com/?p=9</guid>
		<description><![CDATA[Syntax highlighting of your code in Wordpress is pretty straightforward. To make your code snippets beautiful all you need to do is put your code in a pre tag and give is a lang attribute of the language your code is in. Here is an example:

$textVar =  &#34;Lorem %s&#34;;
echo sprintf&#40;$textVar, &#34;Ipsum&#34;&#41;;

So to do this [...]]]></description>
			<content:encoded><![CDATA[<p>Syntax highlighting of your code in Wordpress is pretty straightforward. To make your code snippets beautiful all you need to do is put your code in a <kbd>pre</kbd> tag and give is a <kbd>lang</kbd> attribute of the language your code is in. Here is an example:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color:#AADDFF; font-weight:bold;">$textVar</span> =  <span style="color:#A8FF60;">&quot;Lorem %s&quot;</span>;
<span style="color:#FFFFFF; font-weight:bold;">echo</span> <span style="color:#FFFFFF; font-weight:bold;">sprintf</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AADDFF; font-weight:bold;">$textVar</span>, <span style="color:#A8FF60;">&quot;Ipsum&quot;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;</pre></div></div>

<p>So to do this you would open a pre tag followed by lang=&#8221;php&#8221; then inside the pre you put your code and close it. Geshi and the Wordpress filter will take care of the rest. Almost any language you can think of is included, even some really obscure ones like &#8220;d&#8221; which I am sure few people use or &#8220;lotusscript&#8221; which I am sure hardly anyone uses anymore. Here are a few of the languages that you might use with their lang name above the example.</p>
<h3>Obj-C :: lang=&#8221;objc&#8221;</h3>

<div class="wp_syntax"><div class="code"><pre class="objc objc" style="font-family:monospace;"><span style="color:#9FBFFE; font-weight:bold;">@interface</span> MyClass <span style="color:#006600; font-weight:bold;">:</span> <span style="">NSObject</span><span style="color:#AA66FF; font-weight:bold;">&#123;</span>
  <span style="">NSString</span> <span style="color:#006600; font-weight:bold;">*</span>text;
<span style="color:#AA66FF; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#006600; font-weight:bold;">-</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span>IBAction<span style="color:#AA66FF; font-weight:bold;">&#41;</span>buttonClick<span style="color:#006600; font-weight:bold;">:</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#FFFFB6; font-weight:bold;">id</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>sender;
<span style="color:#9FBFFE; font-weight:bold;">@end</span></pre></div></div>

<h3>C :: lang=&#8221;c&#8221;</h3>

<div class="wp_syntax"><div class="code"><pre class="c c" style="font-family:monospace;"><span style="color:#FFFFFF; font-weight:bold;">printf</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">&quot;Here is a line of %s&quot;</span><span style="color:#006600; font-weight:bold;">,</span> <span style="color:#A8FF60;">'text'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;</pre></div></div>

<h3>MySQL :: lang=&#8221;mysql&#8221;</h3>

<div class="wp_syntax"><div class="code"><pre class="mysql mysql" style="font-family:monospace;"><span style="color:#9FBFFE; font-weight:bold;">CREATE DATABASE</span> wizzle;
<span style="color:#9FBFFE; font-weight:bold;">SELECT</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#9FBFFE; font-weight:bold;">FROM</span> wizzle <span style="color:#9FBFFE; font-weight:bold;">WHERE</span> id<span style="color:#006600; font-weight:bold;">=</span><span style="color:#A8FF60;">'1'</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2008/11/code-highlighting-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
