[metapost] MetaPost and LuaTeX

Dirk Laurie dpl at sun.ac.za
Tue Nov 9 21:37:57 CET 2010


On Tue, Nov 09, 2010 at 12:03:37PM +0200, Hans Hagen wrote:
> On 9-11-2010 10:05, Dirk Laurie wrote:
> > My own level of MetaPost expertise in LuaTeX has progressed to the
> > point where I can insert the following code copied from
> >      http://www.luatex.org/talks/print-plain-tug-2009.pdf,
> > and am just clever enough to change the first and last lines
> > to LaTeX usage:
> >
> > \begin{mplibcode}
> > beginfig(1);
> > draw fullcircle
> > scaled 10cm
> > withcolor red
> > withpen pencircle xscaled 4mm yscaled 2mm rotated 30 ;
> > endfig;
> > \end{mplibcode}
> >
> > I then admire the nice big red circle which appears at just that point
> > in the document.
> >
> > But I am not expert enough to figure out why the circle is not drawn
> > with that pen, but with an ordinary pen of constant thickness.
> 
> I don't know either .. the plain example works ok on my machine so maybe 
> you use an old binary of old macros
> 
I can't get the plain TeX version to run.  I don't know, on the texlive
distribution, what the equivalent of \usepackage{luamplib} is.

If I run the same code, but with \startMPpage and \stopMPpage instead
of \begin{mplibcode} and \end{mplibcode} through context, the circle
is drawn as required.

So the problem is that the LaTeX route via luamplib.sty is bumpy.  I've
had a quick peek on the Internet and it seems that there has been a lot
of traffic about that file.  I'll digest that.  Sorry for bothering this
list (although much the same people read it, I guess).

Dirk



More information about the metapost mailing list