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
Tags: mathematica kate syntax highlighting
Awesome job, thanks!
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?
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.
Cheers
I fixed it, just by deleting the empty lines at the beginning.
Cheers
Fine — but the file I pasted doesn't have empty lines, you probably added them on copying ;p
Optimally you can just click "download raw" and save the file, that's safe. 🙂
Good luck with it!
Thank you so much, this is great!
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.
It seems the file is no longer available. Does anyone have a backup?
How stupid. I actually don't seem to have one right now. Will search some more later.
I updated the link, it should work again. Not sure it's the very latest version of what I made but it's pretty close.