Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:






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));


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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.