From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: Re: Animations in ConTeXt
Date: Tue, 24 May 2005 19:58:48 +0200 [thread overview]
Message-ID: <6faad9f0050524105874409ba4@mail.gmail.com> (raw)
In-Reply-To: <1116757157.13109.9.camel@drr.elaphus>
On 5/22/05, Richard Hirsch <richard.hirsch@gmx.net> wrote:
>
> Of course you would want to put the symbol definitions and the
> definition of the fieldstack into a loop. I tried
> %% \newcount\angle
> %% \angle=0%\zerocount
> %% \dorecurse{12} {%
> %% \number\angle:\qquad
> %% \definestarsymbol{\the\angle}
> %% \symbol[star \number\angle]\par
> %% \advance\angle by 6}
> and did get the single symbols. I wasn't successful however in putting
> the symbol list of the fieldstack definition into a loop. Perhaps the
> ConTeXt gurus can help.
I discovered some possible sources of problems, but didn't manage to solve them.
I changed this part of code (just for debugging reasons):
\startuniqueMPgraphic{drawstar}{rotation}
draw thestar rotated \MPvar{rotation};
% this line was added
label("\MPvar{rotation}", origin);
\stopuniqueMPgraphic
Problem N. #1:
--------------
Consider now the following definition:
\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.
????
Problem N. #2:
--------------
Instead of writing
\definestarsymbol{0}
\definestarsymbol{6}
\definestarsymbol{12}
...
I tried to use:
\newcount\angle
{\angle=0\loop\ifnum\angle<67%
\definesymbol
[star \the\angle]
[{\uniqueMPgraphic{drawstar}{rotation=0}}]
Defining symbol \the\angle \dots\crlf
\advance\angle by 6
\repeat}
Because of some unknown reason \symbol[star 0], ... cannot be recalled at all.
Can anyone find the reason for problems?
I had very similiar problems when trying to add \loop\ifnum...\repeat
to the example in http://www.fi.muni.cz/~xholecek/animations/, which
is written in plain TeX anyway.
Mojca
next prev parent reply other threads:[~2005-05-24 17:58 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 [this message]
2005-05-24 21:52 ` Hans Hagen
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=6faad9f0050524105874409ba4@mail.gmail.com \
--to=mojca.miklavec.lists@gmail.com \
--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).