TeXmacs-Maxima interface



Hello *,

I've found the problem with %i, %o, %t labels immediately after I sent my 
previous mail. In order to fix it, I had to:

1. Change 1 line in mactex.lisp:

(defun tex-mlable (x l r)
    (tex (caddr x)
      (append l
        (if (cadr x)
-         (list (format nil "\\mbox{\\tt\\red(~A) \\black}" (stripdollar (cadr x))))
+         (list (format nil "\\mbox{\\tt\\red(~A) \\black}" (tex-stripdollar (cadr x))))
          nil))
      r 'mparen 'mparen))

This is a non-controversial patch. It would be much better to incorporate 
it into the mainline Maxima.

2. Unfortunately, I had to return to redefining main-prompt (from 
macsys.lisp) in texmacs-maxima-5.9.1.lisp:

(defun main-prompt ()
  (format () "~A(~A~D) ~A" *prompt-prefix* 
    (tex-stripdollar $inchar) $linenum *prompt-suffix*))

Here again I replaced stripdollar by tex-stripdollar. The flexibility 
provided by *prompt-prefix* and *prompt-suffix* is not enough to prepend \ 
before % inside the prompt.

On Thu, 3 Jun 2004, Vadim V. Zhytnikov wrote:
> And finally, could you take a look at the TeXmacs bug #6860 which
> I filled quite a while ago?  The point is that TeXmacs marks first
> item provided by maxima --list-avail as default which is entirely wrong.
> I suggest list all items explicitly and maybe add "default" menu item
> for plain maxima command without lisp selector -l flag. This will be
> truly default lisp as Maxima thinks about it.  The only problem
> might be with such "default" menu item that it is not clear
> which texmacs-maxima-<version>.lisp to use with it.  Maybe this
> item may be dropped altogether.  I've attached the patch for
> tm_maxima and init-maxima.scm I use for ALT Linux TeXmacs build.
> Although it is not clean patch I could promote for inclusion
> in TeXmacs (it works fine only for ALT distro where I have just
> one maxima version) but it illustrates my idea.
Yes, I agree with you. Unfortunately, there is no way to omit the 
"default" entry in the Maxima sub-menu (or any other plugin sub-menu), due 
to its implementation. Could you please send your ALT Linux patches to me? 
I use gentoo, and it would be a bit awkward (though possible) to extract 
them from your srpm.

On Wed, 2 Jun 2004, Valery Pipin wrote:
> I met one problem with it.
> The tensor demo "ten_alg.dem", which runs well on console, breaks within 
> texmacs with lisp error at (%i91). Note to display the tensors with dummy 
> indices inside texmacs  you shoud change the difinition of dummyx from '% to 
> some literal notation, say dummyx:n.
Unfortunately, I am not familiar with Maxima tensor packages. After a 
quick glance, I think that somebody (who understands things) should 
rewrite the function show (or more likely ishow) in itensor.lisp in a 
texmacs-friendly manner: if *alt-display2d* is set to 'texmacs, it should 
generate proper LaTeX for displaying tensors, and use tex-stripdollar to 
prepend \ before % in dummy indices. I think this is not difficult for 
somebody familiar with itensor.

What about lisp error while running ten_alg.dem, I have no clue. What 
error, exactly? Have you tried to locate the lisp function in which it 
happens?

Andrey Grozin