Friday, January 6, 2012

I've had enough from trying to program in Mathematica's Notebook GUI interface, so I decided I'd use kate now. Sadly, it doesn't have syntax highlighting for Mathematica by default. Thus, I created a simple implementation for this.

If you want to use it, just download this file and put it in /usr/share/apps/katepart/syntax/mathematica.xml (change directory as required).

11 comments:

Perfect!This is exactly what I need!But how can I select the 'Mathematica-mode' in Kate. After copying your file into the /usr/share/apps/katepart/syntax/ directory I can't find how I can enable the Mathematica syntax highlighting in Kate?

Very difficult since this is semantic information -- it's not easy to know which of the words is a variable and which is not. There is no simple rule to determine it. If you wanted to do that, you'd need a parser and static analyzer for the mathematica language, which is a lot of work.