Showing posts with label syntaxhighlighter. Show all posts
Showing posts with label syntaxhighlighter. Show all posts

Monday, July 11, 2011

Postscript Brush SyntaxHighlighter

I found myself working with Postscript again and I wanted to share some tips and tricks. Syntax highlighting is a great clue in communications about software. I set out to provide syntax highlighting for Postscript.

I have some experience with Alex Gorbatchev's SyntaxHighlighter. It is a javascript based syntax highlighter with customizable brushes. I created a Smalltalk brush for my Smalltalk Galore blog account. I took that experience and used it to provide a Postscript brush for SyntaxHighlighter. It can be found in the git repository at SyntaxHighlighter-Postscript-Brush.

So you can expect some syntax highlighted Postscript code on this blog soon.

Sunday, July 10, 2011

Postscript Syntax Highlighting

In this blog post I will outline the GtkSourceView language definition for Postscript.

Postscript is best know as a page description language. I found myself using it to produce a set of pictures, but was disappointed that no syntax highlighting was available. Luckily I had prior experience

Just like the the blog post about MAGMA syntax highlighting I used GtkSourceView to create a language definition file for Postscript. The language definition file can be found on github. For instructions about installing the language definition file I refer to the post about MAGMA. (Or you can find instructions in the README file.)

Have fun with Postscript!

Friday, June 3, 2011

MAGMA Syntax Highlighting

This blog post points out how to add syntax highlighting for MAGMA in gedit.

MAGMA is a very good computer algebra system, but not very well known outside a select mathematical circle. So it is not very surprising that gedit does not know how to syntax highlight MAGMA code out of the box.

Gedit uses GtkSourceView as its syntax highlighting engine. GtkSourceView can be extended by providing a language definition file.

So I set out to create a language definition file for MAGMA. The results can be found at github. In order to use is, you have to place the magma.lang file in the following directory:


~/.local/share/gtksourceview-2.0/language-specs

Below you can find a screenshot of a snippet of MAGMA code highlighted by gedit.

Friday, June 26, 2009

Syntax Highlighting in Blogger

I want to write about code and I like to see my code nicely formatted. I have seen it done on other blogs so I started to look around how it was done. The nicest formatted code all used syntaxhighlighter. So I wanted to use this tool as well.

In my search I came across some older posts which seemed outdated. In the end I found the right place for reference. Just go straight to Alex Gorbatchev's site about the tool he made.

If your curious about how to use syntaxhighlighter in blogger read techqi's blog. I would be repeating him if I would explain how to use syntaxhighlighter in blogger. Don't forget to read the comments for the original posting misses an imported blogger related configuration.

Last but not least, something that the above blog does not mention. Do not forget to donate. The tool that Alex made is really great and he deserves credit for it. Why not make it some real credit he can spend.