[metapost] LaTeX labels in MetaPost

aaguado at ilstu.edu aaguado at ilstu.edu
Sun Jan 8 19:47:54 CET 2006


Hello!

I am using MPEdit version 1.0 on Windows XP. I have been using MPEdit for quite
some time now as my editor of METAPOST files, and I use MikTeX 2.4, and WinEdt
as my editor for TeX/LaTeX.

Anyway, my problem arises when I try to use the verbatimtex..etex block in order
to include LaTeX labels in MetaPost. It
doesn´t do anything. For example:

verbatimtex
%&latex
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
etex
beginfig(1);
a=0.7in; b=0.5in; z0=(0,0); z1=-z3=(a,0); z2=-z4=(0,b);
draw z1..z2..z3..z4..cycle;
draw z1--z0--z2;
label.top(btex $\mathcal{R}$ etex, 0.5[z0,z1]);
label.lft(btex $b$ etex, 0.5[z0,z2]);
label.bot(btex $(0,0)$ etex, z0);
endfig;
verbatimtex
\end{document}
etex
end;

It doesn´t do anything, and the information in the log file says that the
problems is that it was unable to make the corresponding 'mpx' file. Perhaps
the problem is with 'makempx.exe', but as far as I can tell the path and the
makempx file are up and running just fine. I did the whole process 'manually',
i.e. running mptotex, makempx, etc step by step... and voila, no problem. So I
am kind of lost as to what the problem really is.
Finally, in order to make this even more puzzling, if I eliminate the stuff
between verbatimex and etex, the it compiles and no error messages are
displayed in the log file (So the following code works perfectly fine)

verbatimtex
etex;
beginfig(1);
a=0.7in; b=0.5in; z0=(0,0); z1=-z3=(a,0); z2=-z4=(0,b);
draw z1..z2..z3..z4..cycle;
draw z1--z0--z2;
label.top(btex $\cal{R}$ etex, 0.5[z0,z1]);
label.lft(btex $b$ etex, 0.5[z0,z2]);
label.bot(btex $(0,0)$ etex, z0);
endfig;
end;

So all I would really like to know is how to solve this problem, or how to use
LaTeX labels in MetaPost in a different way.

I don´t know, perhaps the whole problem is with MPEdit. This reminds me to ask:
Does MPEdit have an option in which the user can stop the prompt when
compiling the file, so whatever is going on can be read?

Thank you very much for your time!!

Alex


----------------------------------------------------------------
This message was sent using Illinois State University Webmail.



More information about the metapost mailing list