From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16729 Path: main.gmane.org!not-for-mail From: Maurice Diamantini Newsgroups: gmane.comp.tex.context Subject: Metapost + metaObjet connector label on arcs Date: Wed, 20 Oct 2004 13:57:47 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <426C6168-228F-11D9-9E13-000A9595B57C@ensta.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1098429790 30007 80.91.229.6 (22 Oct 2004 07:23:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Oct 2004 07:23:10 +0000 (UTC) Cc: Maurice Diamantini Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 22 09:22:56 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CKtlI-0007OS-00 for ; Fri, 22 Oct 2004 09:22:56 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 027D1127C5; Fri, 22 Oct 2004 09:22:56 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16265-02; Fri, 22 Oct 2004 09:22:55 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 33712127BD; Fri, 22 Oct 2004 09:22:55 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7820B12792 for ; Wed, 20 Oct 2004 14:00:36 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03481-01-8 for ; Wed, 20 Oct 2004 14:00:35 +0200 (CEST) Original-Received: from ns1.ensta.fr (unknown [147.250.10.1]) by ronja.ntg.nl (Postfix) with ESMTP id A37B812784 for ; Wed, 20 Oct 2004 14:00:35 +0200 (CEST) Original-Received: from localhost (unknown [127.0.0.1]) by ns1.ensta.fr (Postfix) with ESMTP id A77D6313CFE for ; Wed, 20 Oct 2004 13:59:55 +0200 (CEST) Original-Received: from ns1.ensta.fr ([127.0.0.1]) by localhost (ns1.ensta.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 46496-07 for ; Wed, 20 Oct 2004 13:59:54 +0200 (CEST) Original-Received: from ensta.ensta.fr (ensta.ensta.fr [147.250.1.1]) by ns1.ensta.fr (Postfix) with ESMTP id E75BE313CDE for ; Wed, 20 Oct 2004 13:59:53 +0200 (CEST) Original-Received: from [147.250.33.133] (mac-oc1 [147.250.33.133]) by ensta.ensta.fr (8.11.6/9.11.6) with ESMTP id i9KBxr908476; Wed, 20 Oct 2004 13:59:53 +0200 Original-To: mailing ConTeXt users list for X-Mailer: Apple Mail (2.619) X-Virus-Scanned: by amavisd-new at ntg.nl X-Mailman-Approved-At: Fri, 22 Oct 2004 09:22:53 +0200 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16729 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16729 Bonjour =E0 tous, I hope I'm not too much out of topic, but I'm trying to put a metapost figure in a context file. I use a separate file for the figure to keep it independant, (and to avoid cumul of problems :-) The objectif is to build a graph by positionning some node (for now, it is just a circle) connecting them bu some ncarc connector (using metaObj) and the put label onto these arc. I know that one can do that using tree or matrix mataObj feature, but I'd want to be flexible on the node positions, Thank you very much for any help! -- Maurice Diamantini http://www.ensta.fr/~diam %%% START SAMPLE %%%%%%%%%%%%%%%%%%%%%%% input mp-tool ; % some initializations and auxiliary macros input mp-spec ; % macros that support special features input metaobj.mp ; % suffixe non indispensable ? beginfig(1) ; numeric u; u=3D1cm; z0=3D(0u,2u); z1=3D(3u,4u); z2=3D(6u,4u); % ... % I'll have to create my one metaObj (later) % newCircle.a1("") "circmargin(0.3u)"; % label(btex $x^2$ etex, z1); newCircle.a0(btex 0 etex) "circmargin(0.1u)"; newCircle.a1(btex 1 etex) "circmargin(0.1u)"; newCircle.a2(btex 2 etex) "circmargin(0.1u)"; a0.c =3D z0; a1.c =3D z1; a2.c =3D z2; % Question: how can I put a label on this arc??? ncarc(a0)(a1) "name(nc01)"; % The following doesn't work ! % ObjLabel.nc01(btex 0 etex) "labpos(0.75)", % "labdir(top)"; drawObj(a0,a1,a2,a3,a4,a5,a6); endfig ; end . %%% END SAMPLE %%%%%%%%%%%%%%%%%%%%%%%=