# [luatex] Reusable Code (LuaLaTeX + LuaMPlib)

Troy Henderson thenders at gmail.com
Thu Jun 1 19:00:26 CEST 2017

This seems to work beautifully.  Thank you kindly.

Is there a way to "turn off"

\mplibcodeinherit{enable}
and
\mplibglobaltextext{enable}

mid-document?  That is, in order to create frame-by-frame animations,
inheriting code from the previous figure is necessary.  However, once the
animation is complete, it would be nice to be able to "initialize" MetaPost
by no longer inheriting the code.

Perhaps, something like \begin[continue]{mplibcode} ... \end{mplibcode}.

Thoughts?