Hi,
I uploaded a new lmtx version. The update mostly concerns part of the
low level mp-tex interface, a side effect of updating some mechanisms
(one of which MF currently is extending).
Hopefully it won't break users code that uses low level mp-tex interface
features but anyway, if needed, adapting is not hard and gives nicer
code, as in:
\startuseMPgraphic{foo1}
fill fullcircle scaled \MPvar{size} withcolor \MPvar{color} ;
\stopuseMPgraphic
which now becomes:
\startuseMPgraphic{foo2}
fill fullcircle scaled mpvard("size") withcolor mpvars "color" ;
\stopuseMPgraphic
or even can be:
\startuseMPgraphic{foo3}
fill fullcircle scaled mpvar "size" withcolor mpvar "color" ;
\stopuseMPgraphic
where numerics, dimensions and strings are figured out automatically:
\newdimen\mydimen \mydimen=1cm
\useMPgraphic{foo1}{size=\mydimen,color=red}
\useMPgraphic{foo2}{size=2\mydimen,color=green}
\useMPgraphic{foo3}{size=3cm,color=blue}
So it (still) works (even better) with registers and such.
The fundamental difference is that \MPvar pushes the value of a variable
from tex to mp (after some analysis) and that mpvar pulls the value from
the mp end (with some help of the lua interface).
New is that we have inheritance
\setupMPvariables[foo3][size=1cm,color=yellow]
\useMPgraphic{foo3}
\setupMPvariables[foo1][foo3][size=2cm]
\useMPgraphic{foo1}
Another experiment, already active on my machine for a while, is this:
\enabledirectives[metapost.text.fasttrack]
which can be a bit more efficient wrt texts.
Another pending change is getting rid of colorhack, which you can try with:
\enableexperiments[disablecolorhack]
Yet another (already mentioned) experiment users can (should) play with is
\enableexperiments[simplegroups]
And of course there are:
\enableexperiments[fonts.compact]
and the less fundamental (and more experimental too):
\enabledirectives[fonts.injections.method=advance]
At some point compact mode can become the default which then can trigger
some low level code removal ... of course some sentimental issue because
throwing away code that has been around for a long time, has evolved to
be efficient and work well, can hurt but in the end nicer new code wins.
Finally I want to remember overload protection:
\enabledirectives[overloadmode=warning]
or even
\enabledirectives[overloadmode=error]
just in case you want to check if your own macros clash or harm the system.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________