Mathematica programming language syntax highlighting in kate

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).

Categories: Everything


11 replies

  1. Awesome job, thanks!

  2. 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?

  3. If you copied it to the right location and restarted kate, it should automatically use the mode for files with the right extension… if not, click Tools -> Highlighting -> Scientific -> Mathematica.


  4. Thank you so much, this is great!

  5. A really great file! Just what I needed.

    Is there a chance to add a different color for variables?

    • 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.

  6. It seems the file is no longer available. Does anyone have a backup?

Leave a Reply

Your email address will not be published. Required fields are marked *