[metapost] makecirc question

Dan Luecking luecking at uark.edu
Fri May 9 20:56:53 CEST 2008

At 07:54 AM 5/8/2008, you wrote:
>This is probably off topic, but I'm having trouble finding a more 
>appropriate forum.  If anyone here knows of a better place, please let me know.
>I was using makecirc in conjunction with some standard metapost 
>code, and getting strange labeling behavior.  From the makecirc 
>manual, it appears that the solution is to use `puttext' which seems 
>like a renamed version of metapost's `label'.  I took a look at the 
>makecirc code, but I don't understand what the funny `@#'s 
>mean.  I'd like to know if

It appears that makecirc expects to control all labels.

Mpost creates a *.mpx file for every input file that contains
tex labels.

Makecirc writes label-making code to "makecirc_eats_label.mpt"
and then inputs that. Thus, there are two files whose names have
the form makecirc_eats_label.*. The main file and makecirc's
creation. The .mpx file created by second one overwrites the

Everything ought to be OK if makecirc is modified to make use
of a different basename. Look into latex.mp and replace all
instances of
   jobname & ".mpt"
(spaces not significant) with something like
   jobname & "XXX.mft"
so that the basename of the created file is something other
than the main file's basename. I tested this and it worked fine.

Perhaps also contact the author of makecirc (and/or the author
of label.mp) and describe the problem. The best strategy would
be for latex.mp to provide a string variable available to the
user so the name of this temporary file could be changed.

Don't forget that mpost has to be run twice to pick up the labels
generated by makecirc on the first run.

>  (b) someone can explain the '@#' in the puttext macro definition.

It is a suffix parameter. A definition like
   vardef mymacro@# (expr PARAM) =
can be called like
     mymacro sfx (X);
and then all instances of @# in the definition are replaced with
the _name_ "sfx" (not its value if it happens to be a variable)
while all instances of PARAM are replaced with the _value_ of X.


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descarte

More information about the metapost mailing list