ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* metaobj and luatex 0.42.0
@ 2009-08-06 18:58 Matthew Claus
  2009-08-06 20:01 ` Taco Hoekwater
  2009-09-16 15:50 ` Matthijs Kooijman
  0 siblings, 2 replies; 7+ messages in thread
From: Matthew Claus @ 2009-08-06 18:58 UTC (permalink / raw)
  To: ntg-context

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\tex>context 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
___________________________________________________________________________________


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

* Re: metaobj and luatex 0.42.0
  2009-08-06 18:58 metaobj and luatex 0.42.0 Matthew Claus
@ 2009-08-06 20:01 ` Taco Hoekwater
  2009-08-06 20:13   ` Hans Hagen
  2009-09-16 15:50 ` Matthijs Kooijman
  1 sibling, 1 reply; 7+ messages in thread
From: Taco Hoekwater @ 2009-08-06 20:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: metaobj and luatex 0.42.0
  2009-08-06 20:01 ` Taco Hoekwater
@ 2009-08-06 20:13   ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2009-08-06 20:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: metaobj and luatex 0.42.0
  2009-08-06 18:58 metaobj and luatex 0.42.0 Matthew Claus
  2009-08-06 20:01 ` Taco Hoekwater
@ 2009-09-16 15:50 ` Matthijs Kooijman
  2009-09-23 13:48   ` Matthijs Kooijman
  1 sibling, 1 reply; 7+ messages in thread
From: Matthijs Kooijman @ 2009-09-16 15:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 815 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

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

* Re: metaobj and luatex 0.42.0
  2009-09-16 15:50 ` Matthijs Kooijman
@ 2009-09-23 13:48   ` Matthijs Kooijman
  0 siblings, 0 replies; 7+ messages in thread
From: Matthijs Kooijman @ 2009-09-23 13:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 563 bytes --]

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

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

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

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

* Re: metaobj and luatex 0.42.0
       [not found] <mailman.1787.1253116667.3069.ntg-context@ntg.nl>
@ 2009-09-24 16:00 ` Matt Claus
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Claus @ 2009-09-24 16:00 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


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

* Re: metaobj and luatex 0.42.0
       [not found] <mailman.962.1249593619.3069.ntg-context@ntg.nl>
@ 2009-08-07  3:57 ` Matthew Claus
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Claus @ 2009-08-07  3:57 UTC (permalink / raw)
  To: ntg-context


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
___________________________________________________________________________________


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

end of thread, other threads:[~2009-09-24 16:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-06 18:58 metaobj and luatex 0.42.0 Matthew Claus
2009-08-06 20:01 ` Taco Hoekwater
2009-08-06 20:13   ` Hans Hagen
2009-09-16 15:50 ` Matthijs Kooijman
2009-09-23 13:48   ` Matthijs Kooijman
     [not found] <mailman.962.1249593619.3069.ntg-context@ntg.nl>
2009-08-07  3:57 ` Matthew Claus
     [not found] <mailman.1787.1253116667.3069.ntg-context@ntg.nl>
2009-09-24 16:00 ` Matt Claus

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