[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] preview-latex and emaxima
From: |
Tamas Papp |
Subject: |
Re: [AUCTeX] preview-latex and emaxima |
Date: |
Sun, 09 Mar 2014 08:41:47 +0100 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.1 |
On Sat, Mar 08 2014, Mosè Giordano <address@hidden> wrote:
Hi Mosè,
> Since the `emaxima' package isn't on CTAN nor it's shipped with common
> TeX distributions, it would have been a good idea to point us where we
> could have found it. Anyway, Debian provides it in the `maxima-emacs'
> package and I installed it.
Sorry for that, glad that you found it.
> From the `preview-latex' manual:
>
> --8<---------------cut here---------------start------------->8---
> If you have a certain macro or environment that you want to
> preview, first check if it can be chosen by cutomizing
> preview-default-options-list in the Preview Latex group.
>
> If it is not available there, you can add it to
> preview-default-preamble also in the Preview Latex group, by
> adding a \PreviewMacro or \PreviewEnvironment entry (see Provided
> commands) after the \RequirePackage line.
> --8<---------------cut here---------------end--------------->8---
>
> In your case you can add the following code to your `.emacs':
> --8<---------------cut here---------------start------------->8---
> (eval-after-load "preview"
> '(progn
> (add-to-list 'preview-default-preamble
> "\\PreviewEnvironment{maxima}" t)))
> --8<---------------cut here---------------end--------------->8---
Yes, I found that in the manual, but I would prefer not to preview the
whole environment, only the relevant snippet. Eg given LaTeX code like
--8<---------------cut here---------------start------------->8---
\begin{maxima}[]
solve(a*x^2+b*x+c=0,x);
\maximaoutput*
\m \left[ x=-\frac{\sqrt{b^2-4 a c}+b}{2 a} , x=\frac{\sqrt{b^2-4 a c}-b}{2 a}
\right] \\
\end{maxima}
--8<---------------cut here---------------end--------------->8---
I would prefer to preview only the part after the \m. Or maybe
everything between \maximaoutput* and \end{maxima}. Is that possible in
AUCTeX?
Best,
Tamas