I'm trying the following Metapost sample:


With the following code:

\everymplib{input mpcolornames; beginfig(1);}


  input TeXLabels.mp


But I get the following error:

./main.tex:10: Undefined control sequence.
l.9 \setbox264\hbox{\cyr
                        logarifm i plowad\char126}
l.10 \end{mplibcode}

I've made some test and already know that the problem is in this line of TeXLabel.mp:

          \cyr  logarifm i plowad\char126  
   etex scaled 1.1, (3.7, 2.4) transformed t);

I've already tried to replace "logarifm" with "logarithm" but it didn't work either.

Can you help me?

  • 1
    The error is in \cyr not being defined. The Russian word for “logarithm” is indeed “логарифм”. Just remove \cyr (and change the caption, I guess you don't use Russian).
    – egreg
    Dec 10, 2015 at 12:47
  • OK. Cyrillic. Now it makes sense... Thank you! Dec 10, 2015 at 12:50
  • By the way, the picture was being printed twice. I think it was because there was the command "endfig;" in my code > \everyendmplib{endfig;} and also at the end of TeXLabels.mp. I just erased the last line of TeXLabels.mp and it worked perfectly. Dec 10, 2015 at 12:55

1 Answer 1


The error you mention is in \cyr not being defined.

You should edit TeXLabels.mp to remove the initial part


and add a definition for \cyr in your TeX document. You also have a wrong declaration in \everymplib, that shouldn't include beginfig(1);, since the beginfig command is supplied in TeXLabels.mp. Similarly, you don't need endfig; in \everyendmplib.




\everymplib{input mpcolornames;}



  input TeXLabels.mp;


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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