|
From: Eduardo O. <edu...@gm...> - 2021-12-22 01:03:16
|
People,
what are your favourite ways to convert a part of a log of a Maxima
session to LaTeX? Let me explain what I did and what I need...
I am on Debian and besides having Maxima installed from the Debian
packages I also have a clone of the git repository of Maxima in the
directory ~/bigsrc/maxima/. I was able to compile EMaximaIntro.tex
with:
rm -Rv /tmp/emaxima/
mkdir /tmp/emaxima/
cd /tmp/emaxima/
cp -v ~/bigsrc/maxima/doc/emaxima/EMaximaIntro.tex .
cp -v ~/bigsrc/maxima/interfaces/emacs/emaxima/emaxima.sty .
pdflatex EMaximaIntro.tex
pdflatex EMaximaIntro.tex
I followed the instructions in the pages 3 and 10 of EMaximaIntro.pdf
and created a .tex file whose important parts were:
\usepackage{emaxima}
...
\begin{maximasession}
diff(sin(x),x);
integrate(cos(x),x);
\maximaoutput*
\i5. diff(sin(x),x); \\
\o5. \cos x \\
\i6. integrate(cos(x),x); \\
\o6. \sin x \\
\end{maximasession}
When I LaTeXed it I got exactly the kind of output that I was looking
for.
My question is: how do I generate a maximasession block like the one
above from inside a Maxima session? Can you recommend me a low-level
way to do that? I normally run Maxima inside Emacs using the low-level
way to send lines to its REPL described here -
http://angg.twu.net/LATEX/2021emacsconf.pdf <- slides
http://angg.twu.net/emacsconf2021.html
I do have Fermin MF's maxima.el installed,
https://gitlab.com/sasanidas/maxima
https://emacsconf.org/2020/talks/33/
but I don't understand it well yet, and when I tried to integrate it
with my way of doing things I stumbled on some quirks of its function
`maxima-string'... I tried to ask Fermin for help but he was too busy,
so I thought that it was better to wait until 1) he was in holidays,
2) I had done more of my homework... anyway, I _think_ that I can
handle answers like "use Fermin's functions maxima-foo and maxima-bar"
- and answers that yield a command like
savemaximasession(42, 99, "/tmp/foo");
that I can run in a Maxima REPL to save the cells 42 to 99 to /tmp/foo
as a maximasession block would be ideal...
Thanks in advance!!!
Eduardo Ochs
http://angg.twu.net/#eev
http://angg.twu.net/math-b.html
|