Syntax highlighting seems to be an absolute necessity for editing any source code. However Spad, the language used in FriCAS/Axiom, is not so widespread to have syntax highlighting in major ordinary user text editors, like gedit.
Fortunately, one can enable syntax highlighting for Axiom files in vim. Just follow the instructions on MathAction site.
But what if you are not a hardcore linux programmer to use vim? For those who knows only :q! vim command there is an editor called Cream. Basically, Cream is the Vim, but with interface you used to in Notepad, Gedit, Kate or whatever you have.
After you have installed Cream and Axiom highlighting file you are ready to write .input (or .spad) files:
And a small tip for Cream — if you want to highlight matching brackets study the howto in Cream’s FAQ.
NOTE. There was emacs mode for Axiom, with syntax highlighting, more information is available at MathAction. I’ve never used emacs so neither I tried it for axiom.
Highlighting FriCAS code in your blog.
Vim also allows you to produce colored html from the source file:
)clear all q : Integer -> Symbol q i == subscript('q, [1::OutputForm]) p : Integer -> Symbol p i == subscript('p, [1::OutputForm]) Hamiltonian : Expression(Float) Hamiltonian == (p 1)^2 + (q 1)^2 PoissonBracket : (Expression(Float), Expression(Float)) -> Expression(Float) PoissonBracket(f, g) == D(f, q 1) * D(g, p 1) - D(f, p 1) * D(g, q 1)
This can be achieved with the command
gvim MyFile.input +TOhtml '+w! out.html' '+qall!'