[metapost] Strange behavior with verbatimtex

Yann SALMON salmon.yann at free.fr
Tue Jul 5 19:21:40 CEST 2005


Good morning/afternoon/evening.

I am using Metapost 0.904 (MiKTeX 2.4) and I am surprised because the 
following code compiles
------------------
beginfig(1)
    echelle=5cm;
    draw fullcircle scaled echelle;
    draw (0,0)--(echelle/2,0);
    label.ulft(btex $O$ etex,(0,0));
    label.top(btex $R$ etex,(echelle/4,0));
    label.llft(btex $C$ etex,(echelle/2.3,echelle/2.3));
endfig;
end
---------------------

This one too :
----------------------
verbatimtex

etex

beginfig(1)
    echelle=5cm;
    draw fullcircle scaled echelle;
    draw (0,0)--(echelle/2,0);
    label.ulft(btex $O$ etex,(0,0));
    label.top(btex $R$ etex,(echelle/4,0));
    label.llft(btex $C$ etex,(echelle/2.3,echelle/2.3));
endfig;
end
-------------------------

But this causes a compilation error and I do not get any output file :
--------------------------
verbatimtex
\documentclass{report}
\begin{document}
etex

beginfig(1)
    echelle=5cm;
    draw fullcircle scaled echelle;
    draw (0,0)--(echelle/2,0);
    label.ulft(btex $O$ etex,(0,0));
    label.top(btex $R$ etex,(echelle/4,0));
    label.llft(btex $C$ etex,(echelle/2.3,echelle/2.3));
endfig;
end
----------------------------

The problem is that I need to use LaTeX packages, and I cannot.

Has someone an idea about why this does not work and how I could correct 
my code ?



More information about the metapost mailing list