[metapost] Change 2.25.0 breaks existing code
Toby Thurston
thurston at eml.cc
Wed Jan 24 16:07:50 CET 2024
I've raised an issue for this, but I thought I should mention it here too.
https://github.com/lualatex/luamplib/issues/117
I've recently updated my mactex 2023 install with tlmgr and I find that your change 2.25.0 breaks some of my existing code.
For example, this document
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);
label(TEX("\large A"), origin);
endfig;
\end{mplibcode}
\end{document}
used to compile OK, but now it gives a "TeX Capacity Exceeded" error as it expands some of the internal macros.
This is apparently because you are doing something special to the <string> argument to the TEX() macro.
To avoid this error I have to add "\mplibtextextlabel{enable}" to the preamble.
But then the TEX() macro is redundant!
I can see (some) reason for allowing this to cause an error:
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);
label("\large A", origin);
endfig;
\end{mplibcode}
\end{document}
And in most circumstances I am very happy to do this:
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\mplibtextextlabel{enable}
\begin{document}
\begin{mplibcode}
beginfig(1);
label("\large A", origin);
endfig;
\end{mplibcode}
\end{document}
But this form was occasionally useful, and removing it is annoying and confusing (at least).
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);
label(TEX("\large A"), origin);
endfig;
\end{mplibcode}
\end{document}
Any thoughts or comments??
Toby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20240124/406d1414/attachment.htm>
More information about the metapost
mailing list.