GNU TeXmacs is a free scientific text editor, which was both inspired by TeX and GNU Emacs. The editor allows you to write structured documents via a wysiwyg (what-you-see-is-what-you-get) and user friendly interface. New styles may be created by the user. The program implements high-quality typesetting algorithms and TeX fonts, which help you to produce professionally looking documents. One major objective of TeXmacs is to promote the development of free software for and by scientists, by significantly reducing the cost of producing high quality user interfaces. Axiom is one of many programs for which interfaces exist. GNU TeXmacs runs on most Unix architectures, as well as on Windows. Detailed information is available for downloading and installing TeXmacs. Axiom InterfaceOn all Unix/Linux systems the most recent version of TeXmacs is pre-configured to automatically interface with Axiom provided that Axiom is installed and FRICASsys is accessible at the command line (must be in the path). The current interface for Axiom has some known limitations when formatting long mathematical expressions. Cygwin is a Unix-emulation environment for windows. The cygwin version of TeXmacs automatically interfaces with Axiom for Windows provided that the Path enviroment variable includes the Axiom directory as described in AxiomBinaries?. This path is set automatically by the Axiom for Windows installer program. The native windows version of TeXmacs does not require the installation of cygwin. A new version of the Axiom interface program tm_axiom that was written especially for Windows is included in the latest Axiom for Windows installation program. This will be used automatically by the native windows version of TeXmacs. In TeXmacs with the new tm_axiom there is also a new Axiom command. If you enter: )set output texmacs in an TeXmacs Axiom session you get the following explanation: --------------------------- The texmacs Option ---------------------------- Description: options for display of AXIOM output in TeXmacs )set output texmacs is used to control the TeXmacs-AXIOM interface The default values are controlled by environment variable TM_AXIOM and may be overriden by command line options. Syntax: )set output texmacs <arg> where arg can be one or more of break <on>|<off> line-break algorithm over <on>|<off> convert 2-d \over to 1-d cdot <on>|<off> convert \cdot to \ (space) space <on>|<off> convert \ (space) to \, big( <on>|<off> convert \left( \right to ( ) width <9.99> line width in inches <on> may be on, yes, 1 <off> may be off, no , 0 The current settings are: break 1, over 1, cdot 1, space 0, big( 1, width 4.5 This new interface program is also recommended for use in cygwin. To check that you are using the new program, in a cygwin shell enter the command: $ which tm_axiom If the response is: /cygdrive/c/Program Files/axiom/mnt/windows/bin/tm_axiom.exe (where the default location A new version of the Axiom stylesheet c:\Program Files\wintexmacs\TeXmacs\plugins\axiom\packages\session\axiom.ts with the file of the same name found in Axiom for Windows: c:\Program Files\axiom\mnt\windows\axiom.ts On cygwin the file cd /usr/share/TeXmacs/plugins/axiom/packages/session Overwrite existing stylesheet with the new stylesheet file: cp /cygdrive/c/Program Files/axiom/mnt/windows/axiom.ts .
Troubleshooting
ExamplesThe following TeXmacs documents contain examples of how to use TeXmacs with Axiom:
->draw(sin(x),x=0..1) Compiling function %D with type DoubleFloat? -> DoubleFloat? Graph data being transmitted to the viewport manager... AXIOM2D data being transmitted to the viewport manager... (1) TwoDimensionalViewport?: "sin x" Type: TwoDimensionalViewport? But no picture was created. Does draw() still not work in this verion? Anyway, Axiom is excellent CAS and I will introduce this in my calculus class. Thanks! There is no identifying information in this post so I cannot help you directly.I suspect the problem is that the axiom interface module is calling FRICASsys
(the actual axiom interpreter) rather than the axiom shell script. The axiom
shell script starts the Please open a command terminal, set your AXIOM variable and PATH variable,
and type Tim Daly
s := operator 's DE := D(s(t),t,2) = -k^2s(t) - cD(s(t),t) S := solve(DE,s,t=0,[A,0]?) S1 == eval(S,[A=1,k=1,c=3]?) draw(S1,t=0..100) Following the compiling of the draw function, I get:Graph data being transmitted to the viewport manager... >>System error: SOCK-SEND-INT is invalid as a function. protected-symbol-warn called with (NIL) This same error appears both in axiom alone and in WinTeXmacs?. Any ideas for solving this would be appreciated. If I need to set the AXIOM and PATH variables, as suggested above, what should they be set to? You can respond to me at jws@cablespeed.com if you wish. Thanks, John Sheppard The windows version of Axiom does not have graphics. The graphics subsystem currently only works on Linux and needs X11. We are working on a windows solution.
--> integrate(log(x),x) System error: Caught fatal error [memory may be damaged]? protected-symbol-warn called with (NIL) I've just compiled Axiom 3.9 (and texmacs 1.0.5.9) on a RH EL system. Both installed to non standard locations. While command line axiom works, and texmacs presents an axiom session (and actually launches axiom), I did not manage to get axiom working from within texmacs (I get no line promt ->, and when I press the ENTER key nothing happens, no evaluation, nothing).Forgive my stupidity but ... any help?? brunelli@itc.it Graphics does not work under the TeXmacs 1.0.5 interface --unknown, Mon, 12 Sep 2005 12:42:27 -0500 reply Under linux with TeXmacs, the graphics doesn't appear at all. Just the message indicating the type is shown.
I even followed the instructions on the FAQ and changed the FRICASsys to axiom and even sman. But if I do that though HyperDoc appears, I have to press return several times(may be upto 7 times) before the answer appears on the texmacs interface. Just blank lines with the red axiom prompt keep on appearing.
Hyperdoc and Axiom Help menu in the TeXmacs interface --unknown, Mon, 10 Oct 2005 13:49:38 -0500 reply Is there a possibility of using the hyperdoc type in the commands in the TeXmacs interface (to get a nicely formatted output)? I tried to replace the tm_axiom program with the one that launches axiom or sman instead of FRICASsys but doing that causes me to press the enter key several times to get the commands accepted and that is really annoying.
I am using a Fedora-3. The problem seems to be in the sman or axiom as when I launch it separately, the same thing occurs--ie, I have to press the enter key several times to get the command accepted. I have used axiom built from the April 2005 sources as well as that from the September 2005 sources and the problem continues.
Also can the axiom help/reference be lanched from within the TeXmacs as it can be done using MuPAD? from TeXmacs. RE:Hyperdoc and Axiom Help menu in the TeXmacs interface --unknown, Mon, 10 Oct 2005 13:55:10 -0500 reply I also face the same problem but on Mandrake Linux. Accessing online help would definately be wonderful idea. I know that Hyperdoc exists for this purpose but the way HyperDoc does this needs a lot of improvement to be useful.
[AxiomBinaries]? Hyperdoc and Axiom Help menu in the TeXmacs interface --root, Mon, 10 Oct 2005 13:57:15 -0500 reply FRICASsys does direct reads from its terminal.
axiom is a script that launches sman (superman). sman starts hyperdoc, FRICASsys, and clef which is a command-line completion program. I don't know but I suspect "clef" is getting in the way.
Try changing the call to Tim HyperDoc does not take any input if the NmPd? key is on. I use KDE/3.3 on a Fedora-3. Is this peculiar to me or is a bug/feature of the HyperDoc :) Anyway I think its more convinient to enter numbers from the Numeric Kepad The problem with starting axiom (or sman) instead of FRICASsys from TeXmacs is that it writes the prompt twice instead of once when it starts. One can modify tm_axiom.c to wait for two prompts at start-up time. This was done in the old TeXmacs interface with commercial Axiom.Is it possible to get rid of the first prompt? Having prompts not preceeding user input is very annoying. Andrey Unknown wrote:Is there a possibility of using the hyperdoc type in the commands in the TeXmacs interface (to get a nicely formatted output)? Axiom Could you please describe what effect you would like to achieve in TeXmacs? In what way is the current TeXmacs output not nicely formatted? AxiomBinaries? Hyperdoc and Axiom Help menu in the TeXmacs interface --Varun, Tue, 11 Oct 2005 14:09:26 -0500 reply I've already tried using axiom -noclef but to no help.
As per Andrey:
One can modify tm_axiom.c to wait for two prompts at start-up time. This was done in the old TeXmacs interface with commercial Axiom.
Can someone tell how this can be done or change the tm_axiom and distribute the code. Any help is welcome. Varun. RE: Hyperdoc and Axiom Help menu in the TeXmacs interface --Varun, Tue, 11 Oct 2005 14:30:56 -0500 reply Bill Page wrote:nicely formatted output --Bill Page, Tue, 11 Oct 2005 09:36:59 -0500 >reply Unknown wrote: Is there a possibility of using the hyperdoc type in the commands in >the TeXmacs interface (to get a nicely formatted output)?What I intended was: Can I use the HyperDoc while still working under TeXmacs and get nicely formatted output. Sorry for my not being clear. Could you please describe what effect you would like to achieve in >TeXmacs? In what way is the current TeXmacs output not nicely >formatted? There are a lot of things that can be improved in TeXmacs. First of all an online reference would certainely help a lot (those who are Turbo C IDE fans would know this)--one just presses some hot key and gets more information on the command he wishes to use and is not so sure about. He can get some examples on how to use the system, just fill in some entries and get the command output without having to learn hundreds of functions. This would be most beneficial to users new to axiom and to those who have just started to use Computer Algebra Systems. Not only that, this I think would save time of those users who are just using the Unfortunately, not a lot of resources are available to do this. At this time, the only person that I know who is working on this is Andrey G. Grozin. See http://lists.gnu.org/archive/html/axiom-developer/2005-08/msg00229.html It is easy to modify tm_axiom.c to start axiom (with hypertex and graphics)Instead of starting FRICASsys, it should start Also, in void session(void), declare: int prompts=0; and, a few lines later, replace the line: else if (code==PROMPT) break; by the line: else if (code==PROMPT) { if ((++prompts)==2) break; } However, it would be much better to fix this damn double-prompt problem once and for all. Axiom must not write a prompt when it is not prompting the user to input something. Andrey Thanks Andrey. I followed your tips and HyperDoc now seems to work except for problems created when I use HyperDoc to enter commands. Varun I noticed that the tutorial (tutorial.tgz) above doesn't display correctly on FC4 with TeXmacs 1.0.6. Having just started texmacs for the first time I'm not sure of the details, but the .tm files like oneStep01.tm "link" to the axiom and axiom-tutorial styles and don't display correctly. I discovered that by reversing the order so that axiom comes before axiom-tutorial they seem to work ok. A bit of perl will clean them all up:save the following as a file and do a 'perl file tutorial': use strict; use warnings; use Cwd; use File::Find; my $read_dir=$ARGV[0]; my $top = getcwd(); find(&d, "$top/$read_dir"); sub d { my $file = $File::Find::name; if (-f $file && $file =~ m/\.tm$/) { print("found tex style file $file\n"); `mv -v $file $file.bak`; open(IN,"$file.bak") or print("couldn't open $file.bak\n") && next; open(OUT,">$file") or print("couldn't open $file for writing\n") && next; while(my $line = <IN>) { $line =~ s/\|axiom\|axiom/\|axiom/g; $line =~ s/axiom-tutorial\|axiom/axiom\|axiom-tutorial/; print(OUT $line); } close(IN); close(OUT); } } |