On 14-5-2010 3:07, Aditya Mahajan wrote:
This is because the commands are interpreted with TeX before they are written to mpgraph.mp. The \letterampersand or \& generates the character & alone: you need to preceed it with backslash, so that metapost finally knows what to do.
So, should all the \letter... commands (basically anything generated from char-def.lua) be unexpandable?
You can also try \noexpand\letterampersand
The problem is that some definitions, likt \& and \# expand to letters which is needed when used in mp itself. That also means that resetting them to their normal meaning is not possible as textext is handled in mp and then already an \& has become a &. As & is rather common, I added it to \nonknuthmode, so you can say: \nonknuthmode \starttext \startMPcode draw textext("Underscores, Superscripts & Ampersands" & "?") ; \stopMPcode \stoptext Aditya: I also changed the definition of \_ in math ... it now looks better when used in script(scripts) .. see \fakeunderscore. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------