Closed jemmybutton closed 2 years ago
I'm wondering whether #103 is a solution to your issue. Please let me know. When it turns out to be usable, then a new version will be released.
Thank you! It works perfectly! The only thing I see which may be more convenient to have working differently is that now, afaiu, you have to set \everymplib
and \everyendmplib
for every instance, while in many cases it may not be necessary and setting them once without indicating a particular instance would be more straightforward.
It seems like changing these lines like so:
local everymplib = luamplib.everymplib[instancename] or luamplib.everymplib[""]
local everyendmplib = luamplib.everyendmplib[instancename] or luamplib.everyendmplib[""]
does just that.
Yes. That seems to be reasonable. Just committed #104.
Thank you so much!
Currently global
\everymplib
and\everyendmplib
are used with MetaPost code in all MetaPost instances. However, it is desirable to be able to have separate\everymplib
and\everyendmplib
for each MetaPost instance. At first glance, syntax like this, with an optional argument for instance name, like in the LaTeX environment, seems appropriate:However, the implementation of
\everymplib
and\everyendmplib
unlike that of the LaTeXmplibcode
environment, employs plain TeX\def
which makes it more difficult to add an optional argument. So it may make sense to keep plain TeX code intact and add multiple instance support in\everymplib
and\everyendmplib
for LaTeX separately somehow.