[metapost] Question: [MPLib, MetaFun, ConTeXt, LuaTeX] metapost logging and message primitive?

Colin Fraizer metapost at cfraizer.com
Tue Feb 26 11:14:56 CET 2013

Perhaps this is a simpler question:

Is there a way for me to see exactly the code ConTeXt passes to
MPLIB so I can put that in a ".mp" file and run it with METAPOST?

That would let me look at the logs and see where things go wrong.

I greatly appreciate all the effort that has gone into (and continues to
go into) this project.  And I think you, Hans, and the others who have
tried to help me.  Both this list and the TeX.SE site have been

Best regards,
--Colin Fraizer

-----Original Message-----
From: metapost [mailto:metapost-bounces at tug.org] On Behalf Of Colin Fraizer
Sent: Tuesday, February 26, 2013 5:02 AM
To: 'Hans Hagen'
Cc: 'MetaPost List'
Subject: Re: [metapost] Question: [MPLib, MetaFun, ConTeXt, LuaTeX] metapost
logging and message primitive?

>keep in mind that mp's after that date are somewhat different in the 
that they have scaled and double mode and that (unless you use the really
latest version) there are bugs

I'm not quite certain what "scaled and double mode" means.

The version of METAPOST (mpost.exe) included with the stand-alone ConTeXt I
downloaded is 1.504.
The version of ConTeXt is:
- ConTeXt Process Management 0.60
- current version: 2013.02.20 14:35

>> 2. I would like to use ConTeXt to generate both my figures and my
>>     document. (Two reasons: I'd prefer a single source file and I would
>>     like to be able to use OpenType fonts in my labels.) 3. When run 
>> within ConTeXt, my document fails to generate the correct
>>     figure.  I suspect this is because of the "extrapass" mechanism,
>>     but it is difficult to tell for sure without being able to see the
>>     METAPOST logging.
>so, do you have a small example showing this problem?

I do not have a small example that shows the problem with my (moderately
METAPOST code when run in ConTeXt. (That is likely my own problem, which I
would debug if I could see the log. :-)  I do have a small example that

- Blank pages when "tracingonline:=1;" or "loggingall;"

When the following is run with ConTeXt, I get a page with the framed text
and the subsequent text on the first page and a second page that appears

If one removes the METAPOST "loggingall;", the second page contains a blue
circle with the appropriate label.

%% ----------------------------------------------------------------------

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

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

%% ----------------------------------------------------------------------

>is probably faster to get the raw mp code

I tried this.  It is indeed fast, but does not show where my problems are.
I need to see the macro expansions and other stuff to understand why my
program does not run.

>> Does anyone know of a way to:
>> 1. make ConTeXt/MPLIB *not* generate blank figures when "loggingall;"
>>     is used; AND/OR
>not without example

See above.

>> 2. make "tracingall;" not take *forever*?
>it all depends on how much expansion goes on; using tracingall only 
sense for small bits of code

- When I run my code through raw METAPOST with tracingall, it takes less
than one minute to complete successfully.
- When I run my code through ConTeXt with tracingall, it takes over an hour.

I would expect the ConTeXt run to take approximatley 2*n, but not > 60*n.


More information about the metapost mailing list