Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file, and for random value reasons I must load it only once. But the MWE already shows the problem.) """ \startMPcode numeric something; something := 1; \stopMPcode \starttext \chapter{Something} Anything. \stoptext """ Hraban
On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote:
Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file, and for random value reasons I must load it only once. But the MWE already shows the problem.)
""" \startMPcode numeric something; something := 1; \stopMPcode
\starttext \chapter{Something}
Anything.
\stoptext """
\startMPinitializations % used by ALL MP instances % also called repeatedly \stopMPinitializations \startMPdefinitions \stopMPdefinitions This is what you want. -- Alan
Am 06.07.23 um 12:02 schrieb Alan Braslau:
On 06/07/23 06/07/23, 11:23, Henning Hraban Ramm wrote:
Hi, if I use \startMPcode to declare variables etc. that I need in several MP graphics, it always inserts an empty page. How can I avoid that? (Actually, I load an external mp file, and for random value reasons I must load it only once. But the MWE already shows the problem.)
""" \startMPcode numeric something; something := 1; \stopMPcode
\starttext \chapter{Something}
Anything.
\stoptext """
\startMPinitializations % used by ALL MP instances % also called repeatedly \stopMPinitializations
\startMPdefinitions \stopMPdefinitions
This is what you want.
Exactly, the latter. Thank you, these two environments were missing in my book. Hraban
participants (2)
-
Alan Braslau
-
Henning Hraban Ramm