ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* metafun: formatting numbers
@ 2010-12-11 23:49 Peter Münster
  2010-12-12 17:32 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Münster @ 2010-12-11 23:49 UTC (permalink / raw)
  To: ConTeXt list

Hello,

Formatting numbers seems to be buggy:

\starttext
\startMPcode
drawoptions(withpen pencircle scaled .25pt withcolor .5white) ;
draw hlingrid (0, 20, 1, 20cm, 10cm) ;
fmt_pictures := false ; % use TeX as formatting engine
draw hlintext.lft(0, 20, 1, 20cm, "@3e") ;
\stopMPcode
\stoptext

See also page 381 of latest metafun-s.pdf.

Peter

-- 
Contact information: http://pmrb.free.fr/contact/
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: metafun: formatting numbers
  2010-12-11 23:49 metafun: formatting numbers Peter Münster
@ 2010-12-12 17:32 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2010-12-12 17:32 UTC (permalink / raw)
  To: ConTeXt list

On 12-12-2010 12:49, Peter Münster wrote:
> Hello,
>
> Formatting numbers seems to be buggy:
>
> \starttext
> \startMPcode
> drawoptions(withpen pencircle scaled .25pt withcolor .5white) ;
> draw hlingrid (0, 20, 1, 20cm, 10cm) ;
> fmt_pictures := false ; % use TeX as formatting engine
> draw hlintext.lft(0, 20, 1, 20cm, "@3e") ;
> \stopMPcode
> \stoptext
>
> See also page 381 of latest metafun-s.pdf.

in mp-grid you can change:


def do_initialize_numbers =
   if not numbers_initialized :
     init_numbers ( textext.raw("$-$")          ,
                    textext.raw("$1$")          ,
                    textext.raw("${\times}10$") ,
                    textext.raw("${}^-$")       ,
                    textext.raw("${}^2$")       ) ;
     if unknown _trial_run_ :
       numbers_initialized := true ;
     else :
       % no reset, otherwise textexts get out of sync
       % slows down graphics a bit but not much
     fi ;
   fi ;
enddef ;

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


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

end of thread, other threads:[~2010-12-12 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-11 23:49 metafun: formatting numbers Peter Münster
2010-12-12 17:32 ` 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).