Pari/GP is a computer algebra system for fast computations in number theory. While being well integrated in Unix (emacs mode, readline, etc.), it is hard to use for many beginners. Especially if they are Windows users.
Though emacs' pari-mode is very comfortable (if you are comfortable with emacs), the emacs editor is also too hard to learn for many Windows users. For example I use Pari/GP from within emacs, but I do not use the the pari-mode. For Windows users there are some GUIs available but each has its limitations:
Fortunately there are many good text-editors which support new languages by adding some config-file.
One of these editors is SciTE - the scintilla editor. SciTE is platform independent, so it supports windows and linux. SciTE is flexible and modes for many major programming languages (and LaTeX, Html etc.) are already included.
Based on scite's C++ mode I have created a mode for working with
Pari/GP. It is aimed at new users of Pari/GP and especially (new) Pari/GP
users under Windows.
Features of the Pari/GP-mode for SciTE consists of:
Have a look at the screenshot:
# import pari.properties from /usr/local/include/scite: import /usr/local/include/scite/pari source.files=$(source.files);*.gp;be sure to change /usr/local/include/scite to the directory where you have saved pari.properties and yes, the import line is without .properties.
That's it. There is one flaw: the gphelp-script under Windows uses Ansi-Escape-Seqences for formatting (e.g. bold), which disturb output in the output-window. There are at least two ways to deal with this situation:
#$ch = "\e[m$ch"; #$cu .= $cu ? "\e[1m": "\e[4m"; #$cb .= "\e[1m";Save the changed file for example as gphelp_scite and exchange the comments in the two lines in pari.properties. That are the two lines with command.help.$(file.patterns.gp) in the if PLAT_WIN part of the file.
gphelp -detex | sed "s/\d027\[[0-9]\?m//g "The sed filter deletes the ANSI-formatting from the output.
Under Linux this problem does not exist because gphelp opens xdvi with the corresponding part of the Users-Guide. If you prefer help in the scite window, you may change the command.help.$(file.patterns.gp) line in the if PLAT_GTK part of the file to:
command.help.$(file.patterns.gp)=gphelp -detex
But then you have the same problem as explained above and you may want to patch the gphelp script too, so you better change the line to:
command.help.$(file.patterns.gp)=gphelp_scite -detex
or use the sed filter
command.help.$(file.patterns.gp)=gphelp -detex | sed "s/\d027\[[0-9]\?m//g"
The Option -detex is needed since otherwise gphelp opens a xdvi window.