ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* texexec and TEX
@ 2004-04-20 16:16 Michal Kvasnicka
  2004-04-28 17:56 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Kvasnicka @ 2004-04-20 16:16 UTC (permalink / raw)


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).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: texexec and TEX
  2004-04-20 16:16 texexec and TEX Michal Kvasnicka
@ 2004-04-28 17:56 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2004-04-28 17:56 UTC (permalink / raw)


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  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-28 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-20 16:16 texexec and TEX Michal Kvasnicka
2004-04-28 17:56 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).