<?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>blog.watashii &#187; highlight</title>
	<atom:link href="http://blog.watashii.com/tag/highlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.watashii.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Sep 2010 07:15:28 +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>Syntax Highlight Code On Any Page Using Google Code Prettify</title>
		<link>http://blog.watashii.com/2009/10/syntax-highlight-code-on-any-page-using-google-code-prettify/</link>
		<comments>http://blog.watashii.com/2009/10/syntax-highlight-code-on-any-page-using-google-code-prettify/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 13:17:01 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prettify]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=277</guid>
		<description><![CDATA[
The Google Code Prettify is a JavaScript module that allows syntax highlighting of any code snippets on a HTML page.  Setting this up on any web page is a simple 3 step process, and is supported on most common browsers.
[Demo]   (Based on:  prettify-21-May-2009.zip)
[Download Source Files]

1) Include the JavaScript and CSS file within the head of [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/11/overlay-slideshow-images-with-lightbox-2/' rel='bookmark' title='Permanent Link: Overlay &#038; Slideshow Images with Lightbox 2'>Overlay &#038; Slideshow Images with Lightbox 2</a></li>
<li><a href='http://blog.watashii.com/2009/03/get-url-variables-in-javascript-html/' rel='bookmark' title='Permanent Link: Get URL Variables in JavaScript &#038; HTML'>Get URL Variables in JavaScript &#038; HTML</a></li>
<li><a href='http://blog.watashii.com/2008/11/a-better-lightbox-using-jquery/' rel='bookmark' title='Permanent Link: A Better LightBox Using jQuery'>A Better LightBox Using jQuery</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-280" title="prettify00" src="http://blog.watashii.com/wp-content/uploads/2009/10/prettify00.png" alt="prettify00" width="375" height="250" /></p>
<p>The <a href="http://code.google.com/p/google-code-prettify/" target="_blank">Google Code Prettify</a> is a JavaScript module that allows syntax highlighting of any code snippets on a HTML page.  Setting this up on any web page is a simple 3 step process, and is supported on most common browsers.</p>
<p>[<a title="Google Code Prettify Demo" href="http://www.watashii.com/code/googlecode_prettify/watashii/" target="_blank">Demo</a>]   (Based on:  prettify-21-May-2009.zip)<br />
[<a title="Google Code Prettify Demo" href="http://www.watashii.com/code/googlecode_prettify/googlecode_prettify_watashii.zip">Download Source Files</a>]</p>
<p><span id="more-277"></span></p>
<p>1) Include the JavaScript and CSS file within the head of the HTML page</p>
<p><img class="alignnone size-full wp-image-281" title="prettify01" src="http://blog.watashii.com/wp-content/uploads/2009/10/prettify01.png" alt="prettify01" width="575" height="75" /></p>
<p>2) Include the action <em>onload=&#8221;prettyPrint()&#8221;</em> within the body element</p>
<p><img class="alignnone size-full wp-image-282" title="prettify02" src="http://blog.watashii.com/wp-content/uploads/2009/10/prettify02.png" alt="prettify02" width="488" height="41" /></p>
<p>3) Wrap your code snippet between pre tags: <em>&lt;pre class=&#8221;prettyprint&#8221;&gt;&#8230;&lt;/pre&gt;</em></p>
<p><img class="alignnone size-full wp-image-283" title="prettify03" src="http://blog.watashii.com/wp-content/uploads/2009/10/prettify03.png" alt="prettify03" width="521" height="345" /></p>
<h3>Notes:</h3>
<p>For code snippets containing <em>&#8220;&lt;&#8221;</em> and <em>&#8220;&gt;&#8221;</em> characters, <em>&#8220;;&amp;gt&#8221;</em> and <em>&#8220;;&amp;lt&#8221;</em> must be replaced in order to work, for example HTML code.</p>
<p>You can explicitly specify the code language to render, for example in Step 3 we can extend this by forcing it to Perl, using <em>&lt;pre </em><em>class=&#8221;prettyprint lang-<strong>perl</strong>&#8220;</em><em>&gt;&#8230;&lt;/pre&gt;<br />
</em>The languages available are <em>&#8220;bsh&#8221;, &#8220;c&#8221;, &#8220;cc&#8221;, &#8220;cpp&#8221;, &#8220;cs&#8221;, &#8220;csh&#8221;, &#8220;cyc&#8221;, &#8220;cv&#8221;, &#8220;htm&#8221;, &#8220;html&#8221;, &#8220;java&#8221;, &#8220;js&#8221;, &#8220;m&#8221;, &#8220;mxml&#8221;, &#8220;perl&#8221;, &#8220;pl&#8221;, &#8220;pm&#8221;, &#8220;py&#8221;, &#8220;rb&#8221;, &#8220;sh&#8221;, &#8220;xhtml&#8221;, &#8220;xml&#8221;, &#8220;xsl&#8221;</em>.</p>
<p>Line numbers can be included by added <em>&lt;span&gt; 1: &lt;/span&gt;</em> at the beginning of each line (this is a bit of manual work though).</p>
<p>Lisp, CSS, Haskell, LUA, OCAML, SML, F#, Visual Basic, SQL, Protocol Buffers, and WikiText languages are also support by inclusion of <em>src/lang-*.js</em> files.  See <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html" target="_blank">FAQ</a>.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/11/overlay-slideshow-images-with-lightbox-2/' rel='bookmark' title='Permanent Link: Overlay &#038; Slideshow Images with Lightbox 2'>Overlay &#038; Slideshow Images with Lightbox 2</a></li>
<li><a href='http://blog.watashii.com/2009/03/get-url-variables-in-javascript-html/' rel='bookmark' title='Permanent Link: Get URL Variables in JavaScript &#038; HTML'>Get URL Variables in JavaScript &#038; HTML</a></li>
<li><a href='http://blog.watashii.com/2008/11/a-better-lightbox-using-jquery/' rel='bookmark' title='Permanent Link: A Better LightBox Using jQuery'>A Better LightBox Using jQuery</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2009/10/syntax-highlight-code-on-any-page-using-google-code-prettify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Syntax Highlighter</title>
		<link>http://blog.watashii.com/2008/07/wordpress-syntax-highlighter/</link>
		<comments>http://blog.watashii.com/2008/07/wordpress-syntax-highlighter/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 14:45:58 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[highlighter]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=21</guid>
		<description><![CDATA[While trying to find a way to syntax highlighting / autoformat programming code on WordPress, I came across this.  After a while, I realised it only works for WordPress hosted page.  To enable syntax highlighting on a self hosted WordPress blog,  you need to install the Google Syntax Highlighter plugin.
Here are the installation steps:
1) Download [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/12/upgrading-to-wordpress-27-coltrane/' rel='bookmark' title='Permanent Link: Upgrading to WordPress 2.7 Coltrane'>Upgrading to WordPress 2.7 Coltrane</a></li>
<li><a href='http://blog.watashii.com/2009/09/wordpress-code-at-the-end-of-urls-hack/' rel='bookmark' title='Permanent Link: WordPress Code At The End Of URLs, Hack?'>WordPress Code At The End Of URLs, Hack?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>While trying to find a way to syntax highlighting / autoformat programming code on WordPress, I came across <a href="http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/">this</a>.  After a while, I realised it only works for WordPress hosted page.  To enable syntax highlighting on a self hosted WordPress blog,  you need to install the <a href="http://wordpress.org/extend/plugins/google-syntax-highlighter/installation/">Google Syntax Highlighter plugin</a>.</p>
<p>Here are the installation steps:</p>
<p>1) Download the plugin zip file.<br />
2) Extract plugin into /wp-content/plugins directory.<br />
3) Activate the plugin.<br />
4) When posting, use the HTML editor and insert the following code:<br />
<code>&lt;pre name="code" class="sql"&gt;<br />
select * from tab;<br />
&lt;/pre&gt;<br />
</code><br />
5) Hopefully looks like:</p>
<pre name="code" class="sql">select * from tab;</pre>
<p>The google documentation for using the syntax highligher is available <a href="http://code.google.com/p/syntaxhighlighter/">here</a>.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/12/upgrading-to-wordpress-27-coltrane/' rel='bookmark' title='Permanent Link: Upgrading to WordPress 2.7 Coltrane'>Upgrading to WordPress 2.7 Coltrane</a></li>
<li><a href='http://blog.watashii.com/2009/09/wordpress-code-at-the-end-of-urls-hack/' rel='bookmark' title='Permanent Link: WordPress Code At The End Of URLs, Hack?'>WordPress Code At The End Of URLs, Hack?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2008/07/wordpress-syntax-highlighter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
