<--- On Mar 2, Renaud AUBIN wrote ---> > > Hi all, > > Yesterday, I have tried to put "\input boxes" within a MPgraphic. As a > result, I obtain errors at compilation. After discussing this issue with > Taco on #context, it appears that boxes.mp and metafun interaction is > not safe at all.
Shouldn't that be input boxes; in a MPinclusions? > X. others solutions I don't know yet... (feel free to add yours !) Have a look at metaobj. > My thought is to finally obtain in metafun: > 1. Nodes with text (multiline text!) Place inside a framed > and a collection of "simple" shapes to use like box, circle, box > with rounded corner... Metaobj provides all basic shapes > 2. Nodes must be placed freely accroding to the metapost coordinate > system Metaobj provides a better interface to placement. You can specify the distance and alignment between the nodes. > 3. Connections between nodes (using boundaries of each nodes + > possibility to give angles from...to for each connections) Has all of that > See http://renolab.lrv.uvsq.fr/perso/ConTeXt/sample.png to have an idea See the example below. metaobj has some bugs and limitations, but works as expected most of the time. \starttext \startMPenvironment \setupbodyfont[8pt] \setupframed[width=3cm, align=center, frame=off] \stopMPenvironment \startMPinclusions input metaobj; setObjectDefaultOption("Ellipse")("fit")(false) setCurveDefaultOption("arcangleA",15); setCurveDefaultOption("arcangleB",15); \stopMPinclusions \startMPpage % Metaobj provides a Circle command. But there seems to be % a bug in the interaction of Circle and Matix. So using Ellipse with % fit=false newEllipse.N1(btex \framed{Mise Sous Tension} etex) ; newEllipse.N2(btex \framed{Mesure du point zéro méchaique} etex) ; newEllipse.N3(btex \framed{Régalage des paramèters de contrôle} etex) ; newEllipse.N4(btex \framed{Envoi du contenu de l'\cap{EEPROM}} etex) ; newEllipse.N5(btex \framed{{\bf Mode stop|/| réglage} Attente de commande} etex) ; newEllipse.N6(btex \framed{\bf Mode freins libres} etex) ; newEllipse.N7(btex \framed{Le contenu de l'\cap{EEPROM} a changé} etex) ; newEllipse.N8(btex \framed{Ëcriture du contenu de la \cap{RAM} vers l'\cap{EEPROM}} etex); newEllipse.N9(btex \framed{{\bf Mode Contrôle} La valeur de la commande est rafraîchie à chaque cycle} etex) ; newMatrix.diagram(3,3)(N1,N2,N3,N4,N5,N6,N7,N8,N9) "hsep(1.5cm)", "vsep(1.5cm)"; diagram.c = origin ; drawObj(diagram) ; ncline(N1)(N5) ; for i = 2,3,4,6,7,8,9: ncarc(N[i])(N[5]) ; ncarc(N[5])(N[i]) ; endfor nccircle(N6) "angleA(-120)" ; nccircle(N9) "angleA(-120)" ; % Labels can be added. See metaobj manual \stopMPpage \stoptext -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context