ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Eckhart Guthöhrlein" <eckhart.guthoehrlein@uni-bielefeld.de>
Subject: Re: Metapost + metaObjet connector label on arcs
Date: Fri, 22 Oct 2004 14:24:46 +0200	[thread overview]
Message-ID: <20041022122446.GC23718@cebitec.uni-bielefeld.de> (raw)
In-Reply-To: <426C6168-228F-11D9-9E13-000A9595B57C@ensta.fr>

On Wed, Oct 20, 2004 at 01:57:47PM +0200, Maurice Diamantini wrote:
> 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,

You can attach named paths to objects and then labels these. Here is my
first try, seems to work:

\startMPinclusions
	input metaobj;
\stopMPinclusions
\startreusableMPgraphic{labeltest}
		newCircle.a(btex A etex);
		newCircle.b(btex B etex);
		a.c=origin;
		b.c=a.c+(1cm,2cm);
		ncline.b(a)(b) "name(ab)";
		ObjLabel.b(btex $a\rightarrow b$ etex) "labpathname(ab)",
			"labangle(0)";
		drawObj(a,b);
\stopreusableMPgraphic
\starttext
	\reuseMPgraphic{labeltest}
\stoptext

For more options for labels, see page 54ff of the metaobj manual.

Greetings,
Eckhart

  reply	other threads:[~2004-10-22 12:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 11:57 Maurice Diamantini
2004-10-22 12:24 ` Eckhart Guthöhrlein [this message]
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=20041022122446.GC23718@cebitec.uni-bielefeld.de \
    --to=eckhart.guthoehrlein@uni-bielefeld.de \
    --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).