I receive requently of requests for help, for new tutorials and for certain features on my website.
The one request I constantly receive since approx. 4 years is that my tutorial should use syntax highlighting for the code.
I finally took the time to implement this. This was quite time consuming as I build most articles from Docbook sources and I hadn’t touched my build process in the last 3 years. So I had to re-learn what I did a few years ago and change it so that I get syntax highlighting. I also took the time to clean everything a bit up so hopeful future changes will be simpler.
I hope you like the result, I also tried to improve the look with improved stylesheets.
Here is an example from the: Eclipse RCP tutorial and here is an example for the Android Tutorial.
Let me know what you think.
Looks great – many thanks as always!
Hi Lars,
great that you got it to work! Syntax highlighting helps a lot when looking at code.
Now you should write a blog post, which describes your publishing process. Docbook + syntax hightlighting + export to mobile formats may be interesting to a lot of people. Also, it might serve as an easy documention for yourself
@Wolfgang: I have a Docbook tutorial since a long time and I updated it also for this setup: http://www.vogella.de/articles/DocBook/article.html
Very nice. Inspiring work
nice job…
Hi Lars.
Yes, it looks nice, but have you seen this highlighter?
http://code.google.com/p/syntaxhighlighter/
@Mur: Yes but I wanted a non JavaScript solution.
Well done! Code highlighting is helpful indeed, when reading the tutorials.
And thanks for supporting non-javascript-enabled devices!
Nevertheless, I have to admit I am not a big fan of serif fonts in regular text.
@Nils: what would be your choice?