On Fri, 18 Sep 2009, Matthijs Kooijman wrote:

Hi,

I've been trying to use the \overrightarrow command within a metapost graphic,
but it doesn't work. Math mode does work, for example \vec works like
expected. Outside of metapost, \overrightarrow works as expected.

To illustrate the problem, I've created the following simple testcase:

 \starttext
 \startMPcode
 draw btex $\vec{foo}$ etex;
 draw btex $\overrightarrow{foo}$ etex;
 \stopMPcode
 \stoptext

This gives the following error output:

It seems the \overrightarrow command uses \@@smash, which isn't defined when
running from metapost?

Is this expected? Is this a bug?

This is a bug in math-arr. All arrow macros should be unexpanded (but I could not figure out how). Here is a workaround

\let\normaloverrightarrow\overrightarrow
\unexpanded\def\overrightarrow{\normaloverrightarrow}

Aditya

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to