contextgarden / luametatex

Temporary/draft repository with luametatex
30 stars 6 forks source link

the 'input metauml' in startMPcode failed with emergency stop #2

Closed walkthetalk closed 1 year ago

walkthetalk commented 1 year ago

I copied metauml module into texmf-context/metapost/, and can't compile following code:

\starttext
\startMPcode
input metauml;
label("Foo", origin);
\stopMPcode
\stoptext
mojca commented 1 year ago

According to Hans (who is not following the issues reported here), the run says:

metapost        > trace > This is MPLIB for LuaMetaTeX, version 3.14, running in double mode.
metapost        > trace >
metapost        > trace > loading metafun for lmtx, including the plain 1.004 base definitions
metapost        > trace >
metafun         > log > overloading permanent 'log'
metapost        > trace > <error> _n_
metafun         > log >
metafun         > log > error: Equation cannot be performed (numeric=string)
metafun         > log >
metapost        > trace > <error> "iFont"
metapost        > trace > <to be read again> endgroup

That package assumes its local variables are unique and numeric and better can do some

begingroup; save _n_ ; .... ; endgroup ;

Can you perhaps ask at https://github.com/ogheorghies/MetaUML/issues ?

@ogheorghies

walkthetalk commented 1 year ago

it looks like lmtx remapped the boxes.mp, and reimplemented it. the metauml depends on boxes.

hanshagen commented 1 year ago

Indeed we use a variant of boxes that has namespaces for some locals so that it doesn't clash (the mp-xbox.mp* files). MP is quite sensitive for type clashes. Currently the remapping only happens for mkxl (lmtx) as that is what most users use, but i'll also do that for mkiv. (Since latest texlive there is a somewhat different lookup in order to avoid duplicates/clashes in the tl packages.)

adityam commented 1 year ago

It is better to use the mailing list for questions related to ConTeXt (the macro package)