[metapost] [mp-form.mp and negative numbers

Hans Hagen pragma at wxs.nl
Tue Dec 11 21:19:21 CET 2007


Dan Luecking wrote:
> It appears that metafun's initialize_numbers is buggy. Or perhaps it
> was never meant to be used alone. That particular function is defined
> in mp-text.mp and calls
>    init_numbers(textext.raw($-$),textext.raw($1$),...). The
> macro textext appears to return "unknown" if some quantity called
> texpictures[noftexpictures] is unknown. This appears to be the
> case when textext is first called. Thus the minus sign picture
> is unknown.
> 
> Other uses of metafun (within context, for example) might arrange for
> that variable to be known.
> 
> The following work-around might or might not be useful. I only tested
> it on stephan's example:
> 
>    noftexpictures:=0;
>    picture texpictures[];
>    texpictures1 := btex$-$etex;
> 
> Use after metafun is input but before any calls to format().

sorry for not answering sooner, but i looked at it and was puzzled why 
it didn't initialize .. normally it should fall back to the old method; 
i need to spent some more time on it

Hans


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


More information about the metapost mailing list