[OS X TeX] metapost question

Franck Pastor franck.pastor at skynet.be
Sun Dec 16 04:13:58 EST 2007

Le 15-déc.-07 à 02:45, Bruce Kellogg a écrit :

> Unfortunately, I was not precise in my original question. I include
> some text in the metapost file, such as labeling of axes, etc.
> This text is included with commands such as
> \tlabel{(1.75,-.8)}{\small$x$}
> This text is not to be found in the file KK3.1, so when I use  
> \includegraphics{KK3.1}
> to put the picture into my big latex file, the picture is not  
> complete as
> there are no axis labels, etc. In the third attempt that I  
> describe, I get the picture + labels,
> but they are pushed below some empty space. Maybe I should just try  
> fiddling with
> the numbers in the command
> \begin{mfpic}[40]{-2}{2}{-20}{-16}
> and maybe this will push the picture into a correct location. I  
> have not tried this yet,
> and indeed it seems to be an unnatural solution to my problem if it  
> works.

Did you try to load mfpic with the "mplabels" option ? With it,  
labels are not directly managed by TeX, but first by MetaPost itself  
(which then callsTeX to create them) and so they get included in the  
MetaPost files (.1, etc.)

If you use LaTeX commands and not plainTeX commands in your \tlabel  
commands, you would better use the command line to produce your  
picture, whith latex as engine to produce your label :

mpost -tex=latex path_to_your_file

Or instead you may change the "metapostwrap" configuration file in / 
Applications/TeXShop.app/contents/resources: just add the "- 
tex=latex" option to the "mpost" commands, each time (twice,  
actually) these appear in that file. That's what I have done, and it  
works well.

Also, make sure you have a "\mfpverbtex{..}" command in the preamble  
of your .tex file (it produces a verbatimtex environment in the  
metapost file) with the right options. For example, if you want 12pt- 
size labels and if you make use of "amsmath" commands inside them,  


in your preamble, right after \usepackage[metapost, mplabels,...]{mfpic}


Franck Pastor

More information about the MacOSX-TeX mailing list