auctex
[Top][All Lists]

## [AUCTeX] preview-latex and emaxima

 From: Tamas Papp Subject: [AUCTeX] preview-latex and emaxima Date: Sat, 08 Mar 2014 12:08:50 +0100 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.1

Hi,

I would like to use preview-latex with the Emaxima LaTeX
package. A self-contained example file looks like this:

--8<---------------cut here---------------start------------->8---
%-*-EMaxima-*-
\documentclass[a4paper,12pt]{article}
\usepackage[inline]{emaxima}
\begin{document}
\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}
\end{document}
--8<---------------cut here---------------end--------------->8---

The part from \maximaoutput* to \end{maxima} was generated by maxima,
not written by hand, and I have no control over it (I can't replace it
by an equation environment, for example).

I tried to preview it with preview-latex, but the equation does not
replace the math: it follows it instead. A screenshot is attached.

Is there any way I can fix this? I looked at PreviewMacro in the
manual, but I don't know how to use it for this specific case.

I am using auctex-11.87.3, with preview-default-preamble set to
--8<---------------cut here---------------start------------->8---
("\\usepackage{euler}" "\\RequirePackage["
("," . preview-default-option-list)
"]{preview}[2004/11/05]")
--8<---------------cut here---------------end--------------->8---
but this is just a cosmetic change (the Euler font is easier for me to