<?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>Olaf's Thoughts About Development &#187; Syntax Highlighting</title>
	<atom:link href="http://www.monien.net/blog/index.php" rel="self" type="application/rss+xml" />
	<link>http://www.monien.net/blog</link>
	<description>Delphi Programming, .NET Philosophy, Web development and more ...</description>
	<lastBuildDate>Mon, 14 Mar 2011 15:59:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Using SyntaxHighlighter on Blogs or Web sites</title>
		<link>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/</link>
		<comments>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 22:00:00 +0000</pubDate>
		<dc:creator>Olaf Monien</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[SourceCode]]></category>
		<category><![CDATA[Syntax Highlighting]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/</guid>
		<description><![CDATA[If you have a development realted blog or Web site, then you probably paste source code examples from time to time. Using Alex Gorbatchev&#8217;s SyntaxHighlighter makes your snippets look very pretty.  Update: For WordPress there is a SyntaxHighlighter Plus plugin, which is also based on the code below.  I&#8217;ve updated my posts here on the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a development realted blog or Web site, then you probably paste source code examples from time to time. Using Alex Gorbatchev&#8217;s SyntaxHighlighter makes your snippets look very pretty.<span id="more-180"></span> <em></em></p>
<p><em>Update: For WordPress there is a <a title="SyntaxHighlighter Plus" href="http://wordpress.org/extend/plugins/syntaxhighlighter-plus/" target="_blank">SyntaxHighlighter Plus</a> plugin, which is also based on the code below.  I&#8217;ve updated my posts here on the new WP based blog system to use that plugin.</em></p>
<p>I just found Alex Gorbatchev&#8217;s excellent <a href="http://code.google.com/p/syntaxhighlighter/" target="_blank">SyntaxHighlighter</a> on Google Code. It&#8217;s JavaScript based and makes it very easy to pretty-print your source code examples. It comes with modules for:</p>
<ul>
<li>C#</li>
<li>C++</li>
<li>CSS</li>
<li>Delphi</li>
<li>Java</li>
<li>Javascript</li>
<li>PHP</li>
<li>Python</li>
<li>Ruby</li>
<li>SQL</li>
<li>VisualBAsic</li>
<li>XML</li>
</ul>
<p>It&#8217;s completely modular, so if you need Delphi only, then you don&#8217;t have to load all other modules. Usage is very easy, just add the following to your HTML template that drives your blog or source code pages:</p>
<pre class="brush: html">
&lt;script src=&quot;/js/shCore.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;/js/shBrushDelphi.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>shCore.js is about 13KB, the language modules and clipboard.swf are just two KB in average. If you need Delphi and C# then just add shCSharp.js to the list above. To show a piece of source code you insert the raw source inside a &lt;pre&gt;&lt;/pre&gt; tag pair. The actual formatting will be done by SyntaxHighlighter.</p>
<pre class="brush: html">
&lt;pre class=&quot;delphi&quot;&gt;
var
  s: string;
begin
  s := &#039;Hello World&#039;;
end;
&lt;/pre&gt;
</pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Using+SyntaxHighlighter+on+Blogs+or+Web+sites&amp;link=http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/&amp;notes=If%20you%20have%20a%20development%20realted%20blog%20or%20Web%20site%2C%20then%20you%20probably%20paste%20source%20code%20examples%20from%20time%20to%20time.%20Using%20Alex%20Gorbatchev%27s%20SyntaxHighlighter%20makes%20your%20snippets%20look%20very%20pretty.%C2%A0%0D%0A%0D%0AUpdate%3A%20For%20WordPress%20there%20is%20a%20SyntaxHighlighter%20Plus%20plugin%2C%20which%20is%20also%20based%20on%20the%20code%20bel&amp;short_link=&amp;shortener=tinyurl&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.monien.net/blog/index.php/2008/04/using-syntaxhighlighter-on-blogs-or-web-sites/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

