[metapost] a problem of label when using metapost

Dan Luecking luecking at uark.edu
Wed Nov 23 20:14:36 CET 2011

At 08:25 PM 11/23/2011, Source Liu wrote:
>Hi all
>Now i'm wondering whether it is possible to use enumerate in 
>metapost. (i mean, like \begin{enumerate} in latex, which automatic 
>enum the coming item a number).
>I used the
>*somethings here*
>after that, I tried to set a new counter, which still failed to work.

You can use enumerate, provided the entire enumerate environment
is in a \parbox and that is inside a single btex/etex.

If you want separate btex/etex groups to be sequentially numbered,
then you will have to arrange for the numbering your self.
For example:


% somethings here
label(btex \nextmynum. First item. etex, z1);
% something else
  label(btex \nextmynum. Second second. etex, z2);
% etc.

Note: there is no need to put \end{document} in your metapost
file. Metapost adds that automatically.


Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas

More information about the metapost mailing list