Change 2.25.0 breaks existing code

Toby Thurston <[email protected]> Wed, 24 Jan 2024 15:07:50 +0000
Newsgroups gmane.comp.tex.metapost
Message-ID <[email protected]>
--===============4003877610379650689==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_45367A90-5D42-4660-9B44-E3909E4E3805"


--Apple-Mail=_45367A90-5D42-4660-9B44-E3909E4E3805
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

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=3D5mm]{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. =20

To avoid this error I have to add "\mplibtextextlabel{enable}" to the =
preamble.

But then the TEX() macro is redundant! =20

I can see (some) reason for allowing this to cause an error:

\documentclass[border=3D5mm]{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=3D5mm]{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=3D5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\begin{mplibcode}
beginfig(1);
label(TEX("\large A"), origin);
endfig;
\end{mplibcode}
\end{document}

Any thoughts or comments??

Toby=

--Apple-Mail=_45367A90-5D42-4660-9B44-E3909E4E3805
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><div>I've =
raised an issue for this, but I thought I should mention it here =
too.</div><div><br></div><a =
href=3D"https://github.com/lualatex/luamplib/issues/117">https://github.co=
m/lualatex/luamplib/issues/117</a><div><br></div><div>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.</div><div><br></div><div>For =
example, this document</div><div><br></div><div><font face=3D"Andale =
Mono">\documentclass[border=3D5mm]{standalone}<br>\usepackage{luamplib}<br=
>\begin{document}<br>\begin{mplibcode}<br>beginfig(1);<br>label(TEX("\larg=
e A"), =
origin);<br>endfig;<br>\end{mplibcode}<br>\end{document}</font><br></div><=
div><font face=3D"Andale Mono"><br></font></div><div>used to compile OK, =
but now it gives a "TeX Capacity Exceeded" error as it expands some of =
the internal macros.</div><div><br></div><div>This is apparently because =
you are doing something special to the &lt;string&gt; argument to the =
TEX() macro. &nbsp;</div><div><br></div><div>To avoid this error I have =
to add "\mplibtextextlabel{enable}" to the =
preamble.</div><div><br></div><div>But then the TEX() macro is =
redundant! &nbsp;</div><div><br></div><div>I can see (some) reason for =
allowing this to cause an error:</div><div><br></div><div><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\documentclass[border=3D5mm]{standalone}</span><br =
style=3D"font-family: &quot;Andale Mono&quot;;"><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\usepackage{luamplib}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{document}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">beginfig(1);</span><br style=3D"font-family: &quot;Andale =
Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">label("\large A", origin);</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">endfig;</span><br style=3D"font-family: &quot;Andale =
Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{document}</span></div><div><span style=3D"font-family: =
&quot;Andale Mono&quot;;"><br></span></div><div>And in most =
circumstances I am very happy to do this:</div><div><br></div><div><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\documentclass[border=3D5mm]{standalone}</span><br =
style=3D"font-family: &quot;Andale Mono&quot;;"><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\usepackage{luamplib}</span></div><div><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\mplibtextextlabel{enable}</span></div><div><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{document}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">beginfig(1);</span><br style=3D"font-family: &quot;Andale =
Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">label("\large A", origin);</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">endfig;</span><br style=3D"font-family: &quot;Andale =
Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{document}</span></div><div><span style=3D"font-family: =
&quot;Andale Mono&quot;;"><br></span></div><div>But this form was =
occasionally useful, and removing it is annoying and confusing (at =
least).</div><div><br></div><div><span style=3D"font-family: =
&quot;Andale =
Mono&quot;;">\documentclass[border=3D5mm]{standalone}</span><br =
style=3D"font-family: &quot;Andale Mono&quot;;"><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\usepackage{luamplib}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{document}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\begin{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">beginfig(1);</span><br style=3D"font-family: &quot;Andale =
Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">label(TEX("\large A"), origin);</span><br =
style=3D"font-family: &quot;Andale Mono&quot;;"><span =
style=3D"font-family: &quot;Andale Mono&quot;;">endfig;</span><br =
style=3D"font-family: &quot;Andale Mono&quot;;"><span =
style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{mplibcode}</span><br style=3D"font-family: =
&quot;Andale Mono&quot;;"><span style=3D"font-family: &quot;Andale =
Mono&quot;;">\end{document}</span></div><div><span style=3D"font-family: =
&quot;Andale Mono&quot;;"><br></span></div><div>Any thoughts or =
comments??</div><div><br></div><div>Toby</div></body></html>=

--Apple-Mail=_45367A90-5D42-4660-9B44-E3909E4E3805--

--===============4003877610379650689==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
http://tug.org/metapost/

--===============4003877610379650689==--