ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Tarik Kara <ktarik@Bilkent.EDU.TR>
Cc: ntg-context@ntg.nl
Subject: Re: Labeling a tree with MetaObj.
Date: Tue, 3 Jul 2001 00:13:32 +0300 (EET DST)	[thread overview]
Message-ID: <Pine.GSO.4.05.10107022358090.22357-100000@sumak> (raw)
In-Reply-To: <20010702212300.A13559@bar.loria.fr>

Thank you very much for the nice package and the answer to my problem. 
One small comment:  It would be nice if one could also use 

 ObjLabel.ntreepos(Obj(t))(btex $o$ etex) "labpathid(1)","labdir(lft)";

In addition to

 ObjLabel.Obj(t)(btex $o$ etex) "labpathid(1)", "labdir(lft)";

Just for the sake of symmetry between a tree and its subtrees: The same
idea as to get the "treeroot" function to work with an empty argument.

Thanks again. I loved the package. Looking forward to see what Hans will
do about the interface (though I am still having problems with using
ConText)

Tar{\i}k

On Mon, 2 Jul 2001, Denis B. Roegel wrote:

> 
> Below is a solution. I didn't bother to get the same dimensions
> as you, though.
> 
> I have used the (unfortunately) undocumented treeroot macro, which I should
> actually extend a bit.
> 
> I know this solution looks complex and that's why a TeX (or ConTeXt) interface
> is really needed! :-)
> 
> Feel free to post other queries. I'll use them for the next version
> of the metaobj manual. However, I am not sure everybody is interested
> in this group, so it might be a better idea to post the questions
> on the metafont/metapost mailing list, even though I doubt anybody else
> than I will answer for some time...
> 
> Denis
> 
> % Example requested by Tarik Kara.
> % A useful inspiration was the figure on page 109 of the metaobj manual.
> % D. Roegel, 2 July 2001
> input metaobj
> 
> setCurveDefaultOption("arrows","draw");
> setObjectDefaultOption("Tree")("hideleaves")(true);
> 
> def mytc=new_Circle_("")("filled(true)") enddef;
> 
> labeloffset:=2bp; % 3bp is the default in plain.mp 
> 
> beginfig(1);
>   t:=T_(mytc)(mytc,T_(mytc)(mytc,mytc)("hbsep(2cm)"))("hbsep(2cm)");
>   Obj(t).c=origin;
>   % |ObjLabel| should appear after an object is positionned (this is not
>   % clearly stated in the manual); one can always move the object afterwards;
>   % this constraint appears when |ObjLabel| is used on subtrees, since
>   % |ObjLabel| temporarily attaches the object; when it unties it, links
>   % to the embedding object(s) are lost.
>   ObjLabel.ntreepos(Obj(t))(1)(btex $(0,2)$ etex) "labcard(s)";
>   ObjLabel.ntreepos(Obj(t))(2,1)(btex $(-1,0)$ etex) "labcard(s)";
>   ObjLabel.ntreepos(Obj(t))(2,2)(btex $(1,1)$ etex) "labcard(s)";
>   % the |treeroot| function should also work for an empty second argument,
>   % but this is currently not the case, so one has to use |obj| and |root|
>   % in order to dig into the object; it will be corrected in the next version
>   % of metaobj.
>   ObjLabel.obj(Obj(t)root)(btex $1$ etex) "labcard(n)";
>   ObjLabel.treeroot(Obj(t))(2)(btex $2$ etex) "labcard(ne)";
>   ObjLabel.Obj(t)(btex $o$ etex) "labpathid(1)", "labdir(lft)";
>   ObjLabel.Obj(t)(btex $e$ etex) "labpathid(2)", "labdir(rt)";
>   ObjLabel.ntreepos(Obj(t))(2)(btex $f$ etex) "labpathid(1)", "labdir(lft)";
>   ObjLabel.ntreepos(Obj(t))(2)(btex $a$ etex) "labpathid(2)", "labdir(rt)";
>   draw_Obj(t);
> endfig;
> 
> end
> 


  reply	other threads:[~2001-07-02 21:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-30 11:41 Problem to create PDF File Karsten Hachmeister
2001-06-30 12:09 ` Berend de Boer
2001-06-30 14:28   ` Karsten Hachmeister
2001-06-30 17:21     ` Re[2]: " Giuseppe Bilotta
2001-07-02  8:11       ` Labeling a tree with MetaObj Tarik Kara
2001-07-02  8:15         ` Hans Hagen
2001-07-02 19:23         ` Denis B. Roegel
2001-07-02 21:13           ` Tarik Kara [this message]
2001-07-02 21:27             ` Denis B. Roegel

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=Pine.GSO.4.05.10107022358090.22357-100000@sumak \
    --to=ktarik@bilkent.edu.tr \
    --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).