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

(mgp-users 00447) Re: math?



On Wed, 13 Dec 2000, Luigi Rizzo wrote:

> > can do with latex.  I can imagine rendering latex to a PS file, and
> > including that as an image, but is there a better way?
>
> no better way.
>
> 	luigi

One way is to write a small preprocessor for MagicPoint that replaces
LaTeX-contents with eps-files. I have written a small program that does
this, called mgptex. The result is that in your mgp-file you write
something like

	\beginlatex
	%center
	\begin{displaymath}
	        \begin{array}{l}
	        -u''(x) = f(x), x\in(0,1), \\
	        u(0) = u(1) = 0.
	        \end{array}
	\end{displaymath}
	\endlatex

and this is replaced with

	%% LaTeX formula
	%center
	%image "01.eps"

I think something like this should be included in the MagicPoint
distribution, either that MagicPoint itself does this, like e.g.

	>> mgp -scanlatex presentation.mgptex
        Scanning for LaTeX formulas...
          Generating formula 01.......done.
          Generating formula 02.......done.
          Generating formula 03.......done.
	Done. 3 formula(s) generated.
	Presentation placed in presentation.mgptex.mgp.

or whatever, or a separate program like mgptex (which may be a perl script
of 30-40 lines) that does the same thing.

/Anders Logg
Chalmers Finite Element Center