This code compiles fine with plain MetaPost.

input graph;
beginfig(0);
   draw begingraph(1in,1in);
      setrange((0,0),(1,1));
      for n=auto.x:
         show format("%g",n);
      endfor;
   endgraph;
endfig;
end

However, this "ConTeXt translated" version errors in MKIV

\usemodule[graph]
\ctxlua{metapost.showlog=true}
\startMPpage
   draw begingraph(1in,1in);
      setrange((0,0),(1,1));
      for n=auto.x:
         show format("%g",n);
      endfor;
   endgraph;
\stopMPpage

See foo.log (attached).

Thoughts?

Troy
(foo.tex

ConTeXt  ver: 2010.03.02 12:34 MKIV  fmt: 2010.3.6  int: english/english

system          : cont-new loaded
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.tex
systems         : beware: some patches loaded from cont-new.tex
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.mkiv))
system          : cont-fil loaded
(/opt/context-minimals/tex/texmf-context/tex/context/base/cont-fil.tex
loading         : ConTeXt File Synonyms
)
system          : cont-sys loaded
(/opt/context-minimals/tex/texmf-local/tex/context/user/cont-sys.tex 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-def.mkiv) 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-lua.tex) 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.tex 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.tex 
(/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system          : foo.top loaded
%
%       begin of optionfile
%
%       % runtime options files (command line driven)
%       \unprotect
%       % special commands, mostly for the ctx development team
%       % feedback and basic job control
%       % handy for special styles
%       \startluacode
%       document = document or { }
%       document.arguments={
%       }
%       document.files={
%        "foo.tex",
%       }
%       \stopluacode
%       % process info
%       \setupsystem[inputfile=foo.tex]
%       \setupsystem[\c!n=1,\c!m=1]
%       % modes
%       % options (not that important)
%       \startsetups *runtime:options
%       \setupoutput[pdftex]
%       \stopsetups
%       % styles and modules
%       \startsetups *runtime:modules
%       \stopsetups
%       % done
%       \protect \endinput
%
%       end of optionfile
%
(foo.top)
fonts           : preloading latin modern fonts
(/opt/context-minimals/tex/texmf-local/tex/context/luc/type-luc.tex)
bodyfont        : 12pt rm is loaded
language        : language en is active
(/opt/context-minimals/tex/texmf-context/tex/context/base/m-graph.tex 
(/opt/context-minimals/tex/texmf-context/tex/context/base/m-graph.mkiv))
system          : module graph loaded
systems         : begin file foo.tex at line 10
systems         : auto \starttext..\stoptext
mplib           : initializing instance 'metafun' using format 'metafun'
mplib           : loading 'metafun.mp' from 
'/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en-metafun.mem'
!mplib          : mp log: 
(/opt/context-minimals/tex/texmf/metapost/base/graph.mp)

!mplib          : mp terminal: ! Incomplete string token has been flushed.
<*> ... n=auto.x: show format("endfor; endgraph; ;
                                                  


!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: [1]

!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: 

!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: 

!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: (Please type a command or say `end')

!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: ! Incomplete string token has been flushed.
<*> ... n=auto.x: show format("endfor; endgraph; ;
                                                  


!mplib          : mp error: unknown, no error, terminal or log messages
!mplib          : mp terminal: [1]

!mplib          : mp error: unknown, no error, terminal or log messages
fonts           : resetting map file list
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-empty.map}
fonts           : using map file: original-base
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-base.map}
fonts           : using map file: original-ams-base
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
fonts           : using map file: original-ams-euler
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
fonts           : using map file: original-public-lm
{/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map}
fonts           : using map file: lm-math
{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts           : using map file: lm-rm
{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
!pages          : flushing realpage 1, userpage 1, subpage 1
systems         : end file foo.tex at line 10
 )
mkiv lua stats : used config path          - 
/opt/context-minimals/tex/texmf/web2c/texmf.cnf
mkiv lua stats : used cache path           - 
/opt/context-minimals/tex/texmf-cache
mkiv lua stats : input load time           - 0.046 seconds
mkiv lua stats : stored bytecode data      - 204 modules, 49 tables, 253 chunks
mkiv lua stats : loaded tex modules        - 1 requested, 1 found (*-graph), 0 
missing
mkiv lua stats : node list callback tasks  - 6 unique task lists, 4 instances 
(re)created, 273 calls
mkiv lua stats : cleaned up reserved nodes - 24 nodes, 9 lists of 1409
mkiv lua stats : node memory usage         - 19 glue_spec, 1 dir
mkiv lua stats : used backend              - pdf (backend for directly 
generating pdf output)
mkiv lua stats : loaded patterns           - en:us:pat:exc:2
mkiv lua stats : startup time              - 0.698 seconds including runtime 
option file processing
mkiv lua stats : callbacks                 - direct: 404, indirect: 4171, 
total: 4575
mkiv lua stats : lxml preparation time     - 0.000 seconds, 0 nodes, 15 lpath 
calls, 0 cached calls
mkiv lua stats : result saved in file      - foo.pdf
mkiv lua stats : loaded fonts              - 32 files: lmmono12-regular.otf 
lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf 
lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf 
lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf 
lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm 
msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm 
lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm 
rm-lmr9.tfm
mkiv lua stats : fonts load time           - 0.363 seconds 
mkiv lua stats : luatex banner             - this is luatex, version 
beta-0.51.0-2010030618 (rev 3452)
mkiv lua stats : control sequences         - 30066 of 165536
mkiv lua stats : current memory usage      - 41 MB (ctx: 42 MB)
mkiv lua stats : runtime                   - 1.419 seconds, 0 processed pages, 
1 shipped pages, 0.705 pages/second

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

Reply via email to