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?