From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16940 Path: main.gmane.org!not-for-mail From: David Munger Newsgroups: gmane.comp.tex.context Subject: Re: \presentationstep Date: Wed, 03 Nov 2004 11:42:30 -0500 Message-ID: <1099500151.11703.2.camel@tempete.lac.qc.ca> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1099500147 5810 80.91.229.6 (3 Nov 2004 16:42:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2004 16:42:27 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 03 17:42:13 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CPOD7-0003Gj-00 for ; Wed, 03 Nov 2004 17:42:13 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 628D212799; Wed, 3 Nov 2004 17:42:12 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31453-06; Wed, 3 Nov 2004 17:42:09 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3FFA01277B; Wed, 3 Nov 2004 17:42:09 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FAC61277B for ; Wed, 3 Nov 2004 17:42:08 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31475-06-2 for ; Wed, 3 Nov 2004 17:42:07 +0100 (CET) Original-Received: from tomts16-srv.bellnexxia.net (unknown [209.226.175.4]) by ronja.ntg.nl (Postfix) with ESMTP id 96BFA12775 for ; Wed, 3 Nov 2004 17:42:07 +0100 (CET) Original-Received: from tempete.lac.qc.ca ([64.229.111.36]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041103164155.EDHT15612.tomts16-srv.bellnexxia.net@tempete.lac.qc.ca> for ; Wed, 3 Nov 2004 11:41:55 -0500 Original-Received: from tempete.lac.qc.ca ([192.168.1.1] ident=david) by tempete.lac.qc.ca with esmtp (Exim 4.34) id 1CPODP-00039S-BC for ntg-context@ntg.nl; Wed, 03 Nov 2004 11:42:31 -0500 Original-To: mailing list for ConTeXt users In-Reply-To: X-Mailer: Evolution 2.0.2 X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16940 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16940 Hi Otared, Thanks a lot for you macros. They do the job pretty well. They remind me of the way Prosper does things. When I have time, I'll try to find out how to Wiki your post. Thanks again! David Otared Kavian wrote : > Hi David, > > A few months ago I had to use steps in my presentations, but since I > could not use thouroughly s-pre-60.tex (and the examples given in > s-pre-61.tex) I ended up > writing a few macros which work fine with ConTeXt and the presentation modules. > These macros are very elementary and crude, but they work... > If I succeed to learn how to use layers smartly as does Hans, I will > write these macros again. :-) > > Below are the macros and some examples. > Best regards: OK > %%%%%%%%%%%% begin test-step-ok.tex > %%K test-step-ok.tex > > %%K Here we use the plain \TeX\ command \phantom{} in order to have > %%K some material appear step by step. > %%K The structure is quite simple, but since I am not very > %%K familiar with ConTeXt, I cannot write elegant code as does > %%K Hans Hagen... > %%K > %%K An advantage is that the code can be used also in > %%K plain TeX, in LaTeX and other macro-packages. > %%K > > \newif\ifSteppingSlide > \SteppingSlidetrue %%K this is when you want a step by step presentation > %\SteppingSlidefalse %%K this is when you want to print the slides > % > \newcount\StepsCounter > \StepsCounter=0 > % > \newcount\NumberOfSteps > \NumberOfSteps=10 > % > \newcount\BeforeStepNumber > \BeforeStepNumber=0 > % > %%K StepBetween[number1,number2]{material} will make "material" > %%K appear between steps "number1" and "number2" > \def\StepBetween[#1,#2]#3{% > \ifSteppingSlide > \ifnum#1>\StepsCounter \phantom{#3} > \else > \ifnum#2<\StepsCounter \phantom{#3} > \else \relax #3 > \fi > \fi > \else {#3} > \fi} > % > %%K Step{number1}{material} will make "material" > %%K appear beginning with step "number1" until "NumberOfSteps" > \def\Step#1#2{\StepBetween[#1,\NumberOfSteps]{#2}} > % > %%K OnlyStep{number1}{material} will make "material" > %%K appear only on step "number1" > \def\OnlyStep#1#2{\StepBetween[#1,#1]{#2}} > % > %%K StepBefore{number1}{material} will make "material" > %%K appear only on all steps before "number1" > \def\StepBefore#1#2{ > \global\BeforeStepNumber=#1 > \StepBetween[0,\BeforeStepNumber]{#2}} > % > \long\def\SlideWithSteps#1#2{ > \ifSteppingSlide > \global\StepsCounter=0 > \global\NumberOfSteps=#1 > \MakeSteps{#2} > \else #2 > \fi} > % > \long\def\MakeSteps#1{\loop #1 > \ifnum\StepsCounter<\NumberOfSteps > \global\advance\StepsCounter by 1\vfill\eject > \repeat > \vfill\eject} > % > > > %%K This is the end of the macros > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % \endinput > > %%K Here is a sample of how you can use these macros > %%K > \starttext > > \startitemize > > \SlideWithSteps{8}{ > \item Consider the following nonlinear equation: > $$\Step{8}{{\partial u \over \partial t}} \Step{1}{-\Delta u + > |u|^{p-1}u} \Step{2}{=} \Step{3}{f} \Step{4}{+{\rm div}(g)} > \Step{5}{+|\nabla u|{\Step{6}{^2}}}$$ > \StepBetween[3,5]{\item This line appears only between steps 3 and 5} > \Step{8}{\item The equation may be parabolic.} > \StepBefore{4}{\item This line appears only before step 4.} > \OnlyStep{4}{\item This line appears only at step 4.} > \vfill (Here you see step number \the\StepsCounter) > } % end of \SlideWithSteps > > \stopitemize > \page > > \stoptext > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context