# [metapost] a problem of label when using metapost

Dan Luecking luecking at uark.edu
Tue Nov 15 18:40:51 CET 2011

At 08:54 PM 11/14/2011, you wrote:

>i comment the label line, it
>layout the exact figure i want to get(
>without text of course).
>
>1.  TeX
>when it comes to the first line of
>-------------------------------------------
>label.top(btex *somethinghere* etex, z1)
>-------------------------------------------
>
>it would be fine,  but the situation changes when a second similar
>label is invoking as above.
>
>the error message is always be something like , >> mpx file can't be create.
>
>2. LaTeX
>
>it is said that one can changed the defaut TeX system by placing
>%&latex at the beginning.
>
>yet, it is true, except for it works not the same as i found through
>the internet, which i found
>%&latex is after vebatimtex,
>
>such as
>-----------------------------------------
>vebatimtex
>    %&latex
>*something else here*
>
>etex
>-----------------------------------------

One often doesn't even need latex, but if it is needed, your
file should look something like this:

--------------------------------
% near the top of your .mp file:
verbatimtex
%&latex
\documentclass{article}
% \usepackage commands here
\begin{document}
etex
%...
% then later in your figure:
label.top(btex *something here* etex, z1);
label.bot(btex *something else* etex, z2);
%...
--------------------------------

If that doesn't work, prepare a short, but complete,
figure file that fails for you and include that in your
next email.

Regards,
Dan

Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas
http://www-cs-faculty.stanford.edu/~knuth/iaq.html