From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26217 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: metafun "boxes" Date: Thu, 2 Mar 2006 16:12:11 -0500 (EST) Message-ID: References: <44074A5A.5030001@nibua-r.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1141333956 17226 80.91.229.2 (2 Mar 2006 21:12:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Mar 2006 21:12:36 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 02 22:12:34 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FEv64-0002od-0V for gctc-ntg-context-518@m.gmane.org; Thu, 02 Mar 2006 22:12:28 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5BAAB12772; Thu, 2 Mar 2006 22:12:27 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08428-04; Thu, 2 Mar 2006 22:12:22 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A86E31277F; Thu, 2 Mar 2006 22:12:22 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 53FA61277F for ; Thu, 2 Mar 2006 22:12:21 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08430-03 for ; Thu, 2 Mar 2006 22:12:19 +0100 (CET) Original-Received: from playinggod.mr.itd.umich.edu (playinggod.mr.itd.umich.edu [141.211.14.79]) by ronja.ntg.nl (Postfix) with SMTP id 0623512772 for ; Thu, 2 Mar 2006 22:12:18 +0100 (CET) Original-Received: from aditya.annarb01.mi.comcast.net (c-68-40-50-205.hsd1.mi.comcast.net [68.40.50.205]) by playinggod.mr.itd.umich.edu (smtp) with ESMTP id k22LCBt6015522 for ; Thu, 2 Mar 2006 16:12:17 -0500 Original-To: mailing list for ConTeXt users In-Reply-To: <44074A5A.5030001@nibua-r.org> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:26217 Archived-At: <--- 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=3D3cm, align=3Dcenter, frame=3Doff] \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=3Dfalse newEllipse.N1(btex \framed{Mise Sous Tension} etex) ; newEllipse.N2(btex \framed{Mesure du point z=E9ro m=E9chaique} etex) ; newEllipse.N3(btex \framed{R=E9galage des param=E8ters de contr=F4le} et= ex) ; newEllipse.N4(btex \framed{Envoi du contenu de l'\cap{EEPROM}} etex) ; newEllipse.N5(btex \framed{{\bf Mode stop|/| r=E9glage} 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=E9} etex= ) ; newEllipse.N8(btex \framed{=CBcriture du contenu de la \cap{RAM} vers l'\cap{EEPROM}} etex); newEllipse.N9(btex \framed{{\bf Mode Contr=F4le} La valeur de la commande est rafra=EEchie =E0 chaque cycle} etex) ; newMatrix.diagram(3,3)(N1,N2,N3,N4,N5,N6,N7,N8,N9) "hsep(1.5cm)", "vsep(1.5cm)"; diagram.c =3D origin ; drawObj(diagram) ; ncline(N1)(N5) ; for i =3D 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