[texhax] metapost

Florian Knorn floz at gmx.de
Fri Jun 17 15:21:09 CEST 2005


hey there !

i have decided to get myself into metapost a bit. but i have very early 
starting problems (using miktex on winxp).

when i create a file fig1.mp with the following content:

verbatimtex
%&latex
\documentclass{article}
\begin{document}
etex
beginfig(1);
z0 = (0,0); z1 = (sqrt(3)*cm,0);
z2 = (sqrt(3)*cm,1cm);
draw z0--z1--z2--cycle;
label.bot(btex $\sqrt{3}$ etex, 1/2[z0,z1]);
label.rt(btex $\frac{1}{2}$ etex, 1/2[z1,z2]);
label.top(btex 1 etex, 1/2[z0,z2]);
endfig;
end;

if i run    mp fig1.mp   he says undefined control sequence 
\documentclass .... 
the reason for this, i guess, is that it runs tex on it, not latex. so i 
found i have to use   mp --tex=latex fig1.mp   . but then he says latex 
not found ! is this a configuration problem or ... ?

and another problem. if i stick to a simple file, with only some 
(plain)tex commands like this one here:

beginfig(1);
z0 = (0,0); z1 = (sqrt(3)*cm,0);
z2 = (sqrt(3)*cm,1cm);
draw z0--z1--z2--cycle;
label.bot(btex $\sqrt{3}$ etex, 1/2[z0,z1]);
label.rt(btex 1 etex, 1/2[z1,z2]);
label.top(btex 2 etex, 1/2[z0,z2]);
endfig;
end;

then i get fig1.1 file alright. if i open it with gsview however, it 
produces some font-related errors like Error: /undefined in cmsy10. same 
problems if i try to include the file in a latex document.........

what am i doing wrong ? i have been looking for answers since a couple 
of hours now, but didnt find anything resolving my problems.............

so your help is kindely appreciated !

thank you !

florian



More information about the texhax mailing list