[metapost] Can't get write/scantokens to work.

Michaël Cadilhac michael at cadilhac.name
Tue Sep 18 17:18:59 CEST 2007


"Mojca Miklavec" <mojca.miklavec.lists at gmail.com> writes:

> Can you try to compile the following document with "texexec yourfile.tex"?
>
> % yourfile.txt should look like:
> \starttext
> \startMPcode
>   label(\sometxt{b}, (2c,2cm));
>   label(textext("def\vulgarfraction{1}{2}"), (4cm,4cm));
>   label(textext("abc"), (0,0));
> \stopMPcode
> There is a way to get a different fraction, but please tell first if
> this method works OK for you.
> \stoptext

Sure!  I'm not really sure what you're trying to make me understand, but
well, texexec --mptex of this file gives a drawing with the `b' and
where `def' and `abc' should be, the text `unknown'.

> You can pass any string to textext(), but note that \sometxt is *much*
> more efficient, so you should use \sometxt whenever possible.

Well, I'm sorry, but I don't understand the very good point you're
probably making.  I mean, the only thing I new user know to do, is
create my beginfig..endfig file, call mpost or mptopdf, depending on the
need, and include the file in a .tex.

Are you suggesting that I should use another way of using MetaPost ?

Anyway, I'll google a bit for those functions.  Thanks !

> There also seems to be a little bug if you put the last label in front
> of the rest.

Err... Maybe ? :-)

Thanks for the answer, Mojca !

-- 
 |   Michaël `Micha' Cadilhac       |  And please suggest to him that        |
 |   http://michael.cadilhac.name   |    he not refer to Microsoft Windows   |
 |   JID/MSN:                       |                  as "win".             |
 `----  michael.cadilhac at gmail.com  |          -- RMS                   -  --'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://tug.org/pipermail/metapost/attachments/20070918/e11c1d74/attachment.bin 


More information about the metapost mailing list