On 3/4/08, Alfredo Portes wrote:
>
>  Where can I get tm_axiom? so I can test it with OpenAxiom.
>

Look at:

  http://axiom-wiki.newsynthesis.org/TeXmacs

The tm_axiom download link is:

  http://axiom-wiki.newsynthesis.org/public/tm_axiom.zip

You can also download WinTeXmacs here from:

  http://axiom-wiki.newsynthesis.org/public/wintexmacs-1.0.5.exe

After you unzip tm_axiom.zip into your  'c:\msys\1.0\home' directory,
apply the following patch to 'tm_axiom.c':

$ diff -Naur --exclude='*.exe' --exclude='*.o' tm_axiom tm_open-axiom
diff -Naur --exclude=*.exe --exclude=*.o tm_axiom/tm_axiom.c
tm_open-axiom/tm_axiom.c
--- tm_axiom/tm_axiom.c Tue Dec 21 03:51:30 2004
+++ tm_open-axiom/tm_axiom.c    Tue Mar  4 18:46:48 2008
@@ -37,7 +37,7 @@
  * Modified by Bill Page 20041215
  * - add call to Robert Sutor line-break routine
  * Modified by Bill Page 20041217
- * - initialize AXIOM_exe from AXIOM environment variable
+ * - initialize AXIOM_cmd from AXIOM environment variable
  * Modified by Bill Page 20041220
  * - use args, TM_AXIOM environment variable and/or
  *     )set output texmacs option,option, ...
@@ -51,6 +51,9 @@
  * - process Axiom output with no LaTeX content, e.g.
  *     )set output tex off
  *     )set output algebra on
+ * Modified by Bill Page 20080304
+ * - revised AXIOM_cmd for open-axiom
+ * - use OPENAXIOM environment variable
  *                                                                */

 #include <windows.h>
@@ -84,7 +87,6 @@
 #define   READ_HANDLE 0
 #define   WRITE_HANDLE 1

-char AXIOM_exe[256];
 char AXIOM_cmd[256];
 char ENV_AXIOM[256];

@@ -101,14 +103,13 @@
   int i;
   float w;

-/* e.g. AXIOM=c:/Program Files/axiom/mnt/windows                        */
-  if (pAXIOM=getenv("AXIOM")) {
-    strcpy(AXIOM_exe,pAXIOM); strcat(AXIOM_exe,"/bin/AXIOMsys.exe");
-    strcpy(AXIOM_cmd,pAXIOM); strcat(AXIOM_cmd, "/bin/AXIOMsys.exe");
-    strcpy(ENV_AXIOM,"AXIOM="); strcat(ENV_AXIOM, pAXIOM);
+  if (pAXIOM=getenv("OPENAXIOM")) {
+    strcpy(AXIOM_cmd,pAXIOM); strcat(AXIOM_cmd,
"/../../../../bin/open-axiom.exe");
+    strcat(AXIOM_cmd," --system=\""); strcat(AXIOM_cmd,pAXIOM);
strcat(AXIOM_cmd,"\"");
+    strcpy(ENV_AXIOM,"OPENAXIOM="); strcat(ENV_AXIOM, pAXIOM);
   } else {                               /* We need the AXIOM variable! */
-    printf("You must set the AXIOM environment variable, e.g.\n");
-    printf("  AXIOM=c:/Program Files/axiom/mnt/windows\n");
+    printf("You must set the OPENAXIOM environment variable, e.g.\n");
+    printf("  OPENAXIOM=C:/Program
Files/OpenAxiom/lib/open-axiom/i686-pc-mingw32/1.1.0\n");
     exit(1);
   };

(See also attached patch file.)

Re-compile:

  gcc tm_axiom.c texbreaker.c -o tm_open-axiom

Copy the executable file 'tm_open-axiom.exe' to the 'c:\Program
Files\OpenAxiom\bin' directory.

Then modify the TeXmacs 'init-axiom.scm' file in:

C:\Program Files\WinTeXmacs\TeXmacs\plugins\axiom\progs

as follows:

[EMAIL PROTECTED] /c/My Program Files/WinTeXmacs/TeXmacs/plugins/axiom/progs
$ diff -au 'Copy of init-axiom.scm' init-axiom.scm
--- Copy of init-axiom.scm      Wed Apr 27 06:46:28 2005
+++ init-axiom.scm      Tue Mar  4 18:56:15 2008
@@ -17,7 +17,7 @@
   (lazy-input-converter (axiom-input) axiom))

 (plugin-configure axiom
-  (:require (url-exists-in-path? "AXIOMsys"))
+  (:require (url-exists-in-path? "open-axiom"))
   (:initialize (axiom-initialize))
   (:launch "tm_open-axiom")
   (:session "OpenAxiom"))

---------

so that it looks for "open-axiom" in the PATH insteadn of "AXIOMsys"
and starts "tm_open-axiom" as the interface program.

When WinTeXmacs starts up you should see 'OpenAxiom' listed under Insert/Session

These changes seem to work fine for me. If it also works for me, then
I think we should include this new 'tm_open-axiom.exe' in the
OpenAxiom for Windows installer program.

Regards,
Bill Page.

Attachment: tm_open-axiom.patch
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to