Dear Nijso and list,
<N.A.Beishuizen at ctw.utwente.nl> writes:
> [..]
>
> (%i1) 2;
>
> I get the error message:
>
> Latex error in 2
just so that you know you are not alone: I've got exactly the
same problem, which essentially stopped me from using imaxima. I
even tracked down the bug a bit further (see comments below), but
I had to stop at some point since I do not know enough about
latex search paths. Maybe we can track down the bug together (I
can help with the elisp side):
> It turns out that the generated latex code is not complete. The generated
> latex code is:
>
> [... snipped ..]
>
> but it does not recognize pagecolor or dmath. What is missing (at least)
> is
> \usepackage{breqn}
> \usepackage{color}
These packages are used in format.tex in the same temporary
directory, which reads:
,----[ format.tex ]
| \documentclass[11pt,leqno]{article}
| \usepackage{color}
| \usepackage{exscale}
| \usepackage[cmbase]{flexisym}
| \usepackage{breqn}
| \setkeys{breqn}{compact}
| \setlength{\textheight}{200cm}
| \makeatletter
| \newcommand{\boxed}[1]{\fbox{\m at th$\displaystyle#1$}}
| \newcommand{\operatorname}[1]{%
| \mathop{\relax\kern\z@\operator at font{#1}}}
| \makeatother
| \newcommand{\ifrac}[2]{\frac{#1}{#2}}
| \newcommand{\ifracd}[2]{\frac{#1}{#2}}
| \newcommand{\ifracn}[2]{\frac{#1}{#2}}
| \newcommand{\isubscript}[2]{{#1}_{#2}}
| \newcommand{\iexpt}[2]{{#1}^{#2}}
| \newcommand{\isqrt}[1]{\sqrt{#1}}
|
| \nofiles
| \begin{document}
| \end{document}
`----
In the function `imaxima-dump-tex', together with mylatex.ltx,
this file is supposed to be transformed into a format file using
the command line:
latex -ini &latex mylatex.ltx \input{format.tex}
This is where things go wrong: Latex does not find the format
file, even though it is in the same directory. From mylatex.log:
,----[ mylatex.log ]
| This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6)\[continued]
| (format=latex 2007.10.15) 24 OCT 2008 16:34
| entering extended mode
| **&latex mylatex.ltx \input{format.tex}
| (./mylatex.ltx
| LaTeX2e <2005/12/01>
| Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang,
| [ ... snipped for brevity]
| ainian, loaded.
| )
| ! I can't find file `'.
| <to be read again>
| \let
| <*> &latex mylatex.ltx \input
| {format.tex}
| Please type another input file name:
| ! Emergency stop.
| <to be read again>
| \let
| <*> &latex mylatex.ltx \input
| {format.tex}
| End of file on the terminal!
|
|
| Here is how much of TeX's memory you used:
| 13 strings out of 94087
| 239 string characters out of 1167528
| 48781 words of memory out of 3500000
| 3395 multiletter control sequences out of 10000+50000
| 3640 words of font info for 14 fonts, out of 1200000 for 2000
| 645 hyphenation exceptions out of 8191
| 5i,0n,3p,114b,12s stack positions out of 5000i,500n,6000p,200000b,5000s
| No pages of output.
`----
When I manually execute the relevant command line, (la)tex
doesn't find format.tex either at first, but finds it after I
manually type in the file name again:
,----
| finken at larissa:/tmp/imaxima295730vD (0)$ latex -ini \&latex mylatex.ltx
| '\input{format.tex}'
| This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6) (INITEX)
| entering extended mode
| (./mylatex.ltx
| LaTeX2e <2005/12/01>
| Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang,
| [ ... snipped for brevity]
| ainian, loaded.
| )
| ! I can't find file `'.
| <to be read again>
| \let
| <*> &latex mylatex.ltx \input
| {format.tex}
| Please type another input file name: format.tex
| (./format.tex (/usr/share/texmf/tex/latex/base/article.cls
| Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
| (/usr/share/texmf/tex/latex/base/leqno.clo)
| (/usr/share/texmf/tex/latex/base/size11.clo))
| (/usr/share/texmf/tex/latex/graphics/color.sty
| (/usr/share/texmf/tex/latex/config/color.cfg)
| (/usr/share/texmf/tex/latex/graphics/dvips.def)
| (/usr/share/texmf/tex/latex/graphics/dvipsnam.def))
| (/usr/share/texmf/tex/latex/base/exscale.sty)
| (/home/finken/texmf/tex/latex/breqn097a/flexisym.sty
| (/home/finken/texmf/tex/latex/breqn097a/cmbase.sym)
| (/home/finken/texmf/tex/latex/breqn097a/mathstyle.sty))
| (/home/finken/texmf/tex/latex/breqn097a/breqn.sty
| (/usr/share/texmf/tex/latex/graphics/keyval.sty)
| (/usr/share/texmf/tex/latex/tools/calc.sty))
| No auxiliary output files.
|
| )
| Beginning to dump on file mylatex.fmt
| (format=mylatex 2008.10.24)
| [...]
`----
After that, mylatex.fmt is generated and subsequent texing of
1.tex etc (and thus imaxima) work fine.
The trouble is: I don't know TeX well enough do fix the problem.
Apparently, TeX doesn't look in the current directory for
format.tex (but does on interactive use?). Could this have
anything to to with a wrong environment variable? I only know
about TEXINPUTS, which reads (maybe I simply need to add a "."?):
,----
| finken at larissa:/tmp/imaxima295730vD (0)$ echo $TEXINPUTS
| /home/finken/texmf::/home/finken/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
`----
Does that help you already? Do you need any other details of my
tex configuration?
Hope that helps,
Reimar
--
Dr. Reimar Finken (finken at theo2.physik.uni-stuttgart.de)
II. Institut f?r Theoretische Physik, Universit?t Stuttgart
Pfaffenwaldring 57 Tel: 0711-68564924
70550 Stuttgart, Germany Fax: 0711-68564902