Re: [NTG-context] metaobj and luatex 0.42.0
Hi Matthijs, Thank you for your two follow ups to my original question. Both of the techniques you suggested also work for me, so I'm able to continue now. Cheers, Matt ___ 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] metaobj and luatex 0.42.0
Hi Matthew, However, I've found that cleaning up your objects when you're done pretty much solves all my problems. For example, just add a clearObj line to your code makes it work for me: I've found that using save to declare the values as local also works. For example: \startMPinclusions input metaobj; \stopMPinclusions \starttext \startMPpage save a; newBox.a(\sometxt{hello world}); a.c = origin; drawObj(a); \stopMPpage \stoptext Perhaps this is even slightly more elegant. 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] metaobj and luatex 0.42.0
Hi Matthew, I've been playing with metaobj and luatex 0.43 for a bit, and faced similar problems. Lots of stuff about redundant equations and other stuff I didn't understand. However, I've found that cleaning up your objects when you're done pretty much solves all my problems. For example, just add a clearObj line to your code makes it work for me: \startMPinclusions input metaobj; \stopMPinclusions \starttext \startMPpage newBox.a(\sometxt{hello world}); a.c = origin; drawObj(a); clearObj a; \stopMPpage \stoptext I'm not completely sure why this is clearObj a (and not clearObj(a), which seems to be more logical considering drawObj also takes parentheses), but that's probably something of the wonderful world of macro programming. Hope this helps, 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 ___
[NTG-context] metaobj and luatex 0.42.0
Hello everyone, First, thanks for making this list such a great resource. I've installed a fresh minimals on windows using first-setup.bat. This seems to have installed luatex 0.40.6 which led to errors making the formats (message indicated at least 0.42 was needed). I think the presence of the older luatex version for windows was recently noted on another thread. So, I installed 0.42.0 and remade the formats. This minimal example works with texexec example.tex but fails with context example.tex. \startMPinclusions input metaobj; \stopMPinclusions \starttext \startMPpage newBox.a(\sometxt{hello world}); a.c = origin; drawObj(a); \stopMPpage \stoptext Is this expected to work (I realize the 0.42.0 is very new) Am I doing something wrong? Thanks very much for any assistance, Matt C:\wk\texcontext example.tex MTXrun | run 1: luatex --fmt=C:/wk/cm/context/tex/texmf-cache/luatex-cache/cont ext/e8705fc03b81c76af2e2d42634ded96b/formats/cont-en --lua=C:/wk/cm/context/te x/texmf-cache/luatex-cache/context/e8705fc03b81c76af2e2d42634ded96b/formats/cont -en.lui --backend=pdf ./example.tex This is LuaTeX, Version beta-0.42.0-2009071712 \write18 enabled. (example.tex ConTeXt ver: 2009.07.23 20:11 MKIV fmt: 2009.8.6 int: english/english system : cont-new loaded (C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (C:/wk/cm/context/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (C:/wk/cm/context/tex/texmf-context/tex/context/user/cont-sys.rme (C:/wk/cm/cont ext/tex/texmf-context/tex/context/base/type-tmf.tex (C:/wk/cm/context/tex/texmf- context/tex/context/base/type-tmf.mkiv)) (C:/wk/cm/context/tex/texmf-context/tex /context/base/type-siz.tex (C:/wk/cm/context/tex/texmf-context/tex/context/base/ type-siz.mkiv)) (C:/wk/cm/context/tex/texmf-context/tex/context/base/type-otf.te x (C:/wk/cm/context/tex/texmf-context/tex/context/base/type-otf.mkiv))) system : example.top loaded (example.top) fonts : preloading latin modern fonts bodyfont : 12pt rm is loaded language : language en is active systems : begin file example at line 5 mplib : initializing instance 'metafun' using format 'metafun' mplib : loading 'metafun.mp' from 'C:/wk/cm/context/tex/texmf-cache/lu atex-cache/context/e8705fc03b81c76af2e2d42634ded96b/formats/cont-en-metafun.mem' mplib | mp terminal: (C:/wk/cm/context/tex/texmf/metapost/metaobj/metaobj.mp) ! Inconsistent equation (off by 1). to be read again ; assignObj-(SUFFIX0)=incr(nObj_); iname_[(SUFFIX0)]=str(SUFFIX0);addclass_((S... newBox-...2))((TEXT4));assignObj((SUFFIX2),Box) ;StandardInterface;Standar... to be read again ; * ...j.mp; newBox.a(textext.drt(hello world)); a.c = origin; drawObj(a); ; ! Redundant equation. to be read again ; assignObj-...bj_);iname_[(SUFFIX0)]=str(SUFFIX0); addclass_((SUFFIX0),(EXPR1... ... ___ 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] metaobj and luatex 0.42.0
Taco Hoekwater wrote: Matthew Claus wrote: This minimal example works with texexec example.tex but fails with context example.tex. \startMPinclusions input metaobj; \stopMPinclusions \starttext \startMPpage newBox.a(\sometxt{hello world}); a.c = origin; drawObj(a); \stopMPpage \stoptext Is this expected to work (I realize the 0.42.0 is very new) I am not surprised it fails. Most metapost code in mkiv is run at least twice for some reason, and so equations tend to fail. You could try with \startMPpage newBox.a(\sometxt{hello world}); a.c := origin; drawObj(a); \stopMPpage but even then it depends on what newBox does internally. in general one needs to keep in mind that we're in one run, so even in the case of 'single runs' things can bleed from one to the other graphic; one should set up graphics as independent as possible 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 - ___ 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] metaobj and luatex 0.42.0
Thank you Taco and Hans for the very quick explanation. Regards, Matt ___ 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 ___