-
Notifications
You must be signed in to change notification settings - Fork 11
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
Featurerequest: \inputmpcode #107
Comments
Why don't you use TeX's expansion functionality. \newcommand*\inputmpcode[1]{\begin{mplibcode}input #1.mp\end{mplibcode}}
...
\inputmpcode{mympfile} The above definition at first line can go into |
as such a good idea... but just to test luamplib.cfg: shall it be in the package directory? |
Then the definition can go into .tex file.
Anywhere lualatex can read it is OK. In this respect, it is not different from other .tex or .sty files. |
I think, one shall in general avoid pollution the local directory with files. I think that the authors of the listings package added the according command was a good decision. |
The idea is stolen from latex package 'listings': it provides a command
\lstinputlisting{...}
,which allows to read in a file containing the listing.
So the file can be run and printed in parallel.
I would suggest to complement the environment
mplibcode
with the command\inputmcode
reading in an mp file and executing it.
That way one could avoid mixing tex and mp in a single file.
I have highlighter in my editor which get confused, if i to not separate the two languages.
The text was updated successfully, but these errors were encountered: