Good evening. Is there some restriction to Metapost macros when compiled by texexec --mptex? I'd like to compile a file like this: % test input TEX; beginfig(1) z1=(0,1cm); z2=(3cm,1cm); dotlabel.top(btex $z_1$ etex,z1); dotlabel.top(btex $z_2$ etex,z2); draw TEX("$\underbrace{\hbox to "&decimal(xpart(z2)-xpart(z1))&"pt{\hss}}$") shifted z1; endfig; end. But I've got a following error: This is MetaPost, Version 0.641 (Web2C 7.3.1) (TEXuse.mp (/usr/share/texmf/metapost/base/TEX.mp) (mptextmp.mp
mptextmp.mp mptextmp.mpx ! Unable to make mpx file. l.1 btex $\underbrace{\hbox to 85.03935pt{\hss}}$ etex Transcript written on TEXuse.log. error in metapost run : TEXuse.mp:1
What's wrong? How can I improve it? Many thanks for any hint. M.K. P.S. I use TeXExec 3.3 with Metapost Version 0.641 (Web2C 7.3.1) under Linux (teTeX).
At 18:16 20/04/2004, Michal Kvasnicka wrote:
Good evening.
Is there some restriction to Metapost macros when compiled by texexec --mptex? I'd like to compile a file like this:
i can't see what goes wrong there (this tex in mp stuff is such a mess) from within context the following works ok: \starttext \startMPpage[offset=4cm] z1=(0,1cm); z2=(3cm,1cm); dotlabel.top(btex $z_1$ etex,z1); dotlabel.top(btex $z_2$ etex,z2); draw textext("$\string\underbrace{\hbox to "&decimal(xpart(z2)-xpart(z1))&"pt{\hss}}$") shifted .5[z1,z2]; \stopMPpage \stoptext or: \starttext \let\normalunderbrace\underbrace \unexpanded\def\underbrace{\normalunderbrace} % hm, i need to make these unexpanded \startMPpage[offset=4cm] z1=(0,1cm); z2=(3cm,1cm); dotlabel.top(btex $z_1$ etex,z1); dotlabel.top(btex $z_2$ etex,z2); draw textext("$\underbrace{\hbox to "&decimal(xpart(z2)-xpart(z1))&"pt{\hss}}$") shifted .5[z1,z2]; \stopMPpage \stoptext Hans
participants (2)
-
Hans Hagen
-
Michal Kvasnicka