About

My name is Matteo and I work as a developer on the .NET framework in a software house based in Milan (Italy).
I’m working in the IT since the very next day after I got my master degree in Physics at Milan University (Italy).

In this blog I’m trying to share my every day experience.
Hope that someone out there find it useful!

If you want to contact: email

2 responses

31 03 2008
Esteban

Matteo,

I was wondering what you use for syntax highlight on your code samples. It looks really good, and I’d like to use it as well.

Thanks,
Esteban

31 03 2008
ilmatte

Hello Esteban,

for syntax highlight I use the wordpress tag:
[ sourcecode language="csharp"]…[/sourcecode].

Note that I added a space between the leading bracket and the word sourcecode ([ sourcecode) just to let it be visible in this comment. You should write it with no spaces to make it work.

It takes care of formatting, syntax highlight and even adding those three links a the top of each sample (view plain, copy to clipboard, print).

I wrote a post about it. You can find it at:
http://ilmatte.wordpress.com/2008/01/17/wordpress-sourcecode-tag-and-themes/

Remember that it doesn't work with the default wordpress theme: Kubrick.
I'm using freshy theme and it works well.

Following is a sample usage in csharp:

[ sourcecode language="csharp"]
using System;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;

namespace ProjectName
{
[TestFixture]
public class Class1Tests
{
[Test]
public void TestMethod1()
{
bool testValue = true
// Post-interaction assertion
Assert.That(testValue, Is.True);
}
}
}[/sourcecode]

Hope this answers your question,

Matteo

Leave a comment