ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MetaObj with labels in built-in objects (MetaObj Standard Library)
@ 2011-09-20 13:25 Stefan Müller
  0 siblings, 0 replies; only message in thread
From: Stefan Müller @ 2011-09-20 13:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi list,

some time ago I posted on this list about problems with MetaObj in 
ConTeXt when using labels.  There's a wiki article about this now [1]. 
Just recently I was forced to notice that this solution does not work 
when the label to be drawn is part of the object definition.  So the 
example from [1] works fine with the added boolean flag, but the 
following example (which means basically all built-in MetaObj objects 
with text) does not.  It compiles well but there is no text.

--8<--------------------start--------------------8<--
\startMPinclusions[+]
	input metaobj;
	boolean firstrun; firstrun := true;
\stopMPinclusions

\startMPpage
	if firstrun:
		newBox.a(\sometxt{Text});
		a.c = origin;
	fi;
	drawObj(a);
	firstrun := false;
\stopMPpage
-->8--------------------stop-------------------->8--

I'm out of ideas how to fix this.  I tried putting the text into a 
separate pictrue variable and use this in "newBox".  In addition, I 
thought it should be possible to modify metaobj.mp to check for a 
boolean variable (e.g. "firstrun") and let the macros there react to its 
value accordingly , but I always got either no text or errors.

I can draw the picture I wanted to get in the first place with plain 
MetaFun, but I thought MetaObj would be even more "fun".  Now I'm very 
curious if someone on this list can come up with something.  I think it 
would be great if MetaObj could be fully used within ConTeXt.

Thanks in advance for taking the time to think about this and any hints!
Kind regards,
Stefan.


[1] http://wiki.contextgarden.net/MetaObj_and_Labels
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-09-20 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 13:25 MetaObj with labels in built-in objects (MetaObj Standard Library) Stefan Müller

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