ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Re: Animations in ConTeXt
Date: Tue, 24 May 2005 23:52:27 +0200	[thread overview]
Message-ID: <4293A21B.8020101@wxs.nl> (raw)
In-Reply-To: <6faad9f0050524105874409ba4@mail.gmail.com>

Mojca Miklavec wrote:

> \newcount\angle
> \angle=0
> \definesymbol
>     [star \the\angle]
>     [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]
> \advance\angle by 6
> \definesymbol
>     [star \the\angle]
>     [\uniqueMPgraphic{drawstar}{rotation=\the\angle}]
> 
> This should define two symbols, \symbol[star 0] and \symbol[star 6].
> It did, but "rotation=\the\angle" resulted in "6" in both cases (the
> last value), so we get two identical pictures. \the\angle can be
> replaced manually by 0/6/12/... but that's not the point.

> Can anyone find the reason for problems? 

\definesymbol[whatever][something which is expanded at the time of invocation



\newcount\angle % dangerous command, better use MyAngle or so

\expanded
   {\definesymbol
      [star \number\angle]
      [\noexpand\uniqueMPgraphic{drawstar}{rotation=\number\angle}]

\advance\angle by 6

\expanded
   {\definesymbol
      [star \number\angle]
      [\noexpand\uniqueMPgraphic{drawstar}{rotation=\number\angle}]

ugly but needed

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

      reply	other threads:[~2005-05-24 21:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-22 10:19 Richard Hirsch
2005-05-23 17:54 ` Willi Egger
2005-05-24 18:07   ` Mojca Miklavec
2005-05-25 15:32     ` Willi Egger
2005-07-07 15:51     ` Hans Hagen
2005-07-07 16:11       ` Hans Hagen
2005-07-07 21:02       ` Mojca Miklavec
2005-07-07 21:33         ` Hans Hagen
2005-07-08  6:02           ` luigi.scarso
2005-05-24 17:58 ` Mojca Miklavec
2005-05-24 21:52   ` Hans Hagen [this message]

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=4293A21B.8020101@wxs.nl \
    --to=pragma@wxs.nl \
    --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).