ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Beginnner's question: fumbling with font finding failures.
       [not found] <20050330203818.ADE29128CA@ronja.ntg.nl>
@ 2005-03-31  1:48 ` Paul R Martin
  2005-03-31 11:53   ` Thomas A.Schmitz
  0 siblings, 1 reply; 23+ messages in thread
From: Paul R Martin @ 2005-03-31  1:48 UTC (permalink / raw)



Dear ConTeXters,

I'm a newcomer to ConTeXt and to this congenial and obviously active  
list:  please bear with me and read my story. I'll be much more  
succinct in future.

Last week, I installed TeTex and ConTeXt [Mac OS X 10.3 "Panther"]. I'm  
working my way through the "Excursion" and "This Way/ My Way"  
documents. They are great documents, ConTeXt is a great  package, and  
I've had some timely tips from Hans Hagen (Hail thee, Hans!). I've made  
some good progress. I have learned the difference between a  _Hasselter  
juffer_ and a _Hasselter bitter_, but I'm still not sure what one does  
with a _foekepot_. I suspect that it's a percussion instrument, but  
that's beside the point.

I have a history of user-level LaTeX formatting in my distant past.  
I've mostly been stuck in the dark, ragged, dreary, world of MS Office  
for the past decade, so you can understand my joy to see beautiful,  
colourful .pdf pages rolling up my screen, as a result of typing  
straightforward, comprehensible formatting commands in a plain text  
ascii file. As my fellow Australians would say: ** You little ripper!  
**

Now, I've managed to side-step some menacing signs of absent fonts as I  
progressed. My goals are straightforward (technical documentation and  
scientific writing), so I've been happy to accept the font  
fallback/replacement routines. Further, my glimpses into the pages and  
pages of information about font handling make me think that it's a kind  
of bad neighbourhood for a person like me to enter, just as it was when  
TeX and I were young.

But now I've struck the following blockade in my quest to produce a 'My  
Way' document, which I did by simply

	1) cutting and pasting the source code from the page 3 of My Way #0  
[mag-0000.pdf]
	2) changing the author name, and
	3) saving the resultant text as [mwy-000-Test.tex],  then
	4) running the perl "texexec" script on it.

OK, don't snicker, it may not be such a silly thing to try. I'm sure  
there are other people who might try this kind of approach. Here is the  
gist of the result -- ellipses mark my deletions.

------------------------------START---------------------------

[nvri-hayden:~/Documents/ConTEXt/MyWay] paulm% texexec --color --pdf  
mwy-000-Test

  TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005

...

system          : macros of module mag-01 loaded

...

(/usr/local/teTeX/share/texmf.tetex/tex/context/base/type- 
akb.tex)kpathsea: Running mktextfm uplr8t
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1;  
nonstopmode; input uplr8t
This is METAFONT, Version 2.71828 (Web2C 7.5.3)

kpathsea: Running mktexmf uplr8t
! I can't find file `uplr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input uplr8t

Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input uplr8t

Transcript written on mfput.log.
grep: uplr8t.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode;  
input uplr8t' failed to make uplr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.

...

! Font \*palatino12ptrmtf*:=uplr8t at 12.0pt not loadable: Metric (TFM)  
file no
t found.

...

---------------------------------------------FINISH-------------------

[etc etc, I think that 'nonstopmode' might have been why this loop  
continued for the next 120 seconds. BTW I typed 'Q' in response to the  
input file name request  above].

Now, it's obvious from the ContextGarden that I've probably missed some  
step in font configuration. But when I start to look in the numerous  
sources of advice, I strike the usual frustration. There are lots of  
statements (lots and lots of 'em!) about checking and un-commenting and  
configuring, but I can find no list of *prioritised* things for  
beginners to try, in the order which they should be tried, in order to  
solve what looks to be a simple and typical problem. Without such a set  
of instructions, I'm loath to change anything in my configuration, for  
fear that the cure might be worse than the disease.

I'd love to try to understand the source of the error, and how to  
handle fonts professionally, and lots of other things as well. But I'm  
a busy scientist with many other commitments. As long as ConText is  
working I'm happy, but  I can't devote much time to delving into  
errors. So I may not be a typical participant in this list. But if you  
help me,  you will help to make ConTeXt more accessible to others like  
me, and this will be good for the cause, _nes pas?_  I'd be happy to  
write a my way document or contribute a Wiki page on this topic to  
encapsulate any good advice for myself and other neophytes.

Yours,

P.

Paul R Martin
National Vision Research Institute of Australia
Tel: +613 9349 7481
prmartin@unimelb.edu.au

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beginnner's question: fumbling with font finding failures.
  2005-03-31  1:48 ` Beginnner's question: fumbling with font finding failures Paul R Martin
@ 2005-03-31 11:53   ` Thomas A.Schmitz
  2005-03-31 12:21     ` Otared Kavian
                       ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Thomas A.Schmitz @ 2005-03-31 11:53 UTC (permalink / raw)


Glad you're enjoying your ConTeXt experience. Believe me: it's a great  
macro package, and it will grow on you.

To answer your question:  What you did is basically correct, however,  
there is a tiny mistake in the code in s-mag01.tex. The font  
declaration doesn't work out of the box with a current TeX distribution  
(I have lost track of all the changes in TDS etc. during the last  
months). I used the module a few days ago and meant to write a note to  
Hans, but then forgot. The easiest fix is:
1. Open s-mag-01.tex (which on your box, if you use Gerben Wierda's  
installer, should be in  
/usr/local/teTeX/share/texmf.local/tex/context/base/s-mag-01.tex

2. Locate the lines

\usetypescript
   [palatino][\defaultencoding]

\setupbodyfont
   [palatino,10pt]

3. Just before them, insert this line:
\usetypescript[adobekb][\defaultencoding]

4. Save the file and rerun, and you should be in business.

Good luck!

Thomas

On Mar 31, 2005, at 3:48 AM, Paul R Martin wrote:

>
> Dear ConTeXters,
>
> I'm a newcomer to ConTeXt and to this congenial and obviously active  
> list:  please bear with me and read my story. I'll be much more  
> succinct in future.
>
> Last week, I installed TeTex and ConTeXt [Mac OS X 10.3 "Panther"].  
> I'm working my way through the "Excursion" and "This Way/ My Way"  
> documents. They are great documents, ConTeXt is a great  package, and  
> I've had some timely tips from Hans Hagen (Hail thee, Hans!). I've  
> made some good progress. I have learned the difference between a   
> _Hasselter juffer_ and a _Hasselter bitter_, but I'm still not sure  
> what one does with a _foekepot_. I suspect that it's a percussion  
> instrument, but that's beside the point.
>
> I have a history of user-level LaTeX formatting in my distant past.  
> I've mostly been stuck in the dark, ragged, dreary, world of MS Office  
> for the past decade, so you can understand my joy to see beautiful,  
> colourful .pdf pages rolling up my screen, as a result of typing  
> straightforward, comprehensible formatting commands in a plain text  
> ascii file. As my fellow Australians would say: ** You little ripper!  
> **
>
> Now, I've managed to side-step some menacing signs of absent fonts as  
> I progressed. My goals are straightforward (technical documentation  
> and scientific writing), so I've been happy to accept the font  
> fallback/replacement routines. Further, my glimpses into the pages and  
> pages of information about font handling make me think that it's a  
> kind of bad neighbourhood for a person like me to enter, just as it  
> was when TeX and I were young.
>
> But now I've struck the following blockade in my quest to produce a  
> 'My Way' document, which I did by simply
>
> 	1) cutting and pasting the source code from the page 3 of My Way #0  
> [mag-0000.pdf]
> 	2) changing the author name, and
> 	3) saving the resultant text as [mwy-000-Test.tex],  then
> 	4) running the perl "texexec" script on it.
>
> OK, don't snicker, it may not be such a silly thing to try. I'm sure  
> there are other people who might try this kind of approach. Here is  
> the gist of the result -- ellipses mark my deletions.
>
> ------------------------------START---------------------------
>
> [nvri-hayden:~/Documents/ConTEXt/MyWay] paulm% texexec --color --pdf  
> mwy-000-Test
>
>  TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
>
> ...
>
> system          : macros of module mag-01 loaded
>
> ...
>
> (/usr/local/teTeX/share/texmf.tetex/tex/context/base/type- 
> akb.tex)kpathsea: Running mktextfm uplr8t
> mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1;  
> nonstopmode; input uplr8t
> This is METAFONT, Version 2.71828 (Web2C 7.5.3)
>
> kpathsea: Running mktexmf uplr8t
> ! I can't find file `uplr8t'.
> <*> ...:=ljfour; mag:=1; nonstopmode; input uplr8t
>
> Please type another input file name
> ! Emergency stop.
> <*> ...:=ljfour; mag:=1; nonstopmode; input uplr8t
>
> Transcript written on mfput.log.
> grep: uplr8t.log: No such file or directory
> mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode;  
> input uplr8t' failed to make uplr8t.tfm.
> kpathsea: Appending font creation commands to missfont.log.
>
> ...
>
> ! Font \*palatino12ptrmtf*:=uplr8t at 12.0pt not loadable: Metric  
> (TFM) file no
> t found.
>
> ...
>
> ---------------------------------------------FINISH-------------------
>
> [etc etc, I think that 'nonstopmode' might have been why this loop  
> continued for the next 120 seconds. BTW I typed 'Q' in response to the  
> input file name request  above].
>
> Now, it's obvious from the ContextGarden that I've probably missed  
> some step in font configuration. But when I start to look in the  
> numerous sources of advice, I strike the usual frustration. There are  
> lots of statements (lots and lots of 'em!) about checking and  
> un-commenting and configuring, but I can find no list of *prioritised*  
> things for beginners to try, in the order which they should be tried,  
> in order to solve what looks to be a simple and typical problem.  
> Without such a set of instructions, I'm loath to change anything in my  
> configuration, for fear that the cure might be worse than the disease.
>
> I'd love to try to understand the source of the error, and how to  
> handle fonts professionally, and lots of other things as well. But I'm  
> a busy scientist with many other commitments. As long as ConText is  
> working I'm happy, but  I can't devote much time to delving into  
> errors. So I may not be a typical participant in this list. But if you  
> help me,  you will help to make ConTeXt more accessible to others like  
> me, and this will be good for the cause, _nes pas?_  I'd be happy to  
> write a my way document or contribute a Wiki page on this topic to  
> encapsulate any good advice for myself and other neophytes.
>
> Yours,
>
> P.
>
> Paul R Martin
> National Vision Research Institute of Australia
> Tel: +613 9349 7481
> prmartin@unimelb.edu.au
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beginnner's question: fumbling with font finding  failures.
  2005-03-31 11:53   ` Thomas A.Schmitz
@ 2005-03-31 12:21     ` Otared Kavian
  2005-03-31 12:42     ` Stopping and contiuning movies Albrecht Kauffmann
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 23+ messages in thread
From: Otared Kavian @ 2005-03-31 12:21 UTC (permalink / raw)


At 13:53 +0200 31/03/05, Thomas A.Schmitz wrote:
>2. Locate the lines
>
>\usetypescript
>   [palatino][\defaultencoding]
>
>\setupbodyfont
>   [palatino,10pt]
>
>3. Just before them, insert this line:
>\usetypescript[adobekb][\defaultencoding]
>
>4. Save the file and rerun, and you should be in business.

Hi,

In my experience, I had to say:

\usetypescript [adobekb][\defaultencoding]
\setupbodyfont[pos]
\usetypescript[palatino][\defaultencoding]
\setupbodyfont[palatino,10pt]

in order to have any success in typesetting that file (under Mac OS X 
10.3.8 and Gerben Wierda's TeX).

Best regards: OK

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Stopping and contiuning movies
  2005-03-31 11:53   ` Thomas A.Schmitz
  2005-03-31 12:21     ` Otared Kavian
@ 2005-03-31 12:42     ` Albrecht Kauffmann
  2005-03-31 16:09       ` Hans Hagen
  2005-03-31 12:50     ` Metapost animation Albrecht Kauffmann
  2005-03-31 16:08     ` Beginnner's question: fumbling with font finding failures Hans Hagen
  3 siblings, 1 reply; 23+ messages in thread
From: Albrecht Kauffmann @ 2005-03-31 12:42 UTC (permalink / raw)


Hi all,

is it possible to stop (and continue) a movie (at arbitrary time points)
that has been included how
described in the ConTeXt manual ch. 13.7 p. 302 ff.? To start the movie
using StartMovie works fine, but using StopMovie causes to abort the movie
instead of stopping.

With many thanks for any hint
Albrecht

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Metapost animation
  2005-03-31 11:53   ` Thomas A.Schmitz
  2005-03-31 12:21     ` Otared Kavian
  2005-03-31 12:42     ` Stopping and contiuning movies Albrecht Kauffmann
@ 2005-03-31 12:50     ` Albrecht Kauffmann
  2005-03-31 16:08     ` Beginnner's question: fumbling with font finding failures Hans Hagen
  3 siblings, 0 replies; 23+ messages in thread
From: Albrecht Kauffmann @ 2005-03-31 12:50 UTC (permalink / raw)



Hi Hans, hi all,

in an former mail you had answered to the question of Michal Kvasnicka:
"Is it possible to `animate'
> the fieldstack? In other words, to make it change one figure to
> another automatically, without clicking anywhere, changing one frame
> to another each 1/n second to simulate a smoth motion like in a
cinema?":

"sure, you can let a javascript toggle the states, ...".

Has someone already experience with such animated field stacks and can
give me some clue how to realize this?

With many thanks in advance
Albrecht

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beginnner's question: fumbling with font finding failures.
  2005-03-31 11:53   ` Thomas A.Schmitz
                       ` (2 preceding siblings ...)
  2005-03-31 12:50     ` Metapost animation Albrecht Kauffmann
@ 2005-03-31 16:08     ` Hans Hagen
  3 siblings, 0 replies; 23+ messages in thread
From: Hans Hagen @ 2005-03-31 16:08 UTC (permalink / raw)


Thomas A.Schmitz wrote:

> 3. Just before them, insert this line:
> \usetypescript[adobekb][\defaultencoding]

that should go in your local cont-sys.tex file; alternatively say

\usetypescript[berry][\defaultencoding]

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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Stopping and contiuning movies
  2005-03-31 12:42     ` Stopping and contiuning movies Albrecht Kauffmann
@ 2005-03-31 16:09       ` Hans Hagen
  0 siblings, 0 replies; 23+ messages in thread
From: Hans Hagen @ 2005-03-31 16:09 UTC (permalink / raw)


Albrecht Kauffmann wrote:
> Hi all,
> 
> is it possible to stop (and continue) a movie (at arbitrary time points)
> that has been included how
> described in the ConTeXt manual ch. 13.7 p. 302 ff.? To start the movie
> using StartMovie works fine, but using StopMovie causes to abort the movie
> instead of stopping.

PauseMovie


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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: MetaPost Animation
  2010-04-16 12:51     ` Troy Henderson
  2010-04-16 14:19       ` Boštjan Vesnicer
@ 2010-04-16 14:43       ` Wolfgang Schuster
  1 sibling, 0 replies; 23+ messages in thread
From: Wolfgang Schuster @ 2010-04-16 14:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 16.04.10 14:51, schrieb Troy Henderson:
> If I have two different \startMPcode ... \stopMPcode sections, is
> there a way (perhaps it does this by default) to have the variables
> stored in the first block available in the second block?  In pure
> MetaPost, I can do
>
> numeric a:=4;
> beginfig(1);
>      label(decimal(a),origin);
> endfig;
> beginfig(2);
>      label(decimal(a),origin);
> endfig;
> end
>
> and both figures have the value of 'a' available to them because 'a'
> was defined before each figure.  What is the ConTeXt way of doing
> this?
>    
\starttext
\startluacode
local a = 0
for i=1,10 do
     a = a + 1
     context.startMPpage()
         -- context('label("%d",origin);',a)
         context('label(textext("%d"),origin);',a)
     context.stopMPpage()
end
\stopluacode
\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: MetaPost Animation
  2010-04-16 12:51     ` Troy Henderson
@ 2010-04-16 14:19       ` Boštjan Vesnicer
  2010-04-16 14:43       ` Wolfgang Schuster
  1 sibling, 0 replies; 23+ messages in thread
From: Boštjan Vesnicer @ 2010-04-16 14:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 711 bytes --]

>
> If I have two different \startMPcode ... \stopMPcode sections, is
> there a way (perhaps it does this by default) to have the variables
> stored in the first block available in the second block?  In pure
> MetaPost, I can do
>
> numeric a:=4;
> beginfig(1);
>    label(decimal(a),origin);
> endfig;
> beginfig(2);
>    label(decimal(a),origin);
> endfig;
> end
>
> and both figures have the value of 'a' available to them because 'a'
> was defined before each figure.  What is the ConTeXt way of doing
> this?
>
>
Do you mean something like this?

\starttext
\startMPpage
a := 4;
label(decimal a, origin);
\stopMPpage
\startMPpage
a := a+1;
label(decimal a, origin);
\stopMPpage
\stoptext

Regards, Bostjan

[-- Attachment #1.2: Type: text/html, Size: 1412 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: MetaPost Animation
  2010-04-16  7:54   ` Hans Hagen
@ 2010-04-16 12:51     ` Troy Henderson
  2010-04-16 14:19       ` Boštjan Vesnicer
  2010-04-16 14:43       ` Wolfgang Schuster
  0 siblings, 2 replies; 23+ messages in thread
From: Troy Henderson @ 2010-04-16 12:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> \def\MyGraphics#1{%

Thanks for the replies folks.  The example that I posted is a simple
example.  The example that I'm working on (displaying successive terms
in a Taylor series) requires a bit of computations, and I don't want
to have to go back and do each computation for each value of #1.  That
is, I want to build a table of numerical values (numeric Y[][]) and be
able to address those values from my \startMPcode section.

If I have two different \startMPcode ... \stopMPcode sections, is
there a way (perhaps it does this by default) to have the variables
stored in the first block available in the second block?  In pure
MetaPost, I can do

numeric a:=4;
beginfig(1);
    label(decimal(a),origin);
endfig;
beginfig(2);
    label(decimal(a),origin);
endfig;
end

and both figures have the value of 'a' available to them because 'a'
was defined before each figure.  What is the ConTeXt way of doing
this?

Thanks,

Troy
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: MetaPost Animation
  2010-04-16  7:36 ` Boštjan Vesnicer
@ 2010-04-16  7:54   ` Hans Hagen
  2010-04-16 12:51     ` Troy Henderson
  0 siblings, 1 reply; 23+ messages in thread
From: Hans Hagen @ 2010-04-16  7:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 16-4-2010 9:36, Boštjan Vesnicer wrote:
> Hi Troy
>
> Here is a simple solution:
>
> \def\MyGraphics#1{%
> \startMPcode
> path p,q;
> p:=fullcircle scaled 72;
> L:=length p;
> N:=20;
> q:=subpath (0,#1/N*L) of p;
> draw q withcolor red;
> fill fullcircle scaled 3 shifted point length q of q withcolor blue;
> setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
> \stopMPcode}
>
> \starttext
> \dostepwiserecurse{0}{20}{1}{%
> \startTEXpage
> \MyGraphics{\recurselevel}
> \stopTEXpage}
> \stoptext

or, if you want to fool yourself that you're not using tex ... put this 
in "somefile.cld":

-- --

local template = [[
     path p, q ;
     p := fullcircle scaled 72 ;
     L := length p ;
     N := 20 ;
     q:=subpath (0,%s/N*L) of p ;
     draw q withcolor red ;
     fill fullcircle scaled 3 shifted point length q of q withcolor blue ;
     setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75 ;
]]

context.starttext()
     for i=0,20 do
         context.startMPpage()
             context(template,i)
         context.stopMPpage()
     end
context.stoptext()

-- --

and then run:

context somefile.cld




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: MetaPost Animation
  2010-04-15 17:53 MetaPost Animation Troy Henderson
@ 2010-04-16  7:36 ` Boštjan Vesnicer
  2010-04-16  7:54   ` Hans Hagen
  0 siblings, 1 reply; 23+ messages in thread
From: Boštjan Vesnicer @ 2010-04-16  7:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2284 bytes --]

Hi Troy

Here is a simple solution:

\def\MyGraphics#1{%
\startMPcode
path p,q;
p:=fullcircle scaled 72;
L:=length p;
N:=20;
q:=subpath (0,#1/N*L) of p;
draw q withcolor red;
fill fullcircle scaled 3 shifted point length q of q withcolor blue;
setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
\stopMPcode}

\starttext
\dostepwiserecurse{0}{20}{1}{%
\startTEXpage
\MyGraphics{\recurselevel}
\stopTEXpage}
\stoptext

Regards, Bostjan

On Thu, Apr 15, 2010 at 7:53 PM, Troy Henderson <thenders@gmail.com> wrote:

> I am trying to create an animation in ConTeXt + MetaPost.  In
> particular, I would like to have ConTeXt + MetaPost generate each
> individual frame of the animation, and then I would like to place each
> of these graphics on the page in succession.  I am looking for a
> "ConTeXt way" without placing the MetaPost code in a separate source
> file, running MetaPost, and using \externalfigure.  The following
> MetaPost sample code generate 21 graphics images  (numbered .0 to
> .20), but I have no idea how to have ConTeXt generate these graphics
> without a manual external MetaPost run and have them included in a way
> that is consistent with \startuseMPgraphic or similar.
>
> Thanks in advance,
>
> Troy Henderson
>
> path p,q;
> p:=fullcircle scaled 72;
> L:=length p;
> N:=20;
> for n=0 upto N:
>        beginfig(n);
>                q:=subpath (0,n/N*L) of p;
>                draw q withcolor red;
>                fill fullcircle scaled 3 shifted point length q of q
> withcolor blue;
>                setbounds currentpicture to unitsquare shifted (-0.5,-0.5)
> scaled 75;
>        endfig;
> endfor;
> end
>
>
> --
> Troy Henderson
> Assistant Professor
> Department of Mathematics
> University of Mobile
> http://www.tlhiv.org
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 4191 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 23+ messages in thread

* MetaPost Animation
@ 2010-04-15 17:53 Troy Henderson
  2010-04-16  7:36 ` Boštjan Vesnicer
  0 siblings, 1 reply; 23+ messages in thread
From: Troy Henderson @ 2010-04-15 17:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I am trying to create an animation in ConTeXt + MetaPost.  In
particular, I would like to have ConTeXt + MetaPost generate each
individual frame of the animation, and then I would like to place each
of these graphics on the page in succession.  I am looking for a
"ConTeXt way" without placing the MetaPost code in a separate source
file, running MetaPost, and using \externalfigure.  The following
MetaPost sample code generate 21 graphics images  (numbered .0 to
.20), but I have no idea how to have ConTeXt generate these graphics
without a manual external MetaPost run and have them included in a way
that is consistent with \startuseMPgraphic or similar.

Thanks in advance,

Troy Henderson

path p,q;
p:=fullcircle scaled 72;
L:=length p;
N:=20;
for n=0 upto N:
	beginfig(n);
		q:=subpath (0,n/N*L) of p;
		draw q withcolor red;
		fill fullcircle scaled 3 shifted point length q of q withcolor blue;
		setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
	endfig;
endfor;
end


-- 
Troy Henderson
Assistant Professor
Department of Mathematics
University of Mobile
http://www.tlhiv.org
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2005-05-19 14:28       ` Mojca Miklavec
@ 2005-05-19 14:39         ` luigi.scarso
  0 siblings, 0 replies; 23+ messages in thread
From: luigi.scarso @ 2005-05-19 14:39 UTC (permalink / raw)


Mojca Miklavec wrote:

>
> Can someone please post any example of JavaScript code to "toggle the 
> states" like in either http://www.math.muni.cz/~plch/nkpm/nradanm6.pdf 
> or https://www.pragma-pod.com/present/talks/fifteen.pdf?
>
I hope this can help you:

http://www.fi.muni.cz/~xholecek/animations/

luigi

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-15  8:22     ` Hans Hagen
  2004-09-16 17:05       ` Michal Kvasnicka
@ 2005-05-19 14:28       ` Mojca Miklavec
  2005-05-19 14:39         ` luigi.scarso
  1 sibling, 1 reply; 23+ messages in thread
From: Mojca Miklavec @ 2005-05-19 14:28 UTC (permalink / raw)



Hans Hagen wrote:
> Michal Kvasnicka wrote:
> 
>> Hm. Do you quote the Metafun manual, section 13.6? I know this 
>> technique. But my question was different: Is it possible to `animate' 
>> the fieldstack? In other words, to make it change one figure to 
>> another automatically, without clicking anywhere, changing one frame 
>> to another each 1/n second to simulate a smoth motion like in a cinema? 
> 
> sure, you can let a javascript toggle the states; however, small steps 
> (<1 sec) are not to be trusted in precission, since they also depend on 
> the machine; they also kind of block other actions since there is no 
> concept of animation in pdf (apart from svg, which is poorly 
> implemented/integrated).  
> Another method is demonstrated in the 'dante XV' presentation (runs 
> slightly faster on a mac than on windows);
> Hans

Can someone please post any example of JavaScript code to "toggle the 
states" like in either http://www.math.muni.cz/~plch/nkpm/nradanm6.pdf 
or https://www.pragma-pod.com/present/talks/fifteen.pdf?

I produced the graphics as explained in the section 13.6 of the metafun 
manual, but I would like to press the button only once at the beginning 
of the animation instead of twenty times.

Thank you very much,
	Mojca Miklavec

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-15  8:22     ` Hans Hagen
@ 2004-09-16 17:05       ` Michal Kvasnicka
  2005-05-19 14:28       ` Mojca Miklavec
  1 sibling, 0 replies; 23+ messages in thread
From: Michal Kvasnicka @ 2004-09-16 17:05 UTC (permalink / raw)


Good evening.

Many thanks for your answer. If it doesn't work for `small steps (<1s)', 
it's probably useless, since for a smooth motion at least 15 frames per 
seconds are needed. But anyway, what is `svg'? Where can I see `dante XV 
presentation'?

And one more question: Is sounds as system-dependent as movies? If not, 
how can I integrate it in a PDF document?

Many thanks and greetings.
Yours
Michal Kvasnicka

>
> sure, you can let a javascript toggle the states; however, small steps 
> (<1 sec) are not to be trusted in precission, since they also depend 
> on the machine; they also kind of block other actions since there is 
> no concept of animation in pdf (apart from svg, which is poorly 
> implemented/integrated).  
> Another method is demonstrated in the 'dante XV' presentation (runs 
> slightly faster on a mac than on windows);
> Hans 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-14 19:18   ` Michal Kvasnicka
@ 2004-09-15  8:22     ` Hans Hagen
  2004-09-16 17:05       ` Michal Kvasnicka
  2005-05-19 14:28       ` Mojca Miklavec
  0 siblings, 2 replies; 23+ messages in thread
From: Hans Hagen @ 2004-09-15  8:22 UTC (permalink / raw)


Michal Kvasnicka wrote:

> Hm. Do you quote the Metafun manual, section 13.6? I know this 
> technique. But my question was different: Is it possible to `animate' 
> the fieldstack? In other words, to make it change one figure to 
> another automatically, without clicking anywhere, changing one frame 
> to another each 1/n second to simulate a smoth motion like in a cinema?

sure, you can let a javascript toggle the states; however, small steps (<1 sec) are not to be trusted in precission, since they also depend on the machine; they also kind of block other actions since there is no concept of animation in pdf (apart from svg, which is poorly implemented/integrated).   

Another method is demonstrated in the 'dante XV' presentation (runs slightly faster on a mac than on windows); 

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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-14 16:33 ` Hans Hagen
@ 2004-09-14 19:18   ` Michal Kvasnicka
  2004-09-15  8:22     ` Hans Hagen
  0 siblings, 1 reply; 23+ messages in thread
From: Michal Kvasnicka @ 2004-09-14 19:18 UTC (permalink / raw)


Hans Hagen wrote:

> Michal Kvasnicka wrote:
>
>> Now to my next question. I have seen a great thing: Metapost pictures 
>> were animated (probably with the JavaScript code). You can found some 
>> examples here:
>>    http://www.math.muni.cz/~plch/nkpm/nradanm6.pdf
>>    http://www.math.muni.cz/~plch/nkpm/nradanm8.pdf
>> (Just click on the `Spustit animaci' button.)
>
>
> it's in the metafun manual
> that kind of trickery has been present in context for a long time, but 
> unfortunately it's not always available on each platform
> (apart from the fact that each version of acrobat has its own side 
> effects)

Hm. Do you quote the Metafun manual, section 13.6? I know this 
technique. But my question was different: Is it possible to `animate' 
the fieldstack? In other words, to make it change one figure to another 
automatically, without clicking anywhere, changing one frame to another 
each 1/n second to simulate a smoth motion like in a cinema?

Many thanks to you and all who answered me.
Yours
Michal Kvasnicka

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-13 16:57 Metapost animation Michal Kvasnicka
  2004-09-13 17:14 ` Henning Hraban Ramm
  2004-09-13 19:40 ` Patrick Gundlach
@ 2004-09-14 16:33 ` Hans Hagen
  2004-09-14 19:18   ` Michal Kvasnicka
  2 siblings, 1 reply; 23+ messages in thread
From: Hans Hagen @ 2004-09-14 16:33 UTC (permalink / raw)


Michal Kvasnicka wrote:

> Now to my next question. I have seen a great thing: Metapost pictures 
> were animated (probably with the JavaScript code). You can found some 
> examples here:
>    http://www.math.muni.cz/~plch/nkpm/nradanm6.pdf
>    http://www.math.muni.cz/~plch/nkpm/nradanm8.pdf
> (Just click on the `Spustit animaci' button.)

it's in the metafun manual 

that kind of trickery has been present in context for a long time, but unfortunately it's not always available on each platform 

(apart from the fact that each version of acrobat has its own side effects) 

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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-14  8:27   ` Michal Kvasnicka
@ 2004-09-14  8:21     ` Patrick Gundlach
  0 siblings, 0 replies; 23+ messages in thread
From: Patrick Gundlach @ 2004-09-14  8:21 UTC (permalink / raw)


Hello Michal,

[...]

> As for your example, I don't understand it. It does work under Windoze
> with Acrobat 4.0 and Acrobat Reader 5.0, but not under Linux with
> Acrobat Reader 5.x. 

That is Acrobat Reader. :-( Accept it as a fact that you need to do
your JS for a specific version of Adobe Reader.


> Can you send me your source? I'd like to compile it myself and see
> whether it would work, or not. 

It is up at 
http://dl.contextgarden.net/examples/euro-anim/euro-anim.tex

> Have you any explanation for that?

None at all.

Patrick
-- 
ConTeXt wiki: http://contextgarden.net
texshow-web:  http://texshow.contextgarden.net
List archive: http://archive.contextgarden.net

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-13 16:57 Metapost animation Michal Kvasnicka
  2004-09-13 17:14 ` Henning Hraban Ramm
@ 2004-09-13 19:40 ` Patrick Gundlach
  2004-09-14  8:27   ` Michal Kvasnicka
  2004-09-14 16:33 ` Hans Hagen
  2 siblings, 1 reply; 23+ messages in thread
From: Patrick Gundlach @ 2004-09-13 19:40 UTC (permalink / raw)


Hi,

> Now to my next question. I have seen a great thing: Metapost pictures
> were animated (probably with the JavaScript code). You can found some
> examples here:

You need automatic steps? If not, take a look at 
http://dl.contextgarden.net/examples/euro-anim/euro-anim.pdf

(this is explained in the metafun handbook; I could upload the source,
too).


Patrick
-- 
ConTeXt wiki: http://contextgarden.net
texshow-web:  http://texshow.contextgarden.net
List archive: http://archive.contextgarden.net

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Metapost animation
  2004-09-13 16:57 Metapost animation Michal Kvasnicka
@ 2004-09-13 17:14 ` Henning Hraban Ramm
  2004-09-13 19:40 ` Patrick Gundlach
  2004-09-14 16:33 ` Hans Hagen
  2 siblings, 0 replies; 23+ messages in thread
From: Henning Hraban Ramm @ 2004-09-13 17:14 UTC (permalink / raw)


Am 13.09.2004 um 18:57 schrieb Michal Kvasnicka:
> Now to my next question. I have seen a great thing: Metapost pictures 
> were animated (probably with the JavaScript code). You can found some 
> examples here:

Hans himself showed some examples some years ago at DANTE, a ticking 
clock, a spinning windmill etc.
(The clock is somewhere around AFAIK but works only with Acrobat 4)

Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Metapost animation
@ 2004-09-13 16:57 Michal Kvasnicka
  2004-09-13 17:14 ` Henning Hraban Ramm
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Michal Kvasnicka @ 2004-09-13 16:57 UTC (permalink / raw)


Good evening.

First of all I want to thank to Mr. Hagen for his last answer. I will 
check your last code of balanced columnsets at home (with the newest 
ConTeXt). As for your correcting code for ordinary collumns, I have 
tried it with three different types of my documents, and it worked well. 
Maybe this is the final solution of the problem. I will try it with more 
documents and let you know, anyway.

Now to my next question. I have seen a great thing: Metapost pictures 
were animated (probably with the JavaScript code). You can found some 
examples here:
    http://www.math.muni.cz/~plch/nkpm/nradanm6.pdf
    http://www.math.muni.cz/~plch/nkpm/nradanm8.pdf
(Just click on the `Spustit animaci' button.)

Is it possible to do it simply in the ConTeXt? Of course I may break 
down the mechanism of widgets and write my own JavaScript (I don't know 
how to do timing), but isn't there some special macro for animating 
series of figures? It would be great.

If so, is Acrobat Reader fast enough to simulate this way the nice 
feature of MS PowerPoint---curves and shapes that are drawn by pieces, 
or that appear somewhere and then go to its final location? (This is 
quite instructive in economics, because you can easily notice which 
curve is drawn first, what second, and so on.) How can I do it?

With many greetings and thanks
Michal Kvasnicka

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2010-04-16 14:43 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050330203818.ADE29128CA@ronja.ntg.nl>
2005-03-31  1:48 ` Beginnner's question: fumbling with font finding failures Paul R Martin
2005-03-31 11:53   ` Thomas A.Schmitz
2005-03-31 12:21     ` Otared Kavian
2005-03-31 12:42     ` Stopping and contiuning movies Albrecht Kauffmann
2005-03-31 16:09       ` Hans Hagen
2005-03-31 12:50     ` Metapost animation Albrecht Kauffmann
2005-03-31 16:08     ` Beginnner's question: fumbling with font finding failures Hans Hagen
2010-04-15 17:53 MetaPost Animation Troy Henderson
2010-04-16  7:36 ` Boštjan Vesnicer
2010-04-16  7:54   ` Hans Hagen
2010-04-16 12:51     ` Troy Henderson
2010-04-16 14:19       ` Boštjan Vesnicer
2010-04-16 14:43       ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2004-09-13 16:57 Metapost animation Michal Kvasnicka
2004-09-13 17:14 ` Henning Hraban Ramm
2004-09-13 19:40 ` Patrick Gundlach
2004-09-14  8:27   ` Michal Kvasnicka
2004-09-14  8:21     ` Patrick Gundlach
2004-09-14 16:33 ` Hans Hagen
2004-09-14 19:18   ` Michal Kvasnicka
2004-09-15  8:22     ` Hans Hagen
2004-09-16 17:05       ` Michal Kvasnicka
2005-05-19 14:28       ` Mojca Miklavec
2005-05-19 14:39         ` luigi.scarso

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).