[NTG-context] Labels in MetaPost (MetaObj)

Stefan Müller warrence.stm at gmx.de
Sun Jan 23 12:40:39 CET 2011

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.

> @Hans, can we have a `trialtypesetting` for MP code?
> Aditya


More information about the ntg-context mailing list