auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] [Maxima-discuss] Maxima within LaTeX


From: eDgar
Subject: Re: [AUCTeX] [Maxima-discuss] Maxima within LaTeX
Date: Tue, 08 Mar 2016 14:16:35 -0600
User-agent: Roundcube Webmail/0.8.5

Hi. This is a preliminary question. As some of you know, I'm interested in being able to work on my LaTeX documents with Maxima code as if they were part of the same thing. There are many players here:
(1) emacs:
  (1.a) AucTeX.
  (1.b) imaxima (may be it could be extended for LaTeX.
(2) LaTeX
(3) Maxima
(4) Although I use emacs, I don't know what I'm doing half of the time.

The question is: to whom should I ask? I don't want to bother people who need to focus on other things. If I ask to multiple parties, do I have to let everyone know about it (put every mailing list in the thread?). And finally, do you have the time for this or is it better to just stick to my yanking (copy-paste) activities? Thanks in advance.

On 2014-12-01 20:53, address@hidden wrote:
On 2014-12-01 22:43, Leo Butler wrote:
I need to think about this. I have a question: Are you thinking of a
document where you have blocks of maxima code, the code does some
computations, and then in subsequent blocks you have access to the
results of these computations?
Yes, without loosing the ability to be able to print LaTeX with the
block itself (as it is done already). I send some examples below.

E.g.
\begin{maxima*}
p : primes(1,10);
\maximaoutput
[2,3,5,7]
\end{maxima*}
I don't know if producing the output here is necessary, even if it is
not printed in the final version (dvi, ps or pdf). It could be useful
when reading the code, but it should be optional. There is an example
further down.

The list of the primes between 1 and 10 is
\[
\mvalue{p}
\]
?
(The maxima* environment produces no output; \mvalue is undefined but it
would produce tex(p)).
Yes, precisely. I think that it should be the first step. Then it would even
make something like this

An identity matrix is shown in \cref{eq:A}
\begin{equation}\label{eq:A}
  \begin{maxicode}
    A: ident(3)$  /* This prints nothing */
    'A = A;       /* This prints tex('A = A), A is a matrix */
  \end{maxicode}
\end{equation}

May be even, to show the same output \cref{eq:B} the code could be
condensed
\begin{maxieq}\label{eq:B}
  B: ident(3)$  /* This prints nothing */
  'B = B;       /* This prints tex('B = B), B is a matrix */
\end{maxieq}

In a similar way, the product of an identity matrix ($C$) with the
third prime ($p_{3}$) would be in \cref{eq:C}, \cref{eq:D2} or \cref{eq:E2}.
\begin{maxima*}
  p : primes(1,10); /* This line should send the TeX code already */
  \maximaoutput   % Optional (no need to C-c C-u C ; never printed
                  % Optional in dvi, ps or pdf, even without *, and
[2,3,5,7] % Optional just for visual confirmation while writing)
\end{maxima*}
In the code above, I think that the line after maximaoutput should
just be for visual confirmation while writing, so that the user
doesn't need to C-c C-u C or C-c C-u A . However, evaluating it should
be possible to make sure that the output is correct while writing (as
a preview without compiling). Now, if the preview is not possible, I
deem the evaluation and the proper rendering of the equation more
important, and would drop the preview.

I think that it should work with align, subequations and the autonum
package, also.
\begin{align}\label{eq:C}
  \begin{maxicode}
    C: ident(3)$
  \end{maxicode}
\mvalue{'C*p[3]} &= \mvalue{C}\,\mvalue{p[3]} \\ % C\,p &= tex(C)\,tex(p)
                   &= \mvalue{C*p[3]}              % &= tex(C*p[3])
\end{equation}

Now, this is just an idea, and I know it's too much right now, but may
be this could come later (instead of the code for \cref{eq:C})
\begin{maxialn}[breqn]\label{eq:D}
  D: ident(3)$
  \op{'D*p[3]} &= \op{D*p[3]}; \\        % C\,p &= tex(C)\,tex(p)
               &= \val{D*p[3]};               % &= tex(C*p[3])
\end{maxialn}

or something like
\begin{subequations}\label{eq:E}
  \begin{maxialn}
    E: ident(3)$
\op{'E*p[3]} &= \op{E*p[3]}; \label{eq:E1} \\ /* This would work with */ &= \val{E*p[3]}; \label{eq:E2} /* autonum (no number */ /* next to eq:E1) */
  \begin{maxialn}
\end{subequations}
What I'm trying to show with the last two blocks is that may be it
could start becoming almost inevident that there is something in the
background doing the calculations. I'm just being imaginative.

-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]