Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate instances support for LaTeX environment and respective tests #100

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

jemmybutton
Copy link
Contributor

This adds the support for several named MetaPost instances in LaTeX mplibcode environment. Respective tests are added to test-luamplib-latex.tex.

Syntax is like so:

\begin{mplibcode}[instanceName]
% some mp code
\end{mplibcode}

Behaviour is as follows.

  • All the variables and functions are shared only among all the environments belonging to the same instance.
  • \mplibcodeinherit only affects environments with no instance name set (since if a name is set, the code is intended to be reused at some point).
  • btex ... etex labels still exist separately and require \mplibglobaltextext
  • When an instance names is set, respective \currentmpinstancename is set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants