ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Maurice Diamantini <Maurice.Diamantini@ensta.fr>
Cc: Maurice Diamantini <Maurice.Diamantini@ensta.fr>
Subject: Metapost + metaObjet connector label on arcs
Date: Wed, 20 Oct 2004 13:57:47 +0200	[thread overview]
Message-ID: <426C6168-228F-11D9-9E13-000A9595B57C@ensta.fr> (raw)

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 %%%%%%%%%%%%%%%%%%%%%%%

             reply	other threads:[~2004-10-20 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 11:57 Maurice Diamantini [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=426C6168-228F-11D9-9E13-000A9595B57C@ensta.fr \
    --to=maurice.diamantini@ensta.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).