Skip to Content.
Sympa Menu

texmacs-users - Re: Tr. : Re : Re : [TeXmacs] Maxima and Texmacs

Subject: mailing-list for TeXmacs Users

List archive

Re: Tr. : Re : Re : [TeXmacs] Maxima and Texmacs


Chronological Thread 
  • From: "Andrey G. Grozin" <address@hidden>
  • To: JC Bustamante <address@hidden>
  • Cc: address@hidden
  • Subject: Re: Tr. : Re : Re : [TeXmacs] Maxima and Texmacs
  • Date: Tue, 26 Aug 2008 15:29:17 +0700 (NOVST)

On Fri, 22 Aug 2008, JC Bustamante wrote:
So I compiled maxima 5.16.2, and it seems to work, although I haven't worked
much with
it.
I compiled texmacs 1.0.6.15, and it seems to work.
I've edited my maxima_detect and tm_maxima files (I join them as attachments)
but I
still have the error message:

  -e ed Unsupported version of maxima: 5.16.2
The best solution is to use the two attached files which don't need changes after each new version of maxima.

May be the problems come from:

~$ /root/TeXmacs-1.0.6.15-src/plugins/maxima/bin/maxima_detect
[: 39: cygwin: unexpected operator
[: 97: cygwin: unexpected operator
("5.16.2 clisp")
This is really very strange. What OS do you use? What is your /bin/sh ? Line 39 is

if [ $OSTYPE = "cygwin" ] ; then EXT='.bat'; else EXT=''; fi

If you say

/bin/sh

(to be *exactly* in the shell used by this script), and then type this line, what exactly happens? Is there any error message? Line 97 in your file is

fi

I cannot understand how it can produce an error message about cygwin.

Andrey#!/bin/sh
# if there is an argument, find maxima_toc.html

find_old_help()
{
if grep -F 'MAXIMA_DIRECTORY=' $MAXIMA >/dev/null
then
MAXIMA_DIRECTORY=`grep -F 'MAXIMA_DIRECTORY=' $MAXIMA | sed -e
's/MAXIMA_DIRECTORY=//'`
if [ -f "$MAXIMA_DIRECTORY/doc/html/maxima_toc.html" ]
then echo "\"$MAXIMA_DIRECTORY/doc/html/maxima_toc.html\""
elif [ -f "$MAXIMA_DIRECTORY/info/maxima_toc.html" ]
then echo "\"$MAXIMA_DIRECTORY/info/maxima_toc.html\""
else echo '#f'
fi
else
# resorting to locate
MAXIMA_HELP=`locate maxima_toc.html`
if [ $? -eq 0 ]
then
MAXIMA_HELP2=`echo "$MAXIMA_HELP" | grep -F /doc/html/maxima_toc.html`
if [ $? -eq 0 ]
then MAXIMA_HELP="$MAXIMA_HELP2"
else
MAXIMA_HELP2=`echo "$MAXIMA_HELP" | grep -F /info/maxima_toc.html`
if [ $? -eq 0 ]
then MAXIMA_HELP="$MAXIMA_HELP2"
fi
fi
MAXIMA_HELP2=`echo "$MAXIMA_HELP" | grep '^/usr'`
if [ $? -eq 0 ]
then MAXIMA_HELP="$MAXIMA_HELP2"
fi
echo "$MAXIMA_HELP" | sed -e 's/^/"/' -e 's/$/"/' -e '1s/^/(/' -e
'$s/$/)/'
else echo '#f'
fi
fi
}

# maximum version
V1=0; V2=0; V3=0

max_ver() {
while [ -n "$1" ]; do
if [ $1 -gt $V1 ]
then V1=$1; V2=$2; V3=$3
elif [ $1 -eq $V1 ]
then
if [ $2 -gt $V2 ]
then V2=$2; V3=$3
elif [ $2 -eq $V2 ]
then
if [ $3 -gt $V3 ]
then V3=$3
fi
fi
fi
shift; shift; shift
done
}

if [ $OSTYPE = "cygwin" ] ; then EXT='.bat'; else EXT=''; fi
MAXIMA=`which maxima$EXT 2>/dev/null`
if [ $? -eq 0 ]
then
if [ $OSTYPE = "cygwin" ]
then
if [ "$1" ]
then
maxima -d | grep -F 'maxima-htmldir=' | \
sed -e 's/maxima-htmldir=/"/' -e 's|$|/maxima_toc.html"|' | \
cygpath -f -
else
echo '("cygwin")'
fi
else
if grep -F list-avail $MAXIMA >/dev/null
then
# 5.9.0 or later
if [ "$1" ]
then
max_ver `maxima --list-avail | \
grep '^version [A-Za-z0-9\.]\+, lisp [A_Za-z0-9]\+$' |\
sed -e 's/^version \([0-9]\+\)\.\([0-9]\+\)\.\([0-9]\+\).*$/\1 \2
\3/'`

GOOD=no
if [ $V1 -gt 5 ]
then GOOD=yes
elif [ $V1 -eq 5 ]
then
if [ $V2 -gt 9 ]
then GOOD=yes
elif [ $V2 -eq 9 ]
then
if [ $V3 -gt 0 ]
then GOOD=yes
fi
fi
fi

if [ $GOOD = yes ]
then
# 5.9.1 or later
maxima -d | grep -F 'maxima-htmldir=' |\
sed -e 's/maxima-htmldir=/"/' -e 's|$|/maxima_toc.html"|'
else
# 5.9.0
find_old_help
fi
else
echo '('
maxima --list-avail |\
grep '^version [a-z0-9\.]\+, lisp [a-zA-Z0-9]\+$' |\
sed -e 's/^version \([a-z0-9\.]\+\), lisp \([a-zA_Z0-9]\+\)$/"\1
\2"/'
echo ')'
fi
else
# 5.6
if [ "$1" ]
then
find_old_help
else
if grep -F clisp $MAXIMA >/dev/null
then echo '("5.6 clisp")'
else echo '("5.6 gcl")'
fi
fi
fi
fi
else
# maxima not found
echo '#f'
fi
#!/bin/sh

TEXMACS_MAXIMA_PATH="$TEXMACS_PATH/plugins/maxima/lisp"
export TEXMACS_MAXIMA_PATH

case $1 in
cygwin) exec maxima.bat -p "`echo
$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.11.0.lisp|cygpath --windows -f -`";;
5.6)
case $2 in
gcl) exec maxima -load "$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.6.lisp" \
| maxima_filter;;
clisp) exec maxima -i "$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.6.lisp" \
| maxima_filter;;
esac;;
5.9.0) exec maxima -u $1 -l $2 -p
"$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.9.0.lisp" | maxima_filter;;
5.9.1*) exec maxima -u $1 -l $2 -p
"$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.9.1.lisp";;
5.9.2* | 5.9.3*) exec maxima -u $1 -l $2 -p
"$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.9.2.lisp";;
5.10.*) exec maxima -u $1 -l $2 -p
"$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.10.0.lisp";;
*) exec maxima -u $1 -l $2 -p
"$TEXMACS_MAXIMA_PATH/texmacs-maxima-5.11.0.lisp";;
esac



Archive powered by MHonArc 2.6.19.

Top of Page