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.


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


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

New contributor
Matthias is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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