I have a METAPOST program that works fine with mpost, but fails when I try to run it inline in ConTeXt. In order to debug it, I would like to see the usual METAPOST logging and/or to use the METAPOST "message" primitive.

However, whenever I add "loggingall;" or a message statement to my ConTeXt file, I encounter errors like this

metapost        > initializing instance 'metafun' using format 'metafun'
metapost        > loading 'metafun': D:/texlive/2012/texmf-dist/metapost/context/base/metafun.mpiv
! terminal:

What is the appropriate way to debug problems with inline METAPOST code in ConTeXt?

My example file is:


\framed{Hello world.}
This is a simple_test.

fill fullcircle scaled 1in withcolor blue;
label.top(btex This is a test. etex, origin);


I am using TeXLive 2012 on Windows.

I apologize for any vagueness in this question. I’m not really sure how the various pieces fit together.


By default MetaPost does not display the messages injected with message. However, the messages can be enabled using \enabletrackers.

To enable verbose debug output use tracingall, which prints plenty of debugging output to the console and the log file. Here's a complete example:


    message "This is a debug message.";
    fill fullcircle scaled 1in withcolor blue;
    label.top(btex This is a test. etex, origin);
  • that is only the default log and not really a debugging like \loggingall – user2478 Feb 20 '13 at 8:38
  • that also gives also no metapost output. Compare it with a mpost <file>.mp – user2478 Feb 20 '13 at 10:16
  • @Herbert On my system I get a 23K log file with plenty of info. The message shows up as well as all assignments. What exactly is missing? – Marco Feb 20 '13 at 10:25
  • I used the context from TL2012 and there are no infos about mpost in the logfile – user2478 Feb 20 '13 at 11:06
  • 1
    @Herbert Confirmed, no log output on 2012.05.30 11:26. It works with a current version 2013.02.19 19:38. – Marco Feb 20 '13 at 12:03

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.