login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

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 Interface

On all Unix/Linux systems the most recent version of TeXmacs is pre-configured to automatically interface with Axiom provided that Axiom is installed and AXIOMsys 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 Program Files might be different) then you are using the new version. Otherwise make sure you delete or rename the older version of tm_axiom and try the which command again.

A new version of the Axiom stylesheet axiom.ts is available in Axiom for Windows which improves the formatting of Axiom output. To obtain this stylesheet, use Windows file manager to replace the existing file in TeXmacs:

     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 axiom.ts is located in the directory:

      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 .

To start an Axiom session from within TeXmacs use the menu options
Insert/Session/Axiom

Troubleshooting

  1. If you do not see Axiom in the list of sessions then make sure that you have installed the latest versions of both Axiom for Windows and TeXmacs .
  2. There is an update to tm_axiom that corrects a problem that occurs if Axiom is installed in a non-default location. The previous version would silently fail to start Axiom if it is not located in c:\Program Files\axiom.

Examples

The following TeXmacs documents contain examples of how to use TeXmacs with Axiom:

axiom on Knoppix and graphical facility
Wed, 02 Feb 2005 03:42:21 -0600 reply
I had installed axiom (3.0 beta, Feb, 2005) on Knoppix Linux with TeXmacs and other plugin software. But the "draw()" seems not to work, for instance as insput the following within TeXmacs:

->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!

who are you? --Tim Daly, Wed, 02 Feb 2005 08:14:25 -0600 reply
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 AXIOMsys (the actual axiom interpreter) rather than the axiom shell script. The axiom shell script starts the sman (superman) process which starts AXIOMsys, the hyperdoc browser, and the graphics connection. If you call AXIOMsys directly then graphics will not work.

Please open a command terminal, set your AXIOM variable and PATH variable, and type axiom. Then retry the draw command. Please let me know if this succeeds or fails and send a message to the axiom-developer@nongnu.org mailing list.

Tim Daly

Graphics still--John Sheppard
Sat, 19 Feb 2005 15:07:52 -0600 replyI too have problems displaying graphics. I finally managed to get the Windows version of axiom to work with the windows (non-cygwin) version of TeXmacs (i.e., WinTeXmacs?). I tried the draw command from the axiom tutorial, both in axiom and from WinTeXmacs?. Here's the sequence:

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

Graphics still--John Sheppard --Tim Daly, Sat, 19 Feb 2005 15:47:18 -0600 reply
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.

Graphics still--John Sheppard
Sat, 19 Feb 2005 15:59:29 -0600 replyWell, that certainly explains it. Many thanks!!

Texmacs problem --unknown, Wed, 20 Apr 2005 12:37:26 -0500 reply
The fc3 binary version of axiom seems to work fine from the terminal. But when I try to use it from texmacs something like this happens:

--> 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 AXIOMsys 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 AXIOMsys 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
AXIOMsys does direct reads from its terminal.

axiom is a script that launches sman (superman). sman starts hyperdoc, AXIOMsys, 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 axiom to use axiom -noclef and see if the behavior changes.

Tim

HyperDoc dows not work with numpad turned on --unknown, Mon, 10 Oct 2005 14:02:32 -0500 reply
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 AXIOMsys 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

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

Axiom hyperdoc is not required to get nicely formatted output in TeXmacs. AXIOMsys generates Tex/LaTeX output that is processed by TeXmacs.

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

Axiom hyperdoc is not required to get nicely formatted output in >TeXmacs. AXIOMsys generates Tex/LaTeX output that is processed by >TeXmacs.

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 interactive axiom and not programming with it.

TeXmacs interface improvements --Bill Page, Tue, 11 Oct 2005 22:26:46 -0500 reply
Yes, I agree that TeXmacs has great potential as an graphical user interface for Axiom (and many other computer algebra packages as well). In principle it should be possible to implement almost all of the hyperdoc functionality directly in TeXmacs as well as support for incorporating Axiom graphics into TeXmacs documents and even compiling SPAD and Aldor library programs.

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 AXIOMsys, it should start axiom -noclef

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

"axiom tutorial" doesn't display properly on FC4 --tyler, Thu, 30 Nov 2006 08:05:35 -0600 reply
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);
          }
        }

tutorial.tgz




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: