# btex and etex in luamplib labels

I've been experimenting with METAPOST and in particular with luamplib. I found that I couldn't have tex typeset labels with the btex/etex construct as apparently is possible with straight up METAPOST. After a little googling, I found that btex/etex can be made to work by using the files luatexkomplib.tex and the corresponding luatexkomplib.lua found here. My usage is as follows:

\documentclass{article}

\usepackage{pdftexcmds}

\makeatletter
\let\pdfescapename=\pdf@escapename
\let\pdfstrcmp=\pdf@strcmp
\input{luatexkomplib}
\makeatother

\begin{document}

\begin{mplibcode}

beginfig(1)
u=50;
draw fullcircle scaled u;
pickup pencircle scaled 2;
draw (u/2,0); draw(0,u/2); draw(-u/2,0); draw(0,-u/2);
label.rt(btex $\theta = 0$ etex scaled .5, (u/2,0));
label.top(btex $\theta = \displaystyle{\frac{\pi}{2}}$ etex scaled .5, (0,u/2));
label.lft(btex $\theta = \pi$ etex scaled .5, (-u/2,0));
label.bot(btex $\theta =\displaystyle{\frac{3\pi}{2}}$ etex scaled .5, (0,-u/2));
endfig;
end;

\end{mplibcode}
\end{document}


Which produces the expected circle with tex labelled points. My question is: do I break anything by using these two files rather than using the luamplib package? If not, then have I missed an updated luamplib package somewhere?

-

Had I looked a little harder on Google, I would have found the following "TODO" page on the luamplib GitHub:

• use infwarerr and ltxcmds for Plain/LaTeX compat
• use own verbatim env for LaTeX (à la luacode) yep, will be much better than working arround fancyvrb
• make variants of mplibcode with \ { } still special?
• actually, also make commands not changing the catcode as requested by Arno T.
• expand doc?
• synchronize with Context?
• add a figure with mpfun in the test files

The following implement btex-etex commands: http://cvs.ktug.or.kr/viewcvs/ko.TeX/luatexko/luatexkomplib.tex http://cvs.ktug.or.kr/viewcvs/ko.TeX/luatexko/luatexkomplib.lua

Since these two files are mentioned as having implemented the btex/etex tags, I'll just assume that there is no problem with using them (and wonder why the package hasn't been updated to include them).

-