The variable imaxima-mylatex is defined in mylatex.ltx.el as follows:
\\def\\document{\\endgroup
This will cause imaxima mode to be failed to build mylatex.fmt because "Extra engroup".
The old version distributed by debian has the same issue. To fix the issue, comment the "\endgroup" as follows :
\\def\\document{%\\endgroup
Dao, would you attach the complete contents of the imaxima working directory (it should be located in a directory named /tmp/imaximaXXXXXX, where XXXXXX will be filled in by random characters).
Please see this thread for more information/background.
All temp files for building mylatex are attached
File mylatex.ltx:
Error msgs in mylatex.log:
Dao, I looked at
mylatex.logmore carefully. On line 8, yours hasHowever, on my debian testing system, I see
I believe that the
beginhook is the change to texlive that brokemylatex.ltxand that David Carlisle fixed. See commit 7cc8be3f6.I believe the most likely cause of this difference is that you have cached format file that texlive is loading (I experienced this myself). It is likely underneath
~/.texliveXXXXwhere XXXX=2020 or something like that.Could you check this, please?
Leo, sorry reply late.
I tried to delete ~/.texlive2020, then killed maxima process and closed imaxima buffer, but this not work.
I fixed the issue by following patch:
```bash
user@local:~$ diff -Naur /usr/share/emacs/site-lisp/maxima/{imaxima.el.orig,imaxima.el}
--- /usr/share/emacs/site-lisp/maxima/imaxima.el.orig 2021-06-02 08:07:20.873728250 +0800
+++ /usr/share/emacs/site-lisp/maxima/imaxima.el 2021-06-02 08:08:35.837726062 +0800
@@ -471,7 +471,7 @@
(defconst imaxima-mylatex
"\makeatletter\let\MYLATEXdocument\document
-\let\MYLATEXopenout\openout\def\document{\endgroup
+\let\MYLATEXopenout\openout\def\document{%\endgroup
{\setbox\z@\hbox{\normalfont% normal
{\ifx\large\@undefined\else\large\fi
\ifx\footnotesize\@undefined\else\footnotesize\fi}%
```
Ok, Sourceforge lost my last comment that I intended to post before closing the report.
I see now that you are using the debian-packaged
imaxima.el. Unfortunately, debian'smaxima-*packages are out of date (5.44.0 vs. the current 5.45.1 release) and one of the bugs fixed in the 5.45.0 release was this one.See the comments here, especially the last one where I explain which files need to be downloaded/patched.
For reference, this bug is also reported at:
Ubuntu
Debian
Debian (?)