Re: [NTG-context] \overrightarrow not working in mathmode in Metapost?
Matthijs Kooijman wrote: Hi all, 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. This seems to broken for extensible math arrows like \xrightarrow as well. \let\normaloverrightarrow\overrightarrow \unexpanded\def\overrightarrow{\normaloverrightarrow} And this fix helps there as well. Could this perhaps be fixed in general for all extensible arrows? Have you tried the new current yet? There was a whole bunch of extra \unexpanded-s in it already. Best wishes, Taco ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \overrightarrow not working in mathmode in Metapost?
Hi Taco, Have you tried the new current yet? There was a whole bunch of extra \unexpanded-s in it already. You're right, thanks! I had built the new context but forgot to install it on this particular machine :-) Sorry for the noise, Matthijs signature.asc Description: Digital signature ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \overrightarrow not working in mathmode in Metapost?
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: ! Undefined control sequence. \dodosmash [#1]-\edef \@@smash {#1}\futurelet \nexttoken \dododosmash \relbar -\mathrel {\smash -} \mtharrowfill ...inmuskip \thickmuskip \relax #8#5 \mkern -#1mu \cleaders \hb... \dodohandlemathoverarrow ...{\ialign {##\crcr #2#3 \crcr \noalign {\kern #1\n... \mathpalette ...\mathchoice {#1\displaystyle {#2} }{#1\textstyle {#2}}{#1\sc... argument ...ex; draw btex $\overrightarrow {foo} $ etex; ... l.5 \stopMPcode It seems the \overrightarrow command uses \@@smash, which isn't defined when running from metapost? Is this expected? Is this a bug? Gr. Matthijs signature.asc Description: Digital signature ___ 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 ___
Re: [NTG-context] \overrightarrow not working in mathmode in Metapost?
Aditya Mahajan wrote: \let\normaloverrightarrow\overrightarrow \unexpanded\def\overrightarrow{\normaloverrightarrow} ok, i made them all unexpandable - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___