ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost + metaObjet connector label on arcs
@ 2004-10-20 11:57 Maurice Diamantini
  2004-10-22 12:24 ` Eckhart Guthöhrlein
  0 siblings, 1 reply; 9+ messages in thread
From: Maurice Diamantini @ 2004-10-20 11:57 UTC (permalink / raw)
  Cc: Maurice Diamantini

Bonjour à 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=1cm;

     z0=(0u,2u);
     z1=(3u,4u);
     z2=(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 = z0;
     a1.c = z1;
     a2.c = 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 %%%%%%%%%%%%%%%%%%%%%%%

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-10-27 13:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 11:57 Metapost + metaObjet connector label on arcs Maurice Diamantini
2004-10-22 12:24 ` Eckhart Guthöhrlein
2004-10-22 16:35   ` Maurice Diamantini
2004-10-24 18:30     ` Denis Roegel
2004-10-26 11:34       ` Maurice Diamantini
2004-10-26 11:53         ` Hans Hagen
2004-10-26 16:16           ` Maurice Diamantini
2004-10-27  7:23             ` Hans Hagen
2004-10-27 13:20               ` Metapost installation Maurice Diamantini

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