mailing-list for TeXmacs Users

Text archives Help


A (large) TeXmacs demo and how to use CAS in winTeXmacs


Chronological Thread 
  • From: "chu-ching huang" <address@hidden>
  • To: address@hidden
  • Subject: A (large) TeXmacs demo and how to use CAS in winTeXmacs
  • Date: Fri, 13 Oct 2006 17:43:56 +0800

Hi all,

I has used TeXmacs for a long time and use it to make many notes about math
and CAS. Now most of the notes are collected together as a file.

The content includes a mini math lecture about calculus (for management
students) and a appendix for the CAS demo for introducing Axiom, Maxima and
octave etc.

Both the files, in tm (about 10mb) and pdf (about 2mb) formats, are put on the
following:

http://math1.cgu.edu.tw:2006/class/management/951/calculus.tm
/calculus.pdf
Please feel free to download.

By the way, I also try to install winTexmacs and use CAS plugins directly. The

rem Uncomment line below and set required value to MAXIMA_LANG_SUBDIR
rem to get localized describe in command line Maxima
rem set MAXIMA_LANG_SUBDIR="es"

set lisp=gcl
set version=5.9.3
set prefix=c:/maxima
set maxima_prefix=C:\ROGRA~1\maxima
set package=maxima
set verbose=false
set path=%maxima_prefix%\bin;%path%

if "%USERPROFILE%" == "" goto win9x
if "%MAXIMA_USERDIR%" == "" set MAXIMA_USERDIR=%USERPROFILE%\maxima
if "%MAXIMA_TEMPDIR%" == "" set MAXIMA_TEMPDIR=%USERPROFILE%
goto startparseargs
:win9x
if "%MAXIMA_USERDIR%" == "" set MAXIMA_USERDIR=%maxima_prefix%\user
if "%MAXIMA_TEMPDIR%" == "" set MAXIMA_TEMPDIR=%maxima_prefix%

:startparseargs
if "%1" == "-l" goto foundlisp
if "%1" == "--lisp" goto foundlisp
if "%1" == "-u" goto foundversion
if "%1" == "--use-version" goto foundversion
if "%1" == "-v" goto foundverbose
if "%1" == "--verbose" goto foundverbose

:continueparseargs
shift
if not "%1" == "" goto startparseargs
goto endparseargs

:foundlisp
set lisp=%2
shift
goto continueparseargs

:foundversion
set version=%2
shift
goto continueparseargs

:foundverbose
set verbose=true
goto continueparseargs

:endparseargs

if "%MAXIMA_LAYOUT_AUTOTOOLS%" == "" goto defaultlayout
set layout_autotools=true
goto endlayout

:defaultlayout
set layout_autotools=true

:endlayout

if "%MAXIMA_PREFIX%" == "" goto defaultvars
if "%layout_autotools%" == "true" goto maxim_autotools
set maxima_imagesdir=%MAXIMA_PREFIX%\src
goto endsetupvars

:maxim_autotools
set maxima_imagesdir=%MAXIMA_PREFIX%\lib\%package%\%version%
goto endsetupvars

:defaultvars
if "%layout_autotools%" == "true" goto defmaxim_autotools
set maxima_imagesdir=%prefix%\src
goto endsetupvars

:defmaxim_autotools
set maxima_imagesdir=%prefix%\lib\%package%\%version%
goto endsetupvars

:endsetupvars

set maxima_image_base=%maxima_imagesdir%\binary-%lisp%\maxima

if "%verbose%" == "true" @echo on
if "%lisp%" == "gcl" goto dogcl
if "%lisp%" == "clisp" goto doclisp

@echo "maxima error: lisp %lisp% not known."
goto end

:dogcl
%maxima_imagesdir%\binary-gcl\maxima.exe -eval "(cl-user::run)" -f --
"%arg1%" "%arg2%" "%arg3%" "%arg4%" "%arg5%" "%arg6%" "%arg7%" "%arg8%"
"%arg9%"
goto end

:doclisp
if "%layout_autotools%" == "true" goto clisp_autotools
clisp -q -M %maxima_image_base%.mem "" -- "%arg1%" "%arg2%" "%arg3%"
"%arg4%" "%arg5%" "%arg6%" "%arg7%" "%arg8%" "%arg9%"
goto end

:clisp_autotools
%maxima_imagesdir%\binary-clisp\lisp.exe -q -M %maxima_image_base%.mem
"" -- "%arg1%" "%arg2%" "%arg3%" "%arg4%" "%arg5%" "%arg6%" "%arg7%" "%arg8%"
"%arg9%"
goto end

:end

c) Modification for octave
i) modify "init-octave.scm" in "C:\Program
Files\wintexmacs\plugins\maxima\progs"
...
(plugin-configure octave
(:require (url-exists-in-path? "tm-start-octave.bat"))
(:initialize (octave-initialize))
(:launch "tm-start-octave.bat")
(:session "Octave"))

ii) add new file "tm-start-octave.bat"in "C:\Program Files\octave\bin"
@echo off
C:\PROGRA~1\octave\bin\bash.exe -e /bin/octave.sh
bash.exe and related dll files can be copied from "Gnuplot for
windows".

iii) add new file "octave.sh"in "C:\Program Files\octave\bin"
#!/bin/sh
# This script is executed under sh.exe to start octave
export PATH="/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:
export HOME="/octave_files"
export PS_VIEWER=""
export EDITOR="nodepad.exe"
cd "$HOME"
octave.exe -i tm-start.oct
rm -f /tmp/*
create the new directory as "C:\Program Files\octave\octave_files" if
not exists.

d) add the plugins into the file, "pluginpaths.txt" in C:\Documents and
settings\"YOUR USER FOLDER"\.TeXmacs\plugins" as the follows:
C:\Program Files\maxima\bin
C:\Program Files\octave\bin

By the way, another CAS "Axiom" can be used well in winTeXmacs without any
modification.


Best regrads,

chu-ching huang



  • A (large) TeXmacs demo and how to use CAS in winTeXmacs, chu-ching huang, 10/13/2006

Archive powered by MHonArc 2.6.19.

Top of page