0

I want to setup the imaxima buffer with working LaTeX output. Following the EmacsWiki, I added this to my init:

(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
(autoload 'maxima-mode "maxima" "Maxima mode" t)
(autoload 'imaxima "imaxima" "Frontend for maxima with Image support" t)
(autoload 'maxima "maxima" "Maxima interaction" t)
(autoload 'imath-mode "imath" "Imath mode for math formula input" t)
(setq imaxima-use-maxima-mode-flag t)
(add-to-list 'auto-mode-alist '("\\.ma[cx]" . maxima-mode))

I have maxima installed on my machine (Void Linux) and it runs fine in a shell. There are indeed .el files in /usr/share/emacs/site-lisp/: imaxima.el, maxima.el, imath.el and others.

In Emacs, I launch M-x imaxima and land in a maxima buffer. There are two problems:

  1. Everything crashes if I hit Return with no ; character at the end of the line. Emacs becomes totally unresponsive and I have to kill it.
  2. When I put the ; character, there is an error message :
(%i1) 1 + 1;

LaTeX error in: 2

I have a texlive installation on my machine but perhaps imaxima runs the wrong command?

Has someone encountered these problems and has an example of a working configuration?

Edit 1:

If I run emacs with emacs 2> emacs-stderr.log, I find that nothing gets written to stderr at all.

2
  • FWIW this (new and buggy) behaviour also happens in a Window 10 64 bit machine with GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-21, with imaxima-setup.el file from Maxima 5.44.0 for windows. Also, the introduction of amsmath package in imaxima-latex-preamble has no effect. In this particular installation LaTeX distro is MikTeX 2.9.
    – csrabak
    Commented Mar 26, 2021 at 0:48
  • Same here with a Linux Debian 10 machine. The introduction of amsmath in imaxima-latex-preamble did not help.
    – F. Tusell
    Commented Dec 21, 2021 at 17:02

2 Answers 2

0

This is possibly due to a known problem with package loading in texlive2020. Until this is fixed, a workaround would be to put:

\usepackage{amsmath} 

in the emacs variable imaxima-latex-preamble to make sure this is loaded first.

0

I had the same problem which was solved following instructions in: https://sourceforge.net/p/maxima/bugs/3687/ The solution is replacing files as root: imaxima.el, imath.el and adding file mylatex.ltx.el in directory: /usr/share/emacs/site-lisp/maxima. You can download the files in the given link. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.