On 23.01.2011 12:40, Stefan Müller wrote:
On 22.01.2011 17:30, Aditya Mahajan wrote:
On Sat, 22 Jan 2011, Stefan Müller wrote:

So its either using text or using metaobj? Too bad, metaobj is quite
fun... I still hope you guys can fix this, but it's not urgent (to me).

Anyway, what does the [+] after \startMPinclusions? I did not find
documentation for that on the wiki.

\startMPinclusions
path a ;
\stopMPinclusions

\startMPinclusions
a := (0,0) -- (1cm,0) ;
\stopMPinclusions

will fail, because the second inclusions overwrites the first. If you
use [+], then the second inclusions in appended after the first.

Thank you for the explanation. So if I only have one "inclusions
section" it doesn't matter?

Just as a wild guess I tested the example below today, trying to make
use of the things Aditya said, but to no avail.

The trick is to ensure that the offending code (assignObj) is not run
twice.

Your example works perfect. Many thanks for that as well. I didn't
realize, that assignObj is causing the trouble, but now it's obvious.
I'm just curious: the MP-code is only run twice by context if it
contains labels, right? Otherwise I don't understand why the assignObj
isn't always failing.

Sorry for double posting... The method with "if not flag" is a bit arkward, because assignObj isn't the only problem. "rotateObj(s, 90)" would rotate the object 180 degrees instead of 90; when defining the relation between several objects some equations may became redundant (my script is rather complex and I'm not sure why some of the equations cause trouble).

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