lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: another lout label diag problem


From: Valeriy E. Ushakov
Subject: Re: another lout label diag problem
Date: Tue, 9 Jan 2001 20:44:08 +0300
User-agent: Mutt/1.3.3i

Hi, Basile.

I'm cc'ing to the list, as I think this issue is of general interest.


On Tue, Jan 09, 2001 at 15:01:44 +0100, STARYNKEVITCH Basile wrote:

> I did re-read the Lout user manual (9.4 tags) again, but still do
> not fully understand what should be labels in diags.

As the very first sentence in 9.4 says (emphasis mine):

| In addition to drawing the outline, EACH of the standard NODE types
| also ATTACHES names, called TAGS, to certain points.

The crucial point here is that tags are created only by nodes.
Retagging just renames existing tags, it won't create any tags on its
own.

> tbl :: @Tbl
[...]
>   @Rowa 
>     A { esp :: @F "%esp" } 
[...]


In this case esp:: would rename any nested tags, but since there's no
node(s) in the right parameter of :: retagging operator, this
retagging is effectively a no-op.

Use, e.g, this sample convenience macro

    import @Diag
    macro @NoNode { @Node outlinestyle { noline } }

and then write:

    A { esp :: @NoNode @F "%esp" }

and esp:: will name the anchor points of the node as you expect.



> I tried several combinations of the commented @Arrow but none
> works...
>
> # @Arrow from address@hidden  to address@hidden@vloc}

Each node implicitely retags its content with "IN", so

    address@hidden@vloc

should really be

    address@hidden@address@hidden@vloc

tbl  - outer tag
IN   - descend into @CurveBox in cell B
ba   - tag on nested @Box
IN   - descend into nested @Box
vloc - tag on contents

And of course you need a @NoNode for vloc:: too.

Also note that the source of the link is "address@hidden", without(!)  the
"IN" tag, since there's no node on the path down from "tbl" to "esp".

Thus your arrow should be

    @Arrow from address@hidden to address@hidden@address@hidden@vloc}



And to add some interesting twist, @Link create tags too and you can
retag them for fun and profit.  E.g.

    a:: @Arrow from address@hidden  to address@hidden@address@hidden@vloc}
    b:: @Arrow from address@hidden@address@hidden to 
address@hidden@address@hidden
    @Arrow from address@hidden to address@hidden


To sum it up:

. only @Node and @Link create tags (see 9.12 for complete list)

. retagging <tag> :: only renames exisiting tags in its scope by
  preixing their names with <tag>@ - it does NOT create any new tags.

. @Node retags its content with "IN" tag.

. to figure the fully qualified name of the tag - go down the
  hierarchy and add (using "@" as a separator) <tag> for each
  retagging symbol and "IN" each time you descend into a @Node.

. note well that for foo:: @Node { ... } both rules should be applied,
  thus you should add "address@hidden" in this case

. just to make it clear, the "IN" tag only retags content of the node,
  not the node's own tags, thus to refer to foo:: @Node { ... } itself
  you should use "foo" or "address@hidden" etc. for specific points.


When in doubt, try adding

    { "ldiagtoptagdict { pop == } forall flush" } @Graphic {}

to see the list of currently known tags on the stdout of the ps
interpreter (under win32, pressing 'm' in gsview will show it).  The
most useful place to invoke it is, perhaps, at the very end of @Diag,
when all the tags has been propagated to the top-level tag dictionary.


Hope this helps.

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]