Alfredo, 

On Monday, October 02, 2006 11:50 PM I wrote:
> 
> > 
> > > Also, did you get my email for last week reguarding a
> > > problem with Maxima output on the version of DoyenCD at
> > > http://doyen.sytes.net ?
> > 
> > I do not know what to do about this...should I use another 
> > version of Maxima or should I try to fix the regex that
> > controls this?
> > 
> 
> I took a look at this. I think it is due to a difference between
> the Clisp and GCL versions of lisp used to compile Maxima. (Clisp
> used on DoyenCD but GCL used on MathAction). In particular the
> removal of the $ is supposed to take place in the special Lisp
> code called 'mathaction-maxima-5.9.3.lisp' that is added to
> Maxima when it is called in 'maximaWrapper.py'. This is a modified
> version of the same Lisp code that is used to interface with
> TeXmacs. But this code does not seem correct for the character
> sequence generated by the Clisp version of Maxima. I can correct
> this but I also have to change the regex in ReplaceInlineMaxima
> so that it correctly indentifies input and output sections.
> 
> I will send you the modifications later tonight.
> 

Here are the patches:

[EMAIL PROTECTED] LatexWiki]# cd ~
[EMAIL PROTECTED] ~]# cd /var/lib/zope/Products/LatexWiki

The first one is a correction to the Maxima Lisp interface code.
Under GCL these extra \ $ characters are not generated so this
code was none functional. But it is required to correct the weird
behaviour of Maxima under Clisp.

[EMAIL PROTECTED] LatexWiki]# diff -au mathaction-maxima-5.9.3.lisp_orig
mathaction-maxima-5.9.3.lisp
--- mathaction-maxima-5.9.3.lisp_orig   2006-10-03 02:21:18.134961500
-0400
+++ mathaction-maxima-5.9.3.lisp        2006-10-03 02:03:24.087837750
-0400
@@ -36,7 +36,7 @@
 (defun tex-stripdollar (sym)
   (or (symbolp sym) (return-from tex-stripdollar sym))
   (let* ((name (quote-% (print-invert-case sym)))
-      (name1 (if (memq (elt name 0) '(#\$ #\&)) (subseq name 1) name))
+      (name1 (if (memq (elt name 0) '(#\\ #\$)) (subseq name 2) name))
       (l (length name1)))
     (if (eql l 1) name1 (concatenate 'string "\\mathrm{" name1 "}"))))

The second one is required because of the first patch since the extra
\ $ is now eliminated. (That makes ReplaceInlineMaxima.py identical to
the version on MathAction.)

[EMAIL PROTECTED] LatexWiki]# diff -au ReplaceInlineMaxima.py
ReplaceInlineMaxima.py_orig
--- ReplaceInlineMaxima.py_orig      2006-10-03 02:19:27.952075500 -0400
+++ ReplaceInlineMaxima.py           2006-10-03 02:05:50.012957500 -0400
@@ -21,8 +21,8 @@
         reConsts)
     maximaOutPattern = re.compile(
         #r'<latex>.*?black\}(.*?)</latex>'              #1 LaTeX
-        r'<latex>\\mbox{\\tt\\red\(\\\$\\mathrm{\\%(i\d+)}\)
\\black}(.*?)</latex>|'   #1 #2 Input
-        r'<latex>\\mbox{\\tt\\red\(\\\$\\mathrm{\\%(o\d+)}\)
\\black}(.*?)</latex>|'   #3 #4 Output
+        r'<latex>\\mbox{\\tt\\red\(\\mathrm{\\%(i\d+)}\)
\\black}(.*?)</latex>|'   #1 #2 Input
+        r'<latex>\\mbox{\\tt\\red\(\\mathrm{\\%(o\d+)}\)
\\black}(.*?)</latex>|'   #3 #4 Output
         r'stdin:((?:.(?!<latex>))*.)',  #5 Other stuff
         reConsts)

[EMAIL PROTECTED] LatexWiki]#

Let me know if you have any trouble with these changes.

Regards,
Bill Page.


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to